aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework (unfollow)
Commit message (Collapse)AuthorFilesLines
2013-07-17Now trying DoubleQueue instead of BlockingQueue for the ↵Diva Canto1-2/+2
PollServiceRequestManager.
2013-07-17I confuse myself. Let's try this variable name instead.Diva Canto1-3/+3
2013-07-17Do the same trick that dahlia did for Dequeue(timeout)Diva Canto1-2/+3
2013-07-17Putting the requests back in the queue while testing for count >0 is not the ↵Diva Canto1-3/+7
smartest move...
2013-07-17Didn't mean to commit this change in BlockingQueue.csDiva Canto1-1/+1
2013-07-17Cleared up much confusion in PollServiceRequestManager. Here's the history:Diva Canto3-49/+36
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-16minor: Add warning method doc about possibly inconsistent results returned ↵Justin Clark-Casey (justincc)1-1/+19
from BlockingQueue.Contains(), Count() and GetQueueArray()
2013-07-16Revert "Revert "MSDN documentation is unclear about whether exiting a lock() ↵Justin Clark-Casey (justincc)1-5/+8
block will trigger a Monitor.Wait() to exit, so avoid some locks that don't actually affect the state of the internal queues in the BlockingQueue class."" This reverts commit 21a09ad3ad42b24bce4fc04c6bcd6f7d9a80af08. After more analysis and discussion, it is apparant that the Count(), Contains() and GetQueueArray() cannot be made thread-safe anyway without external locking And this change appears to have a positive impact on performance. I still believe that Monitor.Exit() will not release any thread for Monitor.Wait(), as per http://msdn.microsoft.com/en-gb/library/vstudio/system.threading.monitor.exit%28v=vs.100%29.aspx so this should in theory make no difference, though mono implementation issues could possibly be coming into play.
2013-07-16Revert "MSDN documentation is unclear about whether exiting a lock() block ↵Justin Clark-Casey (justincc)1-8/+5
will trigger a Monitor.Wait() to exit, so avoid some locks that don't actually affect the state of the internal queues in the BlockingQueue class." This reverts commit 42e2a0d66eaa7e322bce817e9e2cc9a288de167b Reverting because unfortunately this introduces race conditions because Contains(), Count() and GetQueueArray() may now end up returning the wrong result if another thread performs a simultaneous update on m_queue. Code such as PollServiceRequestManager.Stop() relies on the count being correct otherwise a request may be lost. Also, though some of the internal queue methods do not affect state, they are not thread-safe and could return the wrong result generating the same problem lock() generates Monitor.Enter() and Monitor.Exit() under the covers. Monitor.Exit() does not cause Monitor.Wait() to exist, only Pulse() and PulseAll() will do this Reverted with agreement.
2013-07-16MSDN documentation is unclear about whether exiting a lock() block will ↵dahlia1-5/+8
trigger a Monitor.Wait() to exit, so avoid some locks that don't actually affect the state of the internal queues in the BlockingQueue class.
2013-07-15Add request received/handling stats for caps which are served by http poll ↵Justin Clark-Casey (justincc)5-51/+70
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-15This might address the following observed exception:Diva Canto1-1/+1
17:14:28 - [APPLICATION]: APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs Exception: System.InvalidOperationException: Operation is not valid due to the current state of the object at System.Collections.Generic.Queue`1[OpenSim.Region.ClientStack.Linden.WebFetchInvDescModule+aPollRequest].Peek () [0x00011] in /root/install/mono-3.1.0/mono/mcs/class/System/System.Collections.Generic/Queue.cs:158 at System.Collections.Generic.Queue`1[OpenSim.Region.ClientStack.Linden.WebFetchInvDescModule+aPollRequest].Dequeue () [0x00000] in /root/install/mono-3.1.0/mono/mcs/class/System/System.Collections.Generic/Queue.cs:140 at OpenSim.Framework.DoubleQueue`1[OpenSim.Region.ClientStack.Linden.WebFetchInvDescModule+aPollRequest].Dequeue (TimeSpan wait, OpenSim.Region.ClientStack.Linden.aPollRequest& res) [0x0004e] in /home/avacon/opensim_2013-07-14/OpenSim/Framework/Util.cs:2297
2013-07-14Authenticate ChildAgentUpdate too.Diva Canto2-2/+3
2013-07-12Add ToOSDMap() overrides to the Stat subclass CounterStat.Robert Adams3-0/+88
Add a GetStatsAsOSDMap method to StatsManager which allows the filtered fetching of stats for eventual returning over the internets.
2013-07-11Fix regression where llHTTPRequests which did not get an OK response ↵Justin Clark-Casey (justincc)1-1/+6
returned 499 and the exception message in the http_response event rather than the actual response code and body. This was a regression since commit 831e4c3 (Thu Apr 4 00:36:15 2013) This commit also adds a regression test for this case, though this currently only works with Mono This aims to address http://opensimulator.org/mantis/view.php?id=6704
2013-07-10Added show client-stats [first last] command to expose what viewers are ↵Diva Canto1-3/+8
requesting.
2013-07-08Add missing file BaseOutputStreamHandler.cs from recent commit e19defdJustin Clark-Casey (justincc)1-0/+60
2013-07-08minor: remove now unused migration-hack bool from DAMapJustin Clark-Casey (justincc)1-4/+0
2013-07-08BaseHttpServer: if the handler sets the content length, don't override it. ↵Diva Canto1-1/+1
This happens in HEAD handlers.
2013-07-08Add "show caps stats by user" and "show caps stats by cap" console commands ↵Justin Clark-Casey (justincc)7-16/+51
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-04Revert "WARNING: BRUTE FORCE DEBUG. AVOID USING THIS COMMIT."Diva Canto1-4/+0
This reverts commit c95a23863ab51810ccc01afd3dd641c18a183305.
2013-07-04WARNING: BRUTE FORCE DEBUG. AVOID USING THIS COMMIT.Diva Canto1-0/+4
2013-06-29Changed HG status notifications timeout down to 15secs from the default 100.Diva Canto1-1/+9
2013-06-29Remove hack to migrate previous experimental-level os materials data.Justin Clark-Casey (justincc)1-9/+0
This didn't seem to be working anyway and it's better not to have such hacks in the code for experimental stuff.
2013-06-27add method docs for DAMap.GetStore() and DAMap.SetStore()dahlia1-0/+12
2013-06-27Make the concept of namespaces explicit in dynamic attributesJustin Clark-Casey (justincc)2-126/+182
This is in order to reduce the likelihood of naming clashes, make it easier to filter in/out attributes, ensure uniformity, etc. All dynattrs in the opensim distro itself or likely future ones should be in the "OpenSim" namespace. This does alter the underlying dynattrs data structure. All data in previous structures may not be available, though old structures should not cause errors. This is done without notice since this feature has been explicitly labelled as experimental, subject to change and has not been in a release. However, existing materials data is being preserved by moving it to the "Materials" store in the "OpenSim" namespace.
2013-06-20minor: remove mono compiler warnings in WebsocketServerHandler.csJustin Clark-Casey (justincc)1-13/+7
2013-06-20Change "ObjectMemory" stat to "HeapMemory" to align with other stat names. ↵Justin Clark-Casey (justincc)1-3/+3
Also round this and ProcessMemory to three decimal places in common with other memory stats. I believe leaving out such minor info makes stats easier to read
2013-06-20Allow more than one stat category to be specified in "show stats"Justin Clark-Casey (justincc)1-30/+34
e.g. "show stats httpserver.9000 server.network"
2013-06-20minor: Change "memory churn" terminology in statistics to "heap allocation ↵Justin Clark-Casey (justincc)3-14/+14
rate" since this is more generally meaningful
2013-06-20Fix minor bug where the check whether to display SmartThreadPool stats was ↵Justin Clark-Casey (justincc)1-1/+1
accidentally != null rather than == FireAndForgetMethod.SmartThreadPool Due to another check this had no practical effect
2013-06-20Make it possible to specify display of stats in a particular 'container' by ↵Justin Clark-Casey (justincc)2-3/+17
separating category and container with a period. e.g. "show stats server.network" I failed to realize this had already been implemented without the period in the show stats command (as the command help had not been updated). However, I would prefer the . approach as it will allow specifying multiple stats, easier wildcarding, etc. This commit also prevents any stat from having a period in its short name.
2013-06-19Display existing statistic of how many http requests a server is making as ↵Justin Clark-Casey (justincc)3-5/+23
server.network.HTTPRequestsMade in "show stats all"
2013-06-18minor: tidy up spacing if display a unit for additional stat informationJustin Clark-Casey (justincc)1-1/+1
2013-06-18Make number of inbound http requests handled available as a ↵Justin Clark-Casey (justincc)2-6/+31
httpserver.<port>.IncomingHTTPRequestsProcessed stat
2013-06-18Fix issue where stat samples were accidentally static, so that any ↵Justin Clark-Casey (justincc)1-1/+1
additional stat with sampling would produce wrong results
2013-06-18If SmartThreadPool is active, display statistical information about it in ↵Justin Clark-Casey (justincc)1-2/+13
"show stats server" Also puts these and previous builtin threadpool stats in the "threadpool" stat container rather than "processor"
2013-06-17refactor: Move existing code to generate report information on the ↵Justin Clark-Casey (justincc)2-64/+103
threadpool to the ServerBase rather than being in Util
2013-06-17Fix bug where no threadpool data would be displayed in the "show threads" ↵Justin Clark-Casey (justincc)1-1/+1
command if threadpool type was QueueUserWorkItem (Unsafe worked as expected)
2013-06-17Drop server level stats to debug instead of info.Justin Clark-Casey (justincc)1-1/+1
This was the original intention with these stats, as I didn't believe they would be useful to ordinary users if everything is working as it should. Please amend if this is an issue. Just for now, levels actually have no impact on what is displayed via the "show stats" command.
2013-06-17Add server stats for available builtin threadpool and iocp workersJustin Clark-Casey (justincc)1-0/+16
2013-06-17Make general server stats available on the robust console as well as the ↵Justin Clark-Casey (justincc)4-65/+394
simulator console This means the "show stats" command is now active on the robust console.
2013-06-12Implement logging of first 80 characters (debug level 5) or full body data ↵Justin Clark-Casey (justincc)2-5/+57
(debug level 6) on outgoing requests, depending on debug level This is set via "debug http out <level>" This matches the existing debug level behaviours for logging incoming http data
2013-06-11Add TriggerScenePresenceUpdated events when an animation is addedRobert Adams1-3/+2
or removed. Shouldn't impact anyone as only DSG seems to use OnScenePresenceUpdated event. Some minor format changes to AnimationSet's ToString().
2013-06-10Add port numbers to poll service thread names so that we can tell which ↵Justin Clark-Casey (justincc)1-2/+2
belong to which HttpServer
2013-06-10Reinstate explicit starting and stopping of PollServiceRequestManager added ↵Justin Clark-Casey (justincc)2-4/+7
in 3eee991 but removed in 7c0bfca Do not rely on destructors to stop things. These fire at unpredictable times and cause problems such as http://opensimulator.org/mantis/view.php?id=6503 and most probably http://opensimulator.org/mantis/view.php?id=6668
2013-06-07Supply proper type information for the various types of requestsMelanie1-3/+1
2013-06-07Adding Avination's PollService to round out the HTTP inventory changesMelanie5-228/+211
2013-06-05Port Avination's inventory send throttlingMelanie1-0/+108
2013-05-31Adding standard OpenSim header to source filesBlueWall1-0/+27