MantisBT - opensim
View Issue Details
0008494opensim[REGION] OpenSim Corepublic2019-02-27 04:112019-02-27 09:09
Robert Adams 
PCWindows10 (2019-02-27 10:07)
Grid (Multiple Regions per Sim)
.NET / Windows64
0008494: On OpenSim.exe shutdown - [LLUDPSERVER]: Error in the incoming packet handler loop: Thread was being aborted
A red error ERROR [LLUDPSERVER]: Error in the incoming packet handler loop: Thread was being aborted is being thrown on shutdown (quit) of OpenSim.exe in

Even when the server is started, left to settle down for 5 minutes or more and then terminated this error shows, with no other activity or logins.

2019-02-27 12:07:58,331 INFO [LLUDPSERVER]: Shutting down the LLUDP server for Edinburgh
2019-02-27 12:07:58,331 DEBUG [UDPBASE]: Stopping outbound UDP loop
2019-02-27 12:07:58,331 DEBUG [UDPBASE]: Stopping inbound UDP loop
2019-02-27 12:07:58,331 DEBUG [JobEngine] Stopping Outgoing Queue Refill Engine (Edinburgh)
2019-02-27 12:07:58,331 INFO [XEngine]: Shutting down 70 scripts in Edinburgh
2019-02-27 12:07:58,378 DEBUG [WATCHDOG]: Removing thread Outgoing Packets (Edinburgh), ID 78
2019-02-27 12:07:58,394 DEBUG [GetAssetsModule] Closing
2019-02-27 12:07:58,409 DEBUG [WATCHDOG]: Removing thread GetCapsAssetWorker0, ID 37
2019-02-27 12:07:58,425 DEBUG [WATCHDOG]: Removing thread GetCapsAssetWorker1, ID 38
2019-02-27 12:07:58,441 DEBUG [WATCHDOG]: Removing thread GetCapsAssetWorker2, ID 39
2019-02-27 12:07:58,441 DEBUG [WebFetchInvDescModule] Closing
2019-02-27 12:07:58,456 DEBUG [WATCHDOG]: Removing thread InventoryWorkerThread0, ID 4
2019-02-27 12:07:58,472 DEBUG [WATCHDOG]: Removing thread InventoryWorkerThread1, ID 41
2019-02-27 12:07:58,472 DEBUG [WATCHDOG]: Removing thread MapItemRequestThread (Edinburgh), ID 76
2019-02-27 12:07:58,472 DEBUG [JobEngine] Stopping HG Incoming Scene Object Engine (Edinburgh)
2019-02-27 12:07:58,472 DEBUG [SCENE]: Dispose Physics
2019-02-27 12:07:58,566 DEBUG [JobEngine] Stopping ServiceThrottle
2019-02-27 12:07:58,691 DEBUG [WATCHDOG]: Removing thread PollServiceWorkerThread 0, ID 12
2019-02-27 12:07:58,706 DEBUG [WATCHDOG]: Removing thread PollServiceWorkerThread 1, ID 13
2019-02-27 12:07:59,885 DEBUG [JobEngine] Stopping Non-blocking non-critical job engine
2019-02-27 12:07:59,948 ERROR [LLUDPSERVER]: Error in the incoming packet handler loop: Thread was being aborted.
System.Threading.ThreadAbortException: Thread was being aborted.
   at System.Threading.Monitor.ObjWait(Boolean exitContext, Int32 millisecondsTimeout, Object obj)
   at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeout(Int32 millisecondsTimeout, UInt32 startTime, CancellationToken cancellationToken)
   at System.Threading.SemaphoreSlim.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Collections.Concurrent.BlockingCollection`1.TryTakeWithNoTimeValidation(T& item, Int32 millisecondsTimeout, CancellationToken cancellationToken, CancellationTokenSource combinedTokenSource)
   at System.Collections.Concurrent.BlockingCollection`1.TryTake(T& item, Int32 millisecondsTimeout)
   at OpenSim.Region.ClientStack.LindenUDP.LLUDPServer.IncomingPacketHandler() in D:\Temp\opensim-\OpenSim\Region\ClientStack\Linden\UDP\LLUDPServer.cs:line 1905
2019-02-27 12:07:59,979 INFO [SHUTDOWN]: Shutdown processing on main thread complete. Exiting...
No tags attached.
Issue History
2019-02-27 04:11aiaustinNew Issue
2019-02-27 04:11aiaustinDescription Updatedbug_revision_view_page.php?rev_id=7865#r7865
2019-02-27 04:29UbitUmarovNote Added: 0034875
2019-02-27 05:46Monamusa KaliopovNote Added: 0034876
2019-02-27 06:37Robert AdamsNote Added: 0034877
2019-02-27 07:56Robert AdamsNote Added: 0034878
2019-02-27 09:09aiaustinNote Added: 0034879
2019-02-27 09:09aiaustinStatusnew => resolved
2019-02-27 09:09aiaustinFixed in Version =>
2019-02-27 09:09aiaustinResolutionopen => fixed
2019-02-27 09:09aiaustinAssigned To => Robert Adams
2019-02-27 09:09aiaustinStatusresolved => closed

2019-02-27 04:29   
just type of exception that now needs to be excluded from that log
Monamusa Kaliopov   
2019-02-27 05:46   
2019-02-27 14:45:08,990 ERROR [LLUDPSERVER]: Error in the incoming packet handler loop: Thread was being aborted.
System.Threading.ThreadAbortException: Thread was being aborted.
  at (wrapper managed-to-native) System.Threading.Monitor.Monitor_wait(object,int)
  at System.Threading.Monitor.ObjWait (System.Boolean exitContext, System.Int32 millisecondsTimeout, System.Object obj) <0x7f4736a6af90 + 0x0003c> in <04750267503a43e5929c1d1ba19daf3e>:0
  at System.Threading.SemaphoreSlim.WaitUntilCountOrTimeout (System.Int32 millisecondsTimeout, System.UInt32 startTime, System.Threading.CancellationToken cancellationToken) <0x7f4736a64900 + 0x0006e> in <04750267503a43e5929c1d1ba19daf3e>:0
  at System.Threading.SemaphoreSlim.Wait (System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken) [0x000d9] in <04750267503a43e5929c1d1ba19daf3e>:0
  at System.Collections.Concurrent.BlockingCollection`1[T].TryTakeWithNoTimeValidation (T& item, System.Int32 millisecondsTimeout, System.Threading.CancellationToken cancellationToken, System.Threading.CancellationTokenSource combinedTokenSource) [0x00067] in <5bf358e735be486487282a37cb3bce80>:0
  at System.Collections.Concurrent.BlockingCollection`1[T].TryTake (T& item, System.Int32 millisecondsTimeout) [0x0000e] in <5bf358e735be486487282a37cb3bce80>:0
  at OpenSim.Region.ClientStack.LindenUDP.LLUDPServer.IncomingPacketHandler () [0x00013] in <9ace5a09469b451a9507bbf7cb81d65f>:0
2019-02-27 14:45:08,990 INFO [SHUTDOWN]: Shutdown processing on main thread complete. Exiting...
Robert Adams   
2019-02-27 06:37   
There are several places in OS where this happens and most times you don't see it. The problem is "ThreadAbortException is a special exception that can be caught, but it will automatically be raised again at the end of the catch block." (see [^])

The clean solution is, for the code that is catching the error and exiting the thread cleanly, to call 'ResetAbort()'.
Robert Adams   
2019-02-27 07:56   
This should be fixes by latest source checkin.
2019-02-27 09:09   
Confirmed that ( dev master 2019-02-27 15:49) has fixed the issue and no error message now shows on shutdown. Thanks Robert.