Commit Graph

2133 Commits (8b267b5bb547b807dd3cb6cd83ea03bd101e19ff)

Author SHA1 Message Date
Robert Adams 0b213af675 Fix problem of hurricane speed winds. Thanks Vegaslon. 2014-02-22 15:04:28 -08:00
Justin Clark-Casey (justincc) bc7fda39b4 Merge branch 'justincc-master' 2014-02-12 23:23:56 +00:00
Justin Clark-Casey (justincc) e10012a7a6 If a caller tries to queue a CAPs message to a scene presence that has no event queue (e.g. an NPC), only warn if event queue debugging is greater than zero.
Removes the spurious log warnings if groups are active when NPCs are used.
Adds more regression tests associated with adding messages to the event queue
2014-02-12 23:18:10 +00:00
Robert Adams c0cc5e0fa4 varregion: Send large region patches for wind and clouds. 2014-02-11 21:07:55 -08:00
Melanie 49c2213a01 Dropping the rest of Avination's modified appearance code for core.
Module to follow.
2014-02-04 01:54:16 +00:00
Robert Adams 4faf11e001 varregion: fix for teleporting by double clicking on a map location.
Thanks Garmin.
2014-01-28 08:49:22 -08:00
Robert Adams 4c362a83f9 Merge branch 'master' into varregion 2014-01-21 11:31:51 -08:00
Mic Bowman 83626e60e6 Adds a configuration option to cannibalize bandwidth from the
udp texture throttle and move it to the task throttle. Since most
viewers are using http textures, the udp texture throttle is holding
onto bw that could be used for more responsive prims updates. See
the documentation for CannibalizeTextureRate in OpenSimDefaults.ini.
Option is disabled by default.
2014-01-20 18:59:43 -08:00
Robert Adams cc5cffc212 varregion: properly pack the region size parameters so he viewer will parse them.
This gets rid of the viewer crash when teleporting into varregions and allows
multiple, adjacent varregions (of the same size) with border crossings.
2014-01-11 22:00:52 -08:00
Robert Adams 1eea6fd452 varregion: Debug messages for region crossing debugging. 2014-01-11 22:00:24 -08:00
Robert Adams 1cf17a3cf7 Merge branch 'master' into varregion
Conflicts:
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/Framework/Scenes/SceneBase.cs
	OpenSim/Services/Interfaces/IGridService.cs
	OpenSim/Services/LLLoginService/LLLoginResponse.cs
(conflicts were debug statements that are commented out in master branch)
2014-01-11 08:52:23 -08:00
Melanie 9050c152b4 Dynamically adjust to the number of visual params sent. 2014-01-10 20:31:52 +00:00
Justin Clark-Casey (justincc) 32e9c16957 Merge branch 'justincc-master' 2014-01-08 01:04:26 +00:00
Justin Clark-Casey (justincc) 0155d42b80 If an agent is sitting, then do send the rotation in the agent update instead of zeroing it to resolve mouselook camera problems
Addresses http://opensimulator.org/mantis/view.php?id=6892
Thanks to tglion for this spot.
This resolves a recent regression from 17b32b764a
2014-01-08 00:54:39 +00:00
Robert Adams 7e32313a49 varregion: Add region size to teleport event messages (EnableSimulator,
CorssRegion, TeleportFinishEvent).
Have Simian grid service return the region size.
Many teleport related debug log messages. Can be removed when teleport
works (like that's ever going to happen).

Conflicts:

	OpenSim/Framework/RegionInfo.cs
2014-01-04 19:01:04 -08:00
Melanie dd96fef940 Dynamically adjust to the number of visual params sent. 2014-01-04 21:18:37 +00:00
Robert Adams 9984ecf862 varregion: Add region size to teleport event messages (EnableSimulator,
CorssRegion, TeleportFinishEvent).
Have Simian grid service return the region size.
Many teleport related debug log messages. Can be removed when teleport
works (like that's ever going to happen).
2014-01-03 07:41:06 -08:00
Robert Adams a01862509e Merge branch 'master' into varregion 2013-12-20 06:52:28 -08:00
Justin Clark-Casey (justincc) 68773ee7c4 Merge branch 'justincc-master' 2013-12-19 01:41:04 +00:00
Justin Clark-Casey (justincc) a5ca15c428 Create regression test TestSendAgentGroupDataUpdate() for groups agent data sending 2013-12-18 23:35:38 +00:00
Robert Adams 6937eec258 Merge branch 'master' into varregion
Add new region crossing code to varregion

Conflicts:
	OpenSim/Region/CoreModules/Framework/EntityTransfer/EntityTransferModule.cs
	OpenSim/Region/Framework/Scenes/ScenePresence.cs
2013-12-17 06:18:13 -08:00
Robert Adams 13a9a4b653 varregion: rename 'LegacyRegionLocX' back to 'RegionLocX' and same for Y and Z.
Rename 'RegionWorldLocX' to 'WorldLocX' and same for Y and Z.
This keeps the downward compatibility and follows the scheme of 'region'
and 'world' location naming that is happening in the Util module.
2013-12-14 07:53:01 -08:00
Melanie 5b73b9c4a8 Committing the Avination Scene Presence and related texture code
- Parts of region crossing code
- New bakes handling code
- Bakes now sent from sim to sim without central storage
- Appearance handling changes
- Some changes to sitting
- A number of unrelated fixes and improvements
2013-12-11 01:39:56 +00:00
Robert Adams 4eb52eb19e Merge branch 'master' into varregion 2013-12-05 21:07:44 -08:00
Justin Clark-Casey (justincc) bb4f4d9480 minor: Use enums for setting inv/asset types on data upload rather than magic numbers 2013-12-06 00:38:18 +00:00
Justin Clark-Casey (justincc) 16aaba77d4 Properly set InventoryType.Snapshot when a snapshot is uploaded
Resolves http://opensimulator.org/mantis/view.php?id=6857
This prevents the inventory service complaining later about an attempt to change an invariant
2013-12-06 00:30:44 +00:00
Justin Clark-Casey (justincc) 17b32b764a Fix regression where mouse look flight direction no longer worked by zeroing x/y rot before sending agent updates, instead of before any agent update processing
It turns out that the x/y rot data in mouselook is needed to implement this and to push the avatar against the ground if walking in mouselook.
Doing this in the terse send so that we preserve mouselook rotation information
2013-12-05 02:10:46 +00:00
Robert Adams 31bacfbb63 Merge branch 'master' into varregion 2013-12-01 15:51:42 -08:00
Justin Clark-Casey (justincc) 8b3a4367ea Still send CameraEyeOffset in UDP SendSitReponse even if at offset is Vector3.Zero 2013-11-29 02:51:35 +00:00
Justin Clark-Casey (justincc) ca079c378a Merge branch 'link-sitting' 2013-11-29 02:41:32 +00:00
Justin Clark-Casey (justincc) 0785210e29 Fix stand positions rather than having the stand jump to the root prim. 2013-11-27 02:08:22 +00:00
Justin Clark-Casey (justincc) 60e049ea39 Revert "Fix issue where sitting on non-root linked prims would send camera to wrong position in third-person and mouselook"
Reverting to place on separate branch

This reverts commit ff4e7de776.
2013-11-23 02:31:39 +00:00
Justin Clark-Casey (justincc) a68d1fad73 Revert "Still send CameraEyeOffset in UDP SendSitReponse even if at offset is Vector3.Zero"
This reverts commit 9bdd3dc7de.
2013-11-23 02:29:14 +00:00
Justin Clark-Casey (justincc) 9bdd3dc7de Still send CameraEyeOffset in UDP SendSitReponse even if at offset is Vector3.Zero
As far as I can see it's valid to change the eye offset even if you aren't changing the at target.
2013-11-23 01:12:20 +00:00
Justin Clark-Casey (justincc) ff4e7de776 Fix issue where sitting on non-root linked prims would send camera to wrong position in third-person and mouselook
We now specify sits as offsets from the root prim, as the viewer expects.
2013-11-23 00:53:09 +00:00
Robert Adams a75ce7423c Merge branch 'master' into varregion 2013-11-05 21:42:27 -08:00
Latif Khalifa 26fd29622d Added sending (for now hard-coded) sim isze in SendMapBlockSplit() 2013-11-06 03:52:04 +01:00
Justin Clark-Casey (justincc) 8e1bf55e7b Add IncomingPacketsResentCount clientstack statistics
This records how many packets were indicated to be resends by clients
Not 100% reliable since clients can lie about resends, but usually would indicate if clients are not receiving UDP acks at all or in a manner they consider timely.
2013-11-06 01:02:20 +00:00
Robert Adams c931b16c1f Merge branch 'master' into varregion 2013-11-04 22:12:57 -08:00
Robert Adams f2810bf03a varregion: add plumbing to pass region size from Scene down to the
physics engine.
Older physics engines will default to the legacy region size.
Update BulletSim to use the new region size information.
2013-11-04 22:10:54 -08:00
Robert Adams 92c06a5d0b varregion: fix lawn-mower terrain fill so it works for non-square regions.
Add some debugging logs on region creation to report region size.
2013-11-01 16:37:27 -07:00
Justin Clark-Casey (justincc) 4c4a1cf715 Start counting resent packets in the places that I missed when the stat was first added a few commits ago 2013-10-31 23:59:22 +00:00
Justin Clark-Casey (justincc) 50794c9008 minor: remove mono compiler warnings in AvatarPickerSearchModule and UploadBakedTextureModule 2013-10-31 23:51:01 +00:00
Justin Clark-Casey (justincc) 3d5a7e9b19 Add OutgoingPacketsResentCount clientstack stat.
This allows one to monitor the total number of messages resent to clients over time.
A constantly increasing stat may indicate a general server network or overloading issue if a fairly high proportion of packets sent
A smaller constantly increasing stat may indicate a problem with a particular client-server connection, would need to check "show queues" in this case.
2013-10-31 23:45:52 +00:00
Robert Adams 39777db8ef varregion: fix problem of X/Y dimensions swapped and incorrect terrain
compression base computation.
Complete replacement of float[] for terrain heightmap with TerrainData instance.
2013-10-31 09:24:06 -07:00
Robert Adams 2be0347f50 Merge branch 'master' into varregion 2013-10-28 09:30:26 -07:00
Justin Clark-Casey (justincc) df76e52310 minor: Add commented out code for apparent passing of texture IDs in ObjectProperties UDP replies to viewer
Not yet shown that this is used or resolves a bug where not all textures appear on objects with an "XML with textures" upload from singularity 1.8.3
Proper texture entries are actually present and appear properly on relog, but not on select from viewer until at least one face texture is changed.
2013-10-24 23:00:02 +01:00
Justin Clark-Casey (justincc) cccdfcb59e Comment out LLUDPServer.BroadcastPacket() to reduce code complexity. Appears to be a never used method. 2013-10-24 00:37:49 +01:00
Justin Clark-Casey (justincc) 5d61c4039d Only set the data present event if we actually queued an outoing packet (not if we sent immediately) 2013-10-24 00:33:14 +01:00
Robert Adams 86bf79aa2b Merge branch 'master' into varregion 2013-10-07 13:58:17 -07:00
Robert Adams 7416809077 varregion: plug in TerrainData class and modify TerrainModule and LLClientView to use same. This passes a terrain info class around rather than passing a one dimensional array thus allowing variable regions. Update the database storage for variable region sizes. This should be downward compatible (same format for 256x256 regions). 2013-10-07 13:57:40 -07:00
Justin Clark-Casey (justincc) 42bdf44658 Bump OPenSimulator version and assembly versions up to 0.8.0 Dev 2013-10-04 23:33:47 +01:00
Robert Adams 8c1d80fdfd varregion: serious rework of TerrainChannel:
-- addition of varaible region size in X and Y
    -- internal storage of heightmap changed from double[] to short[]
    -- helper routines for handling internal structure while keeping existing API
    -- to and from XML that adds region size information (for downward compatibility,
        output in the legacy XML format if X and Y are 256)
Updated and commented Constants.RegionSize but didn't change the name for compatibility.
2013-09-28 07:33:56 -07:00
Robert Adams 317c04fe17 VarRegion: change RegionInfo storage of region coordinates from region
count number to integer world coordinates.
Added new methods RegionWorldLoc[XY].
Refactored name of 'RegionLoc*' to 'LegacyRegionLoc*' throughout OpenSim.
Kept old 'RegionLoc*' entrypoint to RegionInfo for downward compatability
of external region management packages.
2013-09-28 07:33:52 -07:00
Justin Clark-Casey (justincc) 2cd95fac73 refactor: Rename Scene.AddNewClient() to AddNewAgent() to make it obvious in the code that this is symmetric with CloseAgent() 2013-09-27 22:27:39 +01:00
Justin Clark-Casey (justincc) b16bc7b01c refactor: rename Scene.IncomingCloseAgent() to CloseAgent() in order to make it clear that all non-clientstack callers should be using this rather than RemoveClient() in order to step through the ScenePresence state machine properly.
Adds IScene.CloseAgent() to replace RemoveClient()
2013-09-27 19:14:21 +01:00
Justin Clark-Casey (justincc) 32ddfc2740 Reinsert client.SceneAgent checks into LLUDPServer.HandleCompleteMovementIntoRegion() to fix race condition regression in commit 7dbc93c (Wed Sep 18 21:41:51 2013 +0100)
This check is necessary to close a race condition where the CompleteAgentMovement processing could proceed when the UseCircuitCode thread had added the client to the client manager but before the ScenePresence had registered to process the CompleteAgentMovement message.
This is most probably why the message appeared to get lost on a proportion of entity transfers.
A better long term solution may be to set the IClientAPI.SceneAgent property before the client is added to the manager.
2013-09-25 18:45:56 +01:00
Justin Clark-Casey (justincc) 732554be04 Reinsert 200ms sleep accidentally removed in commit 7dbc93c (Wed Sep 18 21:41:51 2013 +0100) 2013-09-25 18:29:14 +01:00
Justin Clark-Casey (justincc) f384a6291e Instead of swallowing any socket begin/end receive exceptions, log them for debugging purposes.
This may reveal why on some teleports with current code, the UseCircuitCode message gets through but CompleteMovement disappears into the ether.
2013-09-25 00:02:17 +01:00
Aleric Inglewood 2dc92e7de1 Preserve attachment point & position when attachment is rezzed in world
Patch taken from
http://opensimulator.org/mantis/view.php?id=4905
originally by Greg C.

Fixed to apply to r/23314 commit
ba9daf849e
(cherry picked from commit 4ff9fbca441110cc2b93edc7286e0e9339e61cbe)
2013-09-22 21:10:01 -05:00
Justin Clark-Casey (justincc) f4d82a56f4 Double the time spent waiting for a UseCircuitCode packet in LLUDPServer.HandleCompleteMovementIntoRegion()
This is to deal with one aspect of http://opensimulator.org/mantis/view.php?id=6755
With the V2 teleport arrangements, viewers appear to send the single UseCircuitCode and CompleteAgentMovement packets immediately after each other
Possibly, on occasion a poor network might drop the initial UseCircuitCode packet and by the time it retries, the CompleteAgementMovement has timed out and the teleport fails.
There's no apparant harm in doubling the wait time (most times only one wait will be performed) so trying this.
2013-09-18 22:09:46 +01:00
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
Justin Clark-Casey (justincc) 5a2d4d888c Hack in console command "debug lludp toggle agentupdate" to allow AgentUpdate in packets to be discarded at a very early stage.
Enabling this will stop anybody from moving on a sim, though all other updates should be unaffected.
Appears to make some cpu difference on very basic testing with a static standing avatar (though not all that much).
Need to see the results with much higher av numbers.
2013-07-21 08:58:21 -07:00
Justin Clark-Casey (justincc) 66048e1a70 minor: provide user feedback in the log for now when udp in/out bound threads are started/stopped 2013-07-21 08:58:02 -07:00
Justin Clark-Casey (justincc) 3a476bf60c Fix up a temporary debugging change from last commit which stopped "lludp stop out" from actually doing anything 2013-07-21 08:57:36 -07:00
Justin Clark-Casey (justincc) 63c42d6602 Do some simple queue empty checks in the main outgoing udp loop instead of always performing these on a separate fired thread.
This appears to improve cpu usage since launching a new thread is more expensive than performing a small amount of inline logic.
However, needs testing at scale.
2013-07-21 08:56:48 -07:00
Diva Canto b5062ae7ee Changed the timoeut of EQ 502s (no events) to 50 secs. The viewer post requests timeout in 60 secs.
There's plenty of room for improvement in handling the EQs. Some other time...
2013-07-18 13:30:04 -07:00
Justin Clark-Casey (justincc) d9d995914c try Hacking in an AutoResetEvent to control the outgoing UDP loop instead of a continuous loop with sleeps.
Does appear to have a cpu impact but may need further tweaking
2013-07-18 12:28:02 -07:00
Diva Canto 9e35b069a4 Reverting the reverts I did yesterday. cpu-branch has now been
successfully tested, and I'm merging back those changes, which proved to
be good.
Revert "Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:""

This reverts commit fa2370b32e.
2013-07-18 12:23:27 -07:00
Diva Canto fa2370b32e Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:"
This reverts commit e46459ef21.
2013-07-17 15:05:36 -07:00
Diva Canto e46459ef21 Cleared up much confusion in PollServiceRequestManager. Here's the history:
When Melanie added the web fetch inventory throttle to core, she made the long poll requests (EQs) effectively be handled on an active loop. All those requests, if they existed, were being constantly dequeued, checked for events (which most often they didn't have), and requeued again. This was an active loop thread on a 100ms cycle!
This fixes the issue. Now the inventory requests, if they aren't ready to be served, are placed directly back in the queue, but the long poll requests aren't placed there until there are events ready to be sent or timeout has been reached.
This puts the LongPollServiceWatcherThread back to 1sec cycle, as it was before.
2013-07-17 11:19:36 -07:00
dahlia 6dd454240f revert last commit which seems to conflict with DoubleQueue internals. The random crash might be in DoubleQueue instead. See http://pastebin.com/XhNBNqsc 2013-07-16 02:03:01 -07:00
dahlia 70aa77f520 add locking to internal queue in WebFetchInvDescModule; lack of which caused a random crash in a load test yesterday 2013-07-16 01:31:09 -07:00
Justin Clark-Casey (justincc) e8e073aa97 Simplify EventQueue cap setup so that it is also stat monitored.
Curiously, the number of requests received is always one greater than that shown as handled - needs investigation
2013-07-16 00:05:45 +01:00
Justin Clark-Casey (justincc) eb14e5a175 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2013-07-15 23:28:02 +01:00
Justin Clark-Casey (justincc) 1b7b664c86 Add request received/handling stats for caps which are served by http poll handlers.
This adds explicit cap poll handler supporting to the Caps classes rather than relying on callers to do the complicated coding.
Other refactoring was required to get logic into the right places to support this.
2013-07-15 23:27:46 +01:00
Diva Canto 68fbf7eebb Revert "Puts RequestImage (UDP) back to asyn -- CPU spike hunt"
This reverts commit b060ce96d9.
2013-07-15 12:34:10 -07:00
Diva Canto 687c1a420a Guard against null ref 2013-07-15 12:33:31 -07:00
Diva Canto b060ce96d9 Puts RequestImage (UDP) back to asyn -- CPU spike hunt 2013-07-15 12:05:31 -07:00
Diva Canto 864f15ce4d Revert the revert
Revert "Trying to hunt the CPU spikes recently experienced."

This reverts commit ac73e70293.
2013-07-15 11:52:26 -07:00
Diva Canto ac73e70293 Trying to hunt the CPU spikes recently experienced.
Revert "Comment out old inbound UDP throttling hack. This would cause the UDP"

This reverts commit 38e6da5522.
2013-07-15 11:27:49 -07:00
Diva Canto a412b1d682 Moved SendInitialDataToMe to earlier in CompleteMovement. Moved TriggerOnMakeRootAgent to the end of CompleteMovement.
Justin, if you read this, there's a long story here. Some time ago you placed SendInitialDataToMe at the very beginning of client creation (in LLUDPServer). That is problematic, as we discovered relatively recently: on TPs, as soon as the client starts getting data from child agents, it starts requesting resources back *from the simulator where its root agent is*. We found this to be the problem behind meshes missing on HG TPs (because the viewer was requesting the meshes of the receiving sim from the departing grid). But this affects much more than meshes and HG TPs. It may also explain cloud avatars after a local TP: baked textures are only stored in the simulator, so if a child agent receives a UUID of a baked texture in the destination sim and requests that texture from the departing sim where the root agent is, it will fail to get that texture.
Bottom line: we need to delay sending the new simulator data to the viewer until we are absolutely sure that the viewer knows that its main agent is in a new sim. Hence, moving it to CompleteMovement.
Now I am trying to tune the initial rez delay that we all experience in the CC. I think that when I fixed the issue described above, I may have moved SendInitialDataToMe to much later than it should be, so now I'm moving to earlier in CompleteMovement.
2013-07-13 09:46:58 -07:00
Diva Canto 29f6ae199e Changed UploadBakedTextureModule so that it uses the same pattern as the others, in preparation for experiments to direct baked texture uploads to a robust instance. No functional or configuration changes -- should work exactly as before. 2013-07-12 12:53:58 -07:00
Diva Canto 604967b31e Switched UUIDNameRequest and RegionHandleRequest to Sync, because now they are also non-blocking handlers. 2013-07-11 09:47:46 -07:00
Diva Canto 3b48b6a792 Switched TransferRequest (UDP packet handler) to sync. The permissions checks may block, so they get a FireAndForget. Everything else is non-blocking. 2013-07-11 09:44:48 -07:00
Diva Canto 9173130fde Switched RegionHandshakeReply to Sync, because it's not doing anything blocking. 2013-07-10 20:48:13 -07:00
Diva Canto fe5da43d15 EXPERIMENTAL: make RequestImage (UDP packet handler) sync instead of async. This _shouldn't_ screw things up, given that all this does is to dump the request in a queue. 2013-07-10 19:29:14 -07:00
Diva Canto 1b265b213b Added show client-stats [first last] command to expose what viewers are requesting. 2013-07-10 16:09:45 -07:00
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) 095066b1ce Handle UUIDNameRequest UDP packet processing async instead of within the main inbound UDP processing loop, to avoid any chance that this is delaying the main udp in loop.
The potential impact of this should be lower now that these requests are being placed on a queue.
2013-07-09 23:39:29 +01:00
Justin Clark-Casey (justincc) 013710168b For stat purposes, add names to capability request handlers where these were not set 2013-07-08 22:39:07 +01:00
Justin Clark-Casey (justincc) e19defde36 Add "show caps stats by user" and "show caps stats by cap" console commands to print various counts of capability invocation by user and by cap
This currently prints caps requests received and handled, so that overload of received compared to handled or deadlock can be detected.
This involves making BaseStreamHandler and BaseOutputStream record the ints, which means inheritors should subclass ProcessRequest() instead of Handle()
However, existing inheriting classes overriding Handle() will still work, albeit without stats recording.
"show caps" becomes "show caps list" to disambiguate between show caps commands
2013-07-08 22:03:07 +01:00
Justin Clark-Casey (justincc) 98de67d573 Fix mono warning in LLImageManagerTests 2013-07-06 00:55:14 +01:00
Justin Clark-Casey (justincc) 55ac8c83c7 Get InventoryWorkerThreads to update watchdog on processing requests 2013-07-06 00:34:22 +01: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 ccca005969 HG: close a loophole by which if something was wrong with the ServiceURLs it resulted in never ending asset requests 2013-07-02 13:29:44 -07:00
Justin Clark-Casey (justincc) 713a14a6b5 minor: remove mono compiler warnings in WebFetchInvDescModule 2013-06-17 23:23:56 +01:00
Justin Clark-Casey (justincc) b9dac1f8df Fix test failure in BasicCircuitTests from previous commit 0d2fd0d9 2013-06-17 23:17:55 +01:00
Justin Clark-Casey (justincc) d412c1b0eb Don't try to abort worker threads in WebFetchInvDescModule if module was not enabled.
This also moves the abort to RemoveRegion() rather than a destructor.
2013-06-14 23:53:20 +01:00
Melanie 3a722ef81b Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2013-06-07 23:59:02 +01:00