I have a multi-net Windows service that is hanging in the middle - maybe once in the operation of 24/7 every two weeks. Thandpull is completely saturated when it is hanging, because our custom transcexuals begin to block calls for some reasons. There is no lock in the offensive codes, and nothing is blocked according to the windbag, but they are definitely blocking anywhere. There is no exception to the stack. A Thread.Sleep (1) that will never be hit in BufferedStream.Write code, but my question is ReOpenMetaDataWithMemory, CreateApplicationContext, and what DllCanUnloadNow mean?
Almost all 2000 hacked threads (not normal operation!) On Threadpool have a stack similar to the following:
0: 027> gt; ! Dumpstack OS thread number: 0x1638 (27) Child-SP RetAddr call site 000000001d34df58 0000000077d705d6 ntdll ZwDelayExecution + 0xA 000000001d34df60 000006427f88901d kernel32 SleepEx + 0x96 000000001d34e000 000006427f454379 mscorwks DllCanUnloadNowInternal + 0xf53d 000000001d34e080 000006427fa34749 mscorwks CreateApplicationContext + 0x41d 000000001d34e0e0 0000064280184902 mscorwks ReOpenMetaDataWithMemory + !!!! 0x1ff59 000000001d34e290 0000064280184532 Company_Common_Diagnostics! Company.Common.Diagnostics.BufferedStream.Write (Byte [], Int32, Int32) + 0x1b2 000000001d34e300 00000642801831fd Company_Common_Diagnostics! Company.Common.Diagnostics.XmlRollingTraceListener + TraceWriter.Write (System.String) + 0x52 000000001d34e350 00000642801b3304 Company_Common_Diagnostics! Company.Common.Diagnostics.XmlRollingTraceListener.InternalWrite (System.Text.StringBuilder) + 0x3d 000000001d34e390 0000064274e9d7ec Company_Common_Diagnostics! Company.Common.Diagnostics.XmlRollingTraceListener.TraceTransfer (System.Diagnostics.TraceEventCache, System.String, Int32, System.String, System.Guid) + 0xc4 000000001d34e410 00000642801b2f59 System_ni! System.Diagnostics.TraceSource.TraceTransfer (Int32, System.String, System.Guid) + 0x2ec
There really is no answer, but something to check ...
Ensure that you do not have even the default trace listener registered in your trace source if you explicitly clear < / Strong> or Delete DefaultTraceListener This can still be there IsThreadSafe property return for DefaultTraceListener A , in which case System.Diagnostics.Trace classes create a lock () Trace Event () around the call. Just look for some things for. More information: To determine the value of IsThreadSafe when the listener is writing whether a global lock is used to use . If the value of IsThreadSafe is false, then global lock usage is done regardless of the value of global lock. Global lock is not used only if the value of IsThreadSafe is true and the value of UseGlobalLock is false. The basic behavior when writing to global listeners is to use it. Thanks, Aaron
Comments
Post a Comment