Commit Graph

52 Commits (cd64a70c793e746416a7f91e423d52dda4b05722)

Author SHA1 Message Date
Robert Adams 38e6da5522 Comment out old inbound UDP throttling hack. This would cause the UDP
reception thread to sleep for 30ms if the number of available user worker
threads got low. It doesn't look like any of the UDP packet types are
marked async so this check is 1) unnecessary and 2) really crazy since
it stops up the reception thread under heavy load without any indication.
2013-07-09 18:34:24 -07:00
Justin Clark-Casey (justincc) 16f40c1a15 Add --default option to "debug lludp packet" command to allow packet logging to be performed immediately from client start 2013-07-04 17:29:53 +01:00
Justin Clark-Casey (justincc) 25889b2d7e change "debug packet" command to "debug lludp packet" to conform with other "debug lludp" options
also moves the implementing code into LLUDPServer.cs along with other debug commands from OpenSim.cs
gets all debug lludp commands to only activate for the set scene if not root
2013-07-04 00:02:53 +01:00
Diva Canto 91091c3e54 Second take at HGTP-mesh bug: delay sending the initial data only for agents that are coming via TP (root agents) 2013-05-14 09:06:58 -07:00
Diva Canto 645da54f25 Revert "HGTP-mesh bug: the mesh download requests were going to the departing sims for a little while. This was also true for local TPs. BUt for local TPs the assets are on the same server, so it doesn't matter. For HGTPs, it matters. This potential fix moves sending the initial data to later, after the client has completed the movement into the region. Fingers crossed that it doesn't mess other things up!"
This reverts commit f32a21d967.
2013-05-14 08:47:18 -07:00
Diva Canto f32a21d967 HGTP-mesh bug: the mesh download requests were going to the departing sims for a little while. This was also true for local TPs. BUt for local TPs the assets are on the same server, so it doesn't matter. For HGTPs, it matters. This potential fix moves sending the initial data to later, after the client has completed the movement into the region. Fingers crossed that it doesn't mess other things up! 2013-05-14 08:12:01 -07:00
Justin Clark-Casey (justincc) c5de9840b0 refactor: Remove IClientNetworkServer.NetworkStop() in favour of existing Stop().
This was an undocumented interface which I think was for long defunct region load balancing experiments.
Also adds method doc for some IClientNetworkServer methods.
2013-04-16 21:58:24 +01:00
Robert Adams c10c43d6f6 Fix server statistics always reporting zero for total network bytes in/out.
Clean up some parameter code in Statistics.Binary.
2013-03-15 13:59:34 -07:00
Justin Clark-Casey (justincc) cd088757e9 Add a first draft mechanism for the IncomingPacketsProcessedStat to show the delta over time.
The chief motivation for this is to be able to tell whether there's any impact on incoming packet processing from enabling extra packet pooling.
2012-11-16 04:36:22 +00:00
Justin Clark-Casey (justincc) 038528dc80 Make PacketPool class stats pull stats instead of push stats so they can be lifted up into LLUDPServer and be distiguished by scene name 2012-11-15 02:02:59 +00:00
Justin Clark-Casey (justincc) 2c36106675 Add IncomingPacketsProcessedCount stat for diagnostics.
Also puts some packet processing counts in a container named after the scene so that stats can be collected from more than one scene.
2012-11-15 01:14:18 +00:00
Justin Clark-Casey (justincc) 319ebaca06 Make it possible to turn the base UDP object packet pools on and off whilst running via the "debug lludp pool <on|off>" console command. For debug purposes.
This does not currently apply to the higher LLUDP packetpool.
2012-10-23 02:44:15 +01:00
Justin Clark-Casey (justincc) 4578ff74fe Add object count stats for new IncomingPacket and UDPPacketBuffer pools if they are enabled. Add count stats for existing LLUDP pool.
This introduces a pull stat type in addition to the push stat type.
A pull stat takes a method on construction which knows how to update the stat on request.
In this way, special interfaces for pull stat collection are not necessary.
2012-10-23 01:52:10 +01:00
Justin Clark-Casey (justincc) faf6b56839 Explicitly return only the incoming AgentUpdate packet as this is the only one we pool atm, rather than attempting to return all incoming packets. 2012-10-17 23:08:14 +01:00
Justin Clark-Casey (justincc) 2ed59ad8ac If RecycleBaseUDPPackets = true, also pool IncomingPackets to reduce memory churn 2012-10-17 21:08:15 +01:00
Justin Clark-Casey (justincc) fc861c7904 Add optional pool for the UDPPacketBuffer objects that handle all incoming UDP data.
Even when an avatar is standing still, it's sending in a constant stream of AgentUpdate packets that the client creates new UDPPacketBuffer objects to handle.
This option pools those objects.  This reduces memory churn.
Currently off by default.  Works but the scope can be expanded.
2012-10-16 23:35:05 +01:00
Justin Clark-Casey (justincc) db4ca57590 Make it possible to separate start and stop lludp packet processing from the console for debug processes.
This is controlled via the "debug lludp start <in|out|all>" and "debug lludp stop <in|out|all>" region console commands.
The command "debug lludp status" will show current status.
2012-10-16 21:55:00 +01:00
Justin Clark-Casey (justincc) 21d0cbf703 Add AgentUpdate to PacketPool. This is the most common inbound packet from viewers. 2012-10-12 01:39:37 +01:00
Justin Clark-Casey (justincc) 2e9ef015f7 Fix packetpool for ImprovedTerseObjectUpdate packets.
These were neither being returned or in many places reused.
Getting packets from a pool rather than deallocating and reallocating reduces memory churn which in turn reduces garbage collection time and frequency.
2012-10-11 23:58:37 +01:00
Justin Clark-Casey (justincc) e76b01a201 Lock on AgentCircuitData during Scene.AddClient() and RemoveClient() to prevent an inactive connection being left behind if the user closes the viewer whilst the connection is being established.
This should remove the need to run the console command "kick user --force" when these connections are left around.
2012-10-10 00:26:43 +01:00
Justin Clark-Casey (justincc) 7c7cdf3431 Read PacketPool config in LLUDPServer with other config params rather than in Scene.
This is to resolve previous build break.
This unnecessarily but harmlessly reads and sets the parameter multiple times - scene was doing the same thing.
2012-10-05 01:43:29 +01:00
Justin Clark-Casey (justincc) 35efa88c26 Rename OpenSim.Framework.Statistics to OpenSim.Framework.Monitoring.
This better reflects the long-term purpose of that project and matches Monitoring modules.
2012-07-25 23:11:50 +01:00
Justin Clark-Casey (justincc) ba80f137b5 Prevent race conditions between two threads that call LLClientView.Close() simultaneously (e.g. ack timeout and an attempt to reconnect) 2012-07-19 22:32:27 +01:00
Justin Clark-Casey (justincc) d6f54b25cd Stop redundantly passing in the endpoint to the LLClientView constructor.
This can always be retrieved via the LLUDPClient and is so done in various places already.
2012-07-12 23:48:42 +01:00
Justin Clark-Casey (justincc) 5691a8b860 refactor: rename Watchdog.WATCHDOG_TIMEOUT_MS to DEFAULT_WATCHDOG_TIMEOUT_MS to reflect what it actually is 2012-07-04 00:15:03 +01:00
Justin Clark-Casey (justincc) aaa30dcebc Add region name to UseCircuitCode log messages 2012-06-15 05:01:36 +01:00
Justin Clark-Casey (justincc) 2ca31a9841 Remove accidental timeout left in during earlier debugging. Has been in since two commits ago (b099f26) 2012-06-12 02:46:14 +01:00
Justin Clark-Casey (justincc) b099f26376 Set IClientAPI.IsActive = false early on client removal due to ack timeout rather than using IsLoggingOut flag.
IsActive is more appropriate since unack timeout is not due to voluntary logout.
This is in line with operations such as manual kick that do not set the IsLoggingOut flag.
It's also slightly better race-wise since it reduces the chance of this operation clashing with another reason for client deactivation (e.g. manual kick).
2012-06-12 02:16:36 +01:00
Justin Clark-Casey (justincc) c89db34fc4 If the simulator closes a root agent due to ack timeout, then send the client a kick message with that reason, in case it is somehow still listening. 2012-06-12 02:03:31 +01:00
Justin Clark-Casey (justincc) f94b92df46 Instead of retrieving the known client again in LLUDPServer.RemoveClient(), check the IsLoggingOut flag instead.
This is slightly better thread-race wise
2012-06-08 04:12:22 +01:00
Justin Clark-Casey (justincc) c215b1ad16 If logging a client out due to ack timeout, do this asynchronously rather than synchronously on the outgoing packet loop.
This is the same async behaviour as normal logouts.
This is necessary because the event queue will sleep the thread for 5 seconds on an ack timeout logout as the client isn't around to pick up the final event queue messages.
2012-06-08 03:53:03 +01:00
Justin Clark-Casey (justincc) 5f4f9f0230 Add regression test for client logout due to ack timeout. 2012-06-08 03:12:23 +01:00
Justin Clark-Casey (justincc) d73805d7f4 Remove null checks at top of LLUDPServer.ProcessInPacket(). Neither packet nor client are ever null. 2012-06-08 01:51:28 +01:00
Justin Clark-Casey (justincc) d71c6dea7e Store already retrieve IClientAPI in IncomingPacket structure for later use rather than doing another retrieve on dequeue.
Instead of checking whether the client still exists by trying to retrieve again from the client manager, this patch gets it back from IncomingPacket and checks the IClientAPI.IsActive state.
2012-06-08 01:43:58 +01:00
Justin Clark-Casey (justincc) 7550b97e65 Log warning if we try to remove a UDP client that has already been removed. 2012-06-07 04:00:29 +01:00
Justin Clark-Casey (justincc) 98b46d48fe Allow the thread watchdog to accept an alarm method that is invoked if the timeout is breached.
This alarm can then invoke this to log extra information.
This is used in LLUDPServer to show which client was being processed when incoming and outgoing udp watchdog alarms are triggered.
2012-06-07 02:44:13 +01:00
Talun 008c6a4610 Mantis 4597 AgentPaused packet is ignored.
The packet was actually being handled but not acted on.
This change extends the default timeout for paused clients to 5 minutes
and makes both the paused and non-paused timeout periods configurable.
2012-06-05 01:22:05 +01:00
Justin Clark-Casey (justincc) cb6791fb30 Tweak log messages on local region to region teleport path to help with problem resolution. 2012-04-26 22:35:25 +01:00
Justin Clark-Casey (justincc) b0cbf16c19 minor: Add region name to dropped inbound packet message 2012-04-26 16:04:49 +01:00
Justin Clark-Casey (justincc) f67f37074f Stop spurious scene loop startup timeout alarms for scenes with many prims.
On the first frame, all startup scene objects are added to the physics scene.
This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame.
This commit also slightly changes the behaviour of timeout reporting.
Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check.
Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
2012-02-24 05:02:33 +00:00
Justin Clark-Casey (justincc) 80ec2ac167 Correct a bug introduced in 1f402fdf (Feb 7 2012) where the delete friends grid call would try and contact the wrong uri. Also fixes the build from df960d5 2012-02-16 01:39:12 +00:00
Justin Clark-Casey (justincc) df960d5767 Add known identity informatio nto log message if an exception is thrown during LLUDPServer.HandleUseCircuitCode() 2012-02-16 01:25:54 +00:00
Justin Clark-Casey (justincc) 5e445aaf7b Fix "Abnormal client thread terminations" stat in period CONNECTION STATISTICS to count the number of times clients are disconnected due to ack timeouts.
This has been broken for a long period and would only ever show 0.
2012-01-24 22:09:13 +00:00
Justin Clark-Casey (justincc) 50eebb5cba Don't reply with an ack packet if the client is not authorized. 2011-12-08 22:00:59 +00:00
Justin Clark-Casey (justincc) 32d0ef89c6 Extend TestAddClient() to check that the first packet received is an ack packet 2011-12-08 21:45:02 +00:00
Justin Clark-Casey (justincc) bc13855e64 Reactivate BasicCircuitTests.TestAddClient()
This checks that the initial UseCircuitCode packet is handled correctly for a normal client login.
2011-12-08 20:52:34 +00:00
Justin Clark-Casey (justincc) 0e265889dd Remove unnecessary AgentCircuitData null check from Scene.AddNewClient().
The only caller is the LLUDP stack and this has to validate the UDP circuit itself, so we know that it exists.
This allows us to eliminate another null check elsewhere and simplifies the method contract
2011-12-08 19:25:24 +00:00
Justin Clark-Casey (justincc) f61e54892f On a new client circuit, send the initial reply ack to let the client know it's live before sending other data.
This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before.
This may stop some avatars appearing grey on login.
This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity
This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces
2011-12-08 18:34:23 +00:00
Justin Clark-Casey (justincc) f9ffd2538f Improve some method doc for LLUDPClient, LLUDPServer and UnackedPacketCollection 2011-10-12 19:22:30 +01:00
Justin Clark-Casey (justincc) 37ae6451f9 Remove vestigal RegionStatus.SlaveScene.
This appears to be code clutter since the code that uses this has long gone.
2011-10-03 23:25:09 +01:00