Commit Graph

1972 Commits (7dbc93c62a6803fbe201e933b8bc1374b48869ad)

Author SHA1 Message Date
Justin Clark-Casey (justincc) 7dbc93c62a Change logging to provide more information on LLUDPServer.HandleCompleteMovementIntoRegion()
Add more information on which endpoint sent the packet when we have to wait and if we end up dropping the packet
Only check if the client is active - other checks are redundant since they can only failed if IsActve = false
2013-09-18 21:41:51 +01:00
Mic Bowman b29e9d37e7 Change handling of the FetchInventoryDescendents2 capability configuration to allow
for external handlers.
2013-09-11 12:15:16 -07:00
Justin Clark-Casey (justincc) 857f24a5e2 Fix bug where users teleporting to non-neighbour regions could continue to hear chat from their source region for some time after teleport completion.
This occurs on v2 teleport since the source region now waits 15 secs before closing the old child agent, which could still receive chat.
This commit introduces a ScenePresenceState.PreClose which is set before the wait, so that ChatModule can check for ScenePresenceState.Running.
This was theoretically also an issue on v1 teleport but since the pause before close was only 2 secs there, it was not noticed.
2013-09-02 19:15:10 +01:00
Justin Clark-Casey (justincc) a0c99a7dcc minor: remove mono compiler warning from LLClientView 2013-08-23 00:03:47 +01:00
Justin Clark-Casey (justincc) 1f39a763a5 Don't allow users to attempt to sit on objects in a child region without going to that region first.
If this is attempted, they get a "Try moving closer.  Can't sit on object because it is not in the same region as you." message instead, which is the same as current ll grid.
Sitting on ground is okay, since viewer navigates avatar to required region first before sitting.
2013-08-21 21:35:03 +01:00
Justin Clark-Casey (justincc) 7d268912f1 Packet headers are not zero-encoded so don't try to zero-decode these in PacketPool.GetType()
Instead adjusts code with that from Packet.BuildHeader(byte[], ref int, ref int):Header in libomv
This stops packet decoding failures with agent UUIDs that contain 00 in their earlier parts (e.g. b0b0b0b0-0000-0000-0000-000000000211)
Thanks to lkalif for pointing this out.
2013-08-16 00:58:25 +01:00
Justin Clark-Casey (justincc) 104626d732 minor: Comment out AvatarPicketSearch caps log message for now, which is occuring on every login and entity transfer 2013-08-14 23:22:52 +01:00
Justin Clark-Casey (justincc) 93dffe1777 Add stat clientstack.<scene>.IncomingPacketsOrphanedCount to record well-formed packets that were not initial connection packets and could not be associated with a connected viewer. 2013-08-14 22:33:12 +01:00
Justin Clark-Casey (justincc) 0d5680e971 Count any incoming packet that could not be recognized as an LLUDP packet as a malformed packet. Record this as stat clientstack.<scene>.IncomingPacketsMalformedCount
Used to detect if a simulator is receiving significant junk UDP
Decimates the number of packets between which a warning is logged and prints the IP source of the last malformed packet when logging
2013-08-14 22:08:28 +01:00
Justin Clark-Casey (justincc) f3edc0d8b7 minor: Extend warning message when adding trying to add an event for a client without a queue to include the event message name. 2013-08-12 19:38:23 +01:00
Justin Clark-Casey (justincc) 97bcb59bee Merge branch 'TeleportWork' 2013-08-09 17:52:29 +01:00
Justin Clark-Casey (justincc) b1c26a56b3 Fix an issue where under teleport v2 protocol, teleporting from regions in an line from A->B->C would not close region A when reaching C
The root cause was that v2 was only closing neighbour agents if the root connection also needed a close.
However, fixing this requires the neighbour regions also detect when they should not close due to re-teleports re-establishing the child connection.
This involves restructuring the code to introduce a scene presence state machine that can serialize the different add and remove client calls that are now possible with the late close of the
This commit appears to fix these issues and improve teleport, but still has holes on at least quick reteleporting (and possibly occasionally on ordinary teleports).
Also, has not been completely tested yet in scenarios where regions are running on different simulators
2013-08-08 23:29:30 +01:00
teravus 99a4a91488 * This makes in-world terrain editing smoother, even in MegaRegions. This change only affects the editing user's experience. Non-editing users will see nothing different from the current 'slow' result. See comments for the thought process and how the issues surrounding terrain editing, cache, bandwidth, threading, terrain patch reliability and throttling were balanced. 2013-08-07 21:22:04 -05:00
Justin Clark-Casey (justincc) f9dc5815c4 For LLImageManagerTests, make tests execute under synchronous fire and forget conditions.
I generally prefer this approach for regression tests because of the complexity of accounting for different threading conditions.
2013-08-05 23:15:30 +01:00
Diva Canto 5b4b349776 Fix the failing TestSendImage. J2K decoding is async. 2013-08-03 21:27:32 -07:00
Justin Clark-Casey (justincc) 68b98a8003 minor: Add name to debug lludp packet level feedback on console 2013-08-01 23:16:41 +01:00
Justin Clark-Casey (justincc) 0c4c084bed Try a different approach to slow terrain update by always cycling the loop immediately if any data was sent, rather than waiting.
What I believe is happening is that on initial terrain send, this is done one packet at a time.
With WaitOne, the outbound loop has enough time to loop and wait again after the first packet before the second, leading to a slower send.
This approach instead does not wait if a packet was just sent but instead loops again, which appears to lead to a quicker send without losing the cpu benefit of not continually looping when there is no outbound data.
2013-08-01 18:12:28 +01:00
Justin Clark-Casey (justincc) 932c382737 Revert "Issue: painfully slow terrain loading. The cause is commit d9d995914c (r/23185) -- the WaitOne on the UDPServer. Putting it back to how it was done solves the issue. But this may impact CPU usage, so I'm pushing it to test if it does."
This reverts commit 59b461ac0e.
2013-08-01 18:11:50 +01:00
Diva Canto 59b461ac0e Issue: painfully slow terrain loading. The cause is commit d9d995914c (r/23185) -- the WaitOne on the UDPServer. Putting it back to how it was done solves the issue. But this may impact CPU usage, so I'm pushing it to test if it does. 2013-08-01 09:27:44 -07:00
Mic Bowman 1299592405 Experimental comment to eneralize the handling of Linden caps when the
cap is something other than "localhost". A new interface for handling
external caps is supported with an example implemented for Simian. The
only linden cap supporting this interface right now is the GetTexture
cap.
2013-07-31 15:37:15 -07:00
Diva Canto fd050fca7c Doing the HG Map / SimulatorFeatures "the right way": moved it to HGMapModule, hooking on to SimulatorFeatures.OnSimulatorFeaturesRequest event (similar to what the DynamicMenuModule does).
Only HG Visitors get this var, to avoid spamming local users.
The config var  is now called MapTileURL, to be consistent with the login one, and its being picked up from either [LoginService], [HGWorldMap] or [SimulatorFeatures], just because I have a bad memory.
2013-07-30 21:10:00 -07:00
Diva Canto 590a8b0315 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2013-07-30 17:27:32 -07:00
Diva Canto 2b54199271 After talking to lkalif on the IRC: SimulatorFeatures response: renamed the OSDMap GridServices to OpenSimExtras, normalized the url keys under it, and moved ExportEnabled to under it too. Melanie: change your viewer code accordingly.
Documentation at http://opensimulator.org/wiki/SimulatorFeatures_Extras
2013-07-30 17:26:56 -07:00
Justin Clark-Casey (justincc) 1416c90932 minor: Add timeout secs to connection timeout message. Change message to reflect it is a timeout due to no data received rather than an ack issue. 2013-07-29 23:53:59 +01:00
Justin Clark-Casey (justincc) 8004e6f31c Fix issue just introduced in 8efe4bfc2e where I accidentally left in a test line to force very quick client unack 2013-07-29 23:38:54 +01:00
Justin Clark-Casey (justincc) 8efe4bfc2e Make "abnormal thread terminations" into "ClientLogoutsDueToNoReceives" and add this to the StatsManager
This reflects the actual use of this stat - it hasn't recorded general exceptions for some time.
Make the sim extra stats collector draw the data from the stats manager rather than maintaing this data itself.
2013-07-29 23:18:29 +01:00
Diva Canto 69975763d2 Several major improvements to group (V2) chat. Specifically: handle join/drop appropriately, invitechatboxes.
The major departure from flotsam is to send only one message per destination region, as opposed to one message per group member. This reduces messaging considerably in large groups that have clusters of members in certain regions.
2013-07-27 15:38:56 -07:00
Diva Canto d5367a219d Slight improvement: no need to delay the removal of the queues in EQ, because DisableSimulator is now being sent via UDP 2013-07-26 07:39:57 -07:00
Diva Canto 878ce1e6b2 This should fix all issues with teleports. One should be able to TP as fast as needed. (Although sometimes Justin's state machine kicks in and doesn't let you) The EventQueues are a hairy mess, and it's very easy to mess things up. But it looks like this commit makes them work right. Here's what's going on:
- Child and root agents are only closed after 15 sec, maybe
- If the user comes back, they aren't closed, and everything is reused
- On the receiving side, clients and scene presences are reused if they already exist
- Caps are always recreated (this is where I spent most of my time!). It turns out that, because the agents carry the seeds around, the seed gets the same URL, except for the root agent coming back to a far away region, which gets a new seed (because we don't know what was its seed in the departing region, and we can't send it back to the client when the agent returns there).
2013-07-25 23:44:58 -07:00
Diva Canto cac37e298c Deleted all [ZZZ] debug messages. 2013-07-24 14:31:30 -07:00
Diva Canto e6a0f6e428 One more thing to test in order to let CompleteMovement go up the stack. 2013-07-24 14:29:51 -07:00
Diva Canto 14530b2607 Minor adjustment on timings of waits. 2013-07-24 14:29:37 -07:00
Diva Canto c0433d5e4c Changed the RegionHandshake packet to the Unknown queue, so that it is sent with high priority and hopefully gets to the client before AgentMovementComplete 2013-07-24 14:29:15 -07:00
Diva Canto 3891a8946b New Teleport protocol (V2), still compatible with V1 and older. (version of the destination is being checked)
In this new protocol, and as committed before, the viewer is not sent EnableSimulator/EstablishChildCommunication for the destination. Instead, it is sent TeleportFinish directly. TeleportFinish, in turn, makes the viewer send a UserCircuitCode packet followed by CompleteMovementIntoRegion packet. These 2 packets tend to occur one after the other almost immediately to the point that when CMIR arrives the client is not even connected yet and that packet is ignored (there might have been some race conditions here before); then the viewer sends CMIR again within 5-8 secs. But the delay between them may be higher in busier regions, which may lead to race conditions.
This commit improves the process so there are are no race conditions at the destination. CompleteMovement (triggered by the viewer) waits until Update has been sent from the origin. Update, in turn, waits until there is a *root* scene presence -- so making sure CompleteMovement has run MakeRoot. In other words, there are two threadlets at the destination, one from the viewer and one from the origin region, waiting for each other to do the right thing. That makes it safe to close the agent at the origin upon return of the Update call without having to wait for callback, because we are absolutely sure that the viewer knows it is in th new region.
Note also that in the V1 protocol, the destination was getting UseCircuitCode from the viewer twice -- once on EstablishAgentCommunication and then again on TeleportFinish. The second UCC was being ignored, but it shows how we were not following the expected steps...
2013-07-24 14:27:58 -07:00
Justin Clark-Casey (justincc) a57a472ab8 Add proper method doc and comments to m_dataPresentEvent (from d9d9959) 2013-07-23 00:51:59 +01:00
Justin Clark-Casey (justincc) 9fb9da1b6c Add clientstack.InboxPacketsCount stat. This records the number of packets waiting to be processed at the second stage (after initial UDP processing)
If this consistently increases then this is a problem since it means the simulator is receiving more requests than it can distribute to other parts of the code.
2013-07-23 00:35:41 +01:00
Justin Clark-Casey (justincc) 60732c96ef Add clientstack.OutgoingUDPSendsCount stat to show number of outbound UDP packets sent by a region per second 2013-07-23 00:35:34 +01:00
Justin Clark-Casey (justincc) 8396f1bd42 Record raw number of UDP receives as clientstack.IncomingUDPReceivesCount 2013-07-23 00:35:23 +01:00
Justin Clark-Casey (justincc) bf517899a7 Add AverageUDPProcessTime stat to try and get a handle on how long we're taking on the initial processing of a UDP packet.
If we're not receiving packets with multiple threads (m_asyncPacketHandling) then this is critical since it will limit the number of incoming UDP requests that the region can handle and affects packet loss.
If m_asyncPacketHandling then this is less critical though a long process will increase the scope for threads to race.
This is an experimental stat which may be changed.
2013-07-23 00:35:09 +01:00
Robert Adams e6b6af62dd Added check for user movement specification before discarding an incoming
AgentUpdate packet. This fixes the problem with vehicles not moving forward
after the first up-arrow.
Code to fix a potential exception when using different IClientAPIs.
2013-07-22 15:41:14 -07:00
Diva Canto 99a727600b Minor cosmetic changes. 2013-07-21 10:07:35 -07:00
Diva Canto 116a449d89 The quaternion delta was a bit to high, now that the head rotation is out of the equation. (head rotation was the problematic one) 2013-07-21 09:01:57 -07:00
Diva Canto b5ab0698d6 EDIT BEAMS!!! They had been missing from OpenSim since ever. Thanks to lkalif for telling me how to route the information. The viewer effect is under the distance filter, so only avatars with cameras < 10m away see the beams. 2013-07-21 09:01:44 -07:00
Diva Canto 3919c80505 A couple of small optimizations over the previous commit 2013-07-21 09:00:57 -07:00
Diva Canto d5a1779465 Manage AgentUpdates more sanely:
- The existing event to scene has been split into 2: OnAgentUpdate and OnAgentCameraUpdate, to better reflect the two types of updates that the viewer sends. We can run one without the other, which is what happens when the avie is still but the user is camming around
- Added thresholds (as opposed to equality) to determine whether the update is significant or not. I thin these thresholds are ok, but we can play with them later
- Ignore updates of HeadRotation, which were problematic and aren't being used up stream
2013-07-21 09:00:42 -07:00
Diva Canto 174105ad02 Fixed the stats in show client stats. Also left some comments with observations about AgentUpdates. 2013-07-21 09:00:27 -07:00
Justin Clark-Casey (justincc) 3a6acbcc14 furhter shorten CheckAgentUpdateSignificance(). No real perf impact. 2013-07-21 08:59:31 -07:00
Justin Clark-Casey (justincc) 866de53978 Remove some pointless code in CheckAgentUpdateSignificance() 2013-07-21 08:59:17 -07:00
Justin Clark-Casey (justincc) 61eda1f441 Make the check as to whether any particular inbound AgentUpdate packet is significant much earlier in UDP processing (i.e. before we pointlessly place such packets on internal queues, etc.)
Appears to have some impact on cpu but needs testing.
2013-07-21 08:58:55 -07:00
Justin Clark-Casey (justincc) e5c677779b Add measure of number of inbound AgentUpdates that were seen as significant to "show client stats" (i.e. sent on for further processing instead of being discarded)
Added here since it was the most convenient place
Number is in the last column, "Sig. AgentUpdates" along with percentage of all AgentUpdates
Percentage largely falls over time, most cpu for processing AgentUpdates may be in UDP processing as turning this off even earlier (with "debug lludp toggle agentupdate" results in a big cpu fall
Also tidies up display.
2013-07-21 08:58:39 -07:00