MantisBT - opensim
View Issue Details
0008309opensim[GRID] Inventory Servicepublic2018-03-27 20:152019-02-06 11:29
mewtwo0641 
mewtwo0641 
normalcrashsometimes
closedfixed 
master (dev code) 
master (dev code) 
Grid (Multiple Regions per Sim)
ubODE
.NET / Windows64
None
0008309: Timeout and crash if it takes too long to purge trash folder
If it takes too long to purge the trash folder, the operation times out, and then results in crashing the OpenSim instance the operation was performed on.

I usually only see this when the trash folder has accumulated a lot of items (On order of thousands) and then empty trash/purge is performed.

A workaround to this would be to not wait until the trash folder accumulates so many items before emptying it; but it would be good if OpenSim didn't crash in case it does happen... Some of the more productive members of my grid aren't in the habit of emptying their trash folder on a regular basis :)
Purge the trash when it has a lot of items in it
Exception Log:

2018-03-26 00:27:58,907 INFO [FORMS]: Error receiving response from http://127.0.0.1:8003/xinventory: [^] The operation has timed out. Request: METHOD=PURGEFOLDER&ID=c8ecc228-937e-4668-9393-64bff28a63a0
2018-03-26 00:27:59,237 ERROR [APPLICATION]:
APPLICATION EXCEPTION DETECTED: System.UnhandledExceptionEventArgs

Exception: System.Net.WebException: The operation has timed out

Server stack trace:
   at OpenSim.Framework.SynchronousRestFormsRequester.MakeRequest(String verb, String requestUrl, String obj, Int32 timeoutsecs, IServiceAuth auth, Boolean keepalive) in E:\opensim\OpenSim\Framework\WebUtil.cs:line 1049
   at OpenSim.Services.Connectors.XInventoryServicesConnector.MakeRequest(String method, Dictionary`2 sendData) in E:\opensim\OpenSim\Services\Connectors\Inventory\XInventoryServicesConnector.cs:line 719
   at OpenSim.Services.Connectors.XInventoryServicesConnector.PurgeFolder(InventoryFolderBase folder) in E:\opensim\OpenSim\Services\Connectors\Inventory\XInventoryServicesConnector.cs:line 415
   at OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory.RemoteXInventoryServicesConnector.PurgeFolder(InventoryFolderBase folder) in E:\opensim\OpenSim\Region\CoreModules\ServiceConnectorsOut\Inventory\RemoteXInventoryServiceConnector.cs:line 257
   at OpenSim.Region.Framework.Scenes.Scene.PurgeFolderAsync(UUID userID, UUID folderID) in E:\opensim\OpenSim\Region\Framework\Scenes\Scene.PacketHandlers.cs:line 706
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)

Exception rethrown at [0]:
   at System.Runtime.Remoting.Proxies.RealProxy.EndInvokeHelper(Message reqMsg, Boolean bProxyCase)
   at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(Object NotUsed, MessageData& msgData)
   at OpenSim.Region.Framework.Scenes.Scene.PurgeFolderDelegate.EndInvoke(IAsyncResult result)
   at OpenSim.Region.Framework.Scenes.Scene.PurgeFolderCompleted(IAsyncResult iar) in E:\opensim\OpenSim\Region\Framework\Scenes\Scene.PacketHandlers.cs:line 715
   at System.Runtime.Remoting.Messaging.AsyncResult.SyncProcessMessage(IMessage msg)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

Application is terminating: True
No tags attached.
Issue History
2018-03-27 20:15mewtwo0641New Issue
2018-03-27 20:31UbitUmarovNote Added: 0032612
2018-03-27 22:45mewtwo0641Note Added: 0032613
2018-03-27 22:45mewtwo0641Statusnew => resolved
2018-03-27 22:45mewtwo0641Fixed in Version => master (dev code)
2018-03-27 22:45mewtwo0641Resolutionopen => fixed
2018-03-27 22:45mewtwo0641Assigned To => mewtwo0641
2019-02-06 11:29BillBlightNote Added: 0034400
2019-02-06 11:29BillBlightStatusresolved => closed

Notes
(0032612)
UbitUmarov   
2018-03-27 20:31   
made a change in master.
should not terminate now ( but will timeout on same conditions)
(0032613)
mewtwo0641   
2018-03-27 22:45   
That seems to work, no more crash. Thank you! :)
(0034400)
BillBlight   
2019-02-06 11:29   
Marked as Resolved but never closed, can be reopened if needed.