CLR thread pool

https://github.com/dotnet/coreclr/issues/12357

http://mattwarren.org/2017/04/13/The-CLR-Thread-Pool-Thread-Injection-Algorithm/

http://webcourse.cs.technion.ac.il/236635/Winter2009-2010/hw/WCFiles/2.pdf

http://joeduffyblog.com/2006/07/08/clr-thread-pool-injection-stuttering-problems/

https://stackoverflow.com/questions/2242260/general-number-of-threads-in-thread-pool

https://en.wikipedia.org/wiki/Hill_climbing

https://www.codeproject.com/Articles/1182012/The-CLR-Thread-Pool-Thread-Injection-Algorithm

https://stackoverflow.com/questions/24666604/what-would-cause-so-many-unstarted-threads

https://www.researchgate.net/publication/228977836_Optimizing_concurrency_levels_in_the_net_threadpool_A_case_study_of_controller_design_and_implementation

Thread Pooling

https://msdn.microsoft.com/en-us/library/windows/desktop/ms686756(v=vs.85).aspx

Thread Pools

https://msdn.microsoft.com/en-us/library/windows/desktop/ms686760%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

https://github.com/dotnet/coreclr/blob/master/Documentation/botr/threading.md

https://blogs.msdn.microsoft.com/ericeil/2009/04/23/clr-4-0-threadpool-improvements-part-1/

http://joeduffyblog.com/2008/09/17/building-a-custom-thread-pool-series-part-3-incorporating-work-stealing-queues/

http://www.cnblogs.com/Refresh-air/p/3312538.html

https://msdn.microsoft.com/en-us/magazine/ff960958.aspx?f=255&MSPPError=-2147217396

https://msdn.microsoft.com/en-us/magazine/mt149362?author=erika+fuentes

https://blogs.msdn.microsoft.com/msdnmagazine/2008/11/21/thread-management-and-other-clr-tidbits/

Programming the Thread Pool in the .NET Framework

https://msdn.microsoft.com/en-us/library/ms973903.aspx

那些年,我们一起追寻的异步编程[系列]

浅谈线程池(下):相关试验及注意事项

Optimize managed code for multi-core machines. MSDN Magazine, October 2007.

http://msdn.microsoft.com/en-us/magazine/ cc163340.aspx

Parallel Programming with Microsoft .NET

https://msdn.microsoft.com/en-us/library/ff963553.aspx

Optimize Managed Code For Multi-Core Machines

Improve Scalability With New Thread Pool APIs

http://www.albahari.com/threading/#_Thread_Pooling

https://blogs.msdn.microsoft.com/ericeil/2008/06/20/windows-io-threads-vs-managed-io-threads/

http://stackoverflow.com/questions/2099947/simple-description-of-worker-and-i-o-threads-in-net

https://blogs.msdn.microsoft.com/junfeng/2008/11/24/threadpool-unsafequeuenativeoverlapped/

https://blogs.msdn.microsoft.com/junfeng/2008/12/01/threadpool-bindhandle/

BindIoCompletionCallback function,

On completion of an I/O request involving this file, a non-I/O worker thread will execute the specified callback function.

https://msdn.microsoft.com/en-us/library/windows/desktop/aa363484(v=vs.85).aspx

http://stackoverflow.com/questions/137400/whats-the-difference-between-a-worker-thread-and-an-i-o-thread

I/O Completion Ports

https://msdn.microsoft.com/en-us/library/aa365198%28VS.85%29.aspx?f=255&MSPPError=-2147217396

https://blogs.msdn.microsoft.com/junfeng/2008/07/21/managed-threadpool-vs-win32-threadpool-pre-vista/

Concurrency - Throttling Concurrency in the CLR 4.0 ThreadPool

https://msdn.microsoft.com/en-us/magazine/ff960958.aspx

http://www.danielmoth.com/Blog/New-And-Improved-CLR-4-Thread-Pool-Engine.aspx 

UnsafeQueueUserWorkItem and what exactly does “does not propagate the calling stack” mean?

https://blogs.msdn.microsoft.com/cbrumme/2003/05/06/asynchronous-operations-pinning/

win32threadpool

DWORD __stdcall ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs)

500 Id: 25bf4.1b858 Suspend: 0 Teb: 00007ff6`3f28a000 Unfrozen
Child-SP RetAddr Call Site
00000020`a84cf558 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa
00000020`a84cf560 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x94
00000020`a84cf600 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a
00000020`a84cf6c0 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x109
00000020`a84cf700 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b9
00000020`a84cf7a0 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d
00000020`a84cfb60 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x22
00000020`a84cfb90 00000000`00000000 ntdll!RtlUserThreadStart+0x34

501 Id: 25bf4.368 Suspend: 0 Teb: 00007ff6`3f288000 Unfrozen
Child-SP RetAddr Call Site
00000020`a854f448 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa
00000020`a854f450 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x94
00000020`a854f4f0 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a
00000020`a854f5b0 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x109
00000020`a854f5f0 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b9
00000020`a854f690 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d
00000020`a854fcd0 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x22
00000020`a854fd00 00000000`00000000 ntdll!RtlUserThreadStart+0x34

502 Id: 25bf4.3d690 Suspend: 0 Teb: 00007ff6`3f286000 Unfrozen
Child-SP RetAddr Call Site
00000020`a85cfa98 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa
00000020`a85cfaa0 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x94
00000020`a85cfb40 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a
00000020`a85cfc00 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x109
00000020`a85cfc40 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b9
00000020`a85cfce0 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d
00000020`a85cff20 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x22
00000020`a85cff50 00000000`00000000 ntdll!RtlUserThreadStart+0x34

503 Id: 25bf4.406c Suspend: 0 Teb: 00007ff6`3f284000 Unfrozen
Child-SP RetAddr Call Site
00000020`a864fc58 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa
00000020`a864fc60 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x94
00000020`a864fd00 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a
00000020`a864fdc0 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x109
00000020`a864fe00 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b9
00000020`a864fea0 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d
00000020`a864fee0 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x22
00000020`a864ff10 00000000`00000000 ntdll!RtlUserThreadStart+0x34

 

================

OS Thread Id: 0x8e54 (4)
Current frame: (MethodDesc 000007fe91923930 +0x48 ConsoleApplication5.Program.ThreadProc(System.Object))
Child-SP         RetAddr          Caller, Callee
000000001bdbeda0 000007fee76fd0b5 (MethodDesc 000007fee72807d0 +0x285 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001bdbee00 000007fef12709d1 clr!ManagedPerAppDomainTPCount::SetAppDomainRequestsActive+0x29, calling clr!ThreadpoolMgr::EnsureGateThreadRunning
000000001bdbef00 000007fee76fce19 (MethodDesc 000007fee72807c0 +0x9 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)), calling (MethodDesc 000007fee72807d0 +0 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001bdbef30 000007fee764270f (MethodDesc 000007fee7272008 +0x6f System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()), calling (MethodDesc 000007fee72807c0 +0 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001bdbef80 000007fee763764a (MethodDesc 000007fee7271d60 +0x1ea System.Threading.ThreadPoolWorkQueue.Dispatch()), calling 000007fe919d0060
000000001bdbf040 000007fef1119e03 clr!CallDescrWorkerInternal+0x83
000000001bdbf080 000007fef1119e7e clr!CallDescrWorkerWithHandler+0x4a, calling clr!CallDescrWorkerInternal
000000001bdbf0a0 000007fef1111feb clr!HardCodedMetaSig::GetBinarySig+0x58, calling clr!_security_check_cookie
000000001bdbf0c0 000007fef1119ef0 clr!MethodDescCallSite::CallTargetWorker+0x2e2, calling clr!CallDescrWorkerWithHandler
000000001bdbf100 000007fef10c6472 clr!ArgIteratorTemplate<ArgIteratorBase>::ComputeReturnFlags+0x4a, calling clr!SigPointer::PeekElemTypeClosed
000000001bdbf130 000000007714dba8 ntdll!RtlAllocateHeap+0x178, calling ntdll!TpAlpcRegisterCompletionList+0xa720
000000001bdbf150 000007fef111b34a clr!MethodDescCallSite::CallTargetWorker+0xa1, calling clr!_chkstk
000000001bdbf1a0 000007fef111b281 clr!ArgIteratorTemplate<ArgIteratorBase>::ForceSigWalk+0x139, calling clr!ArgIteratorBase::IsVarArg
000000001bdbf270 000007fef1270bf9 clr!QueueUserWorkItemManagedCallback+0x2a, calling clr!MethodDescCallSite::CallTargetWorker
000000001bdbf350 000007fef112458c clr!Frame::Pop+0x50
000000001bdbf390 000007fef112451a clr!COMCustomAttribute::PopSecurityContextFrame+0x192, calling clr!Frame::Pop+0x24
000000001bdbf420 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock
000000001bdbf430 000007fef1124413 clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame+0x18, calling clr!Frame::Push
000000001bdbf460 000007fef11243f3 clr!FrameWithCookie<DebuggerU2MCatchHandlerFrame>::FrameWithCookie<DebuggerU2MCatchHandlerFrame>+0x1c, calling clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame
000000001bdbf480 0000000077152631 ntdll!LdrGetProcedureAddress+0x11, calling ntdll!LdrGetProcedureAddressEx
000000001bdbf490 000007fef1124491 clr!COMCustomAttribute::PopSecurityContextFrame+0xbd, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x12c
000000001bdbf4a0 000007fef1123ec1 clr!CORProfilerTrackThreads+0x9, calling clr!CORProfilerPresent
000000001bdbf4d0 000007fef126fcf6 clr!Thread::HasStarted+0x16e, calling clr!CORProfilerTrackThreads
000000001bdbf520 000007fef11245ef clr!Thread::SetExposedContext+0x93, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x48
000000001bdbf580 000007fef1270b60 clr!ManagedPerAppDomainTPCount::DispatchWorkItem+0xb4, calling clr!Thread::SetExposedContext+0x64
000000001bdbf680 000007fefe860c82 ole32!CoUninitialize+0xbe [d:w7rtmcomole32comclasscompobj.cxx:2657], calling ole32!NotifyInitializeSpies [d:w7rtmcomole32comclasscompobj.cxx:1717]
000000001bdbf6b0 000007fef126fec9 clr!Thread::SetApartment+0xf9, calling clr!Thread::GetApartment
000000001bdbf6d0 000007fef1299297 clr!PerAppDomainTPCountList::GetAppDomainIndexForThreadpoolDispatch+0x6f
000000001bdbf710 000007fef129920b clr!ThreadpoolMgr::ExecuteWorkRequest+0x4c
000000001bdbf740 000007fef129910a clr!ThreadpoolMgr::WorkerThreadStart+0xf6, calling clr!ThreadpoolMgr::ExecuteWorkRequest
000000001bdbf770 0000000076f01a0a kernel32!HeapFree+0xa, calling ntdll!RtlFreeHeap
000000001bdbf7a0 000007fef10b435d clr!EEHeapFreeInProcessHeap+0x39, calling kernel32!HeapFree
000000001bdbf800 000007fef11833de clr!Thread::intermediateThreadProc+0x7d
000000001bdbf900 000007fef11833c7 clr!Thread::intermediateThreadProc+0x66, calling clr!_chkstk
000000001bdbf940 0000000076ef59bd kernel32!BaseThreadInitThunk+0xd
000000001bdbf970 000000007712a2e1 ntdll!RtlUserThreadStart+0x21
OS Thread Id: 0x7328 (5)
Current frame: ntdll!NtDelayExecution+0xa
Child-SP         RetAddr          Caller, Callee
000000001c1fec70 000007fefd051203 KERNELBASE!SleepEx+0xb3, calling ntdll!NtDelayExecution
000000001c1fece0 000007fefd05394b KERNELBASE!SetThreadLocale+0xab, calling ntdll!RtlActivateActivationContextUnsafeFast
000000001c1fed10 000007fef12b69f8 clr!CExecutionEngine::ClrSleepEx+0x29, calling kernel32!SleepEx
000000001c1fed40 000007fef12b6b81 clr!Thread::UserSleep+0x76, calling clr!ClrSleepEx
000000001c1fed60 000007fef10b49d4 clr!HelperMethodFrame::Push+0x19, calling clr!GetThread
000000001c1fed80 000007fee763bd33 (MethodDesc 000007fee7271990 +0x53 System.IO.__ConsoleStream.Write(Byte[], Int32, Int32)), calling (MethodDesc 000007fee7396dd8 +0 System.IO.__ConsoleStream.WriteFileNative(Microsoft.Win32.SafeHandles.SafeFileHandle, Byte[], Int32, Int32, Boolean))
000000001c1fed90 000007fef12b6aa8 clr!ThreadNative::Sleep+0x98, calling clr!Thread::UserSleep
000000001c1fedd0 000007fee763ac59 (MethodDesc 000007fee727e7d8 +0xe9 System.IO.StreamWriter.Flush(Boolean, Boolean))
000000001c1fedf0 000007fee763bc23 (MethodDesc 000007fee7396d98 +0x23 System.IO.__ConsoleStream.Flush())
000000001c1fee30 000007fee763bacc (MethodDesc 000007fee71a1c58 +0xcc System.IO.TextWriter.WriteLine(System.String))
000000001c1fee90 000007fee763bccb (MethodDesc 000007fee7396f48 +0x4b System.IO.TextWriter+SyncTextWriter.WriteLine(System.String)), calling clr!JIT_MonExitWorker_InlineGetThread
000000001c1feea0 000007fee763be3e (MethodDesc 000007fee71a12d8 +0x2e System.Console.WriteLine(System.String)), calling (MethodDesc 000007fee71a14a8 +0 System.Console.InitializeStdOutError(Boolean))
000000001c1feec8 000007fef12b6a6b clr!ThreadNative::Sleep+0x5b, calling clr!LazyMachStateCaptureState
000000001c1feee0 000007fe91a4026c (MethodDesc 000007fe91923940 +0x3c ConsoleApplication5.Program.ThreadProc2(System.Object)), calling (MethodDesc 000007fee719f428 +0 System.Threading.Thread.Sleep(Int32))
000000001c1fef10 000007fee76fd0b5 (MethodDesc 000007fee72807d0 +0x285 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001c1fef70 000007fef12709d1 clr!ManagedPerAppDomainTPCount::SetAppDomainRequestsActive+0x29, calling clr!ThreadpoolMgr::EnsureGateThreadRunning
000000001c1ff070 000007fee76fce19 (MethodDesc 000007fee72807c0 +0x9 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)), calling (MethodDesc 000007fee72807d0 +0 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001c1ff0a0 000007fee764270f (MethodDesc 000007fee7272008 +0x6f System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()), calling (MethodDesc 000007fee72807c0 +0 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001c1ff0f0 000007fee763764a (MethodDesc 000007fee7271d60 +0x1ea System.Threading.ThreadPoolWorkQueue.Dispatch()), calling 000007fe919d0060
000000001c1ff1b0 000007fef1119e03 clr!CallDescrWorkerInternal+0x83
000000001c1ff1f0 000007fef1119e7e clr!CallDescrWorkerWithHandler+0x4a, calling clr!CallDescrWorkerInternal
000000001c1ff210 000007fef1111feb clr!HardCodedMetaSig::GetBinarySig+0x58, calling clr!_security_check_cookie
000000001c1ff230 000007fef1119ef0 clr!MethodDescCallSite::CallTargetWorker+0x2e2, calling clr!CallDescrWorkerWithHandler
000000001c1ff270 000007fef10c6472 clr!ArgIteratorTemplate<ArgIteratorBase>::ComputeReturnFlags+0x4a, calling clr!SigPointer::PeekElemTypeClosed
000000001c1ff2c0 000007fef111b34a clr!MethodDescCallSite::CallTargetWorker+0xa1, calling clr!_chkstk
000000001c1ff310 000007fef111b281 clr!ArgIteratorTemplate<ArgIteratorBase>::ForceSigWalk+0x139, calling clr!ArgIteratorBase::IsVarArg
000000001c1ff3e0 000007fef1270bf9 clr!QueueUserWorkItemManagedCallback+0x2a, calling clr!MethodDescCallSite::CallTargetWorker
000000001c1ff400 000007fef1a5119a mscoreei!DllMainCRTStartup+0xce, calling mscoreei!DllMain
000000001c1ff4b0 000007fef1182676 clr!REGUTIL::GetConfigInteger+0x62, calling clr!REGUTIL::RegCacheValueNameSeenPerhaps
000000001c1ff4c0 000007fef112458c clr!Frame::Pop+0x50
000000001c1ff500 000007fef112451a clr!COMCustomAttribute::PopSecurityContextFrame+0x192, calling clr!Frame::Pop+0x24
000000001c1ff510 000007fefd06aa36 KERNELBASE!SetThreadStackGuarantee+0x46, calling KERNELBASE!GetSystemInfo
000000001c1ff530 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock
000000001c1ff590 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock
000000001c1ff5a0 000007fef1124413 clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame+0x18, calling clr!Frame::Push
000000001c1ff5c0 000007fef10c3a6c clr!ThreadStore::CheckForEEShutdown+0x1e, calling clr!ThreadStore::OtherThreadsComplete
000000001c1ff5d0 000007fef11243f3 clr!FrameWithCookie<DebuggerU2MCatchHandlerFrame>::FrameWithCookie<DebuggerU2MCatchHandlerFrame>+0x1c, calling clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame
000000001c1ff5f0 000007fef126fdb2 clr!ThreadStore::TransferStartedThread+0x83, calling clr!ThreadStore::CheckForEEShutdown
000000001c1ff600 000007fef1124491 clr!COMCustomAttribute::PopSecurityContextFrame+0xbd, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x12c
000000001c1ff610 000007fef1123ec1 clr!CORProfilerTrackThreads+0x9, calling clr!CORProfilerPresent
000000001c1ff640 000007fef126fcf6 clr!Thread::HasStarted+0x16e, calling clr!CORProfilerTrackThreads
000000001c1ff690 000007fef11245ef clr!Thread::SetExposedContext+0x93, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x48
000000001c1ff6f0 000007fef1270b60 clr!ManagedPerAppDomainTPCount::DispatchWorkItem+0xb4, calling clr!Thread::SetExposedContext+0x64
000000001c1ff700 000007fef1149f94 clr!SafeReleasePreemp+0x74
000000001c1ff740 000007fefe8622bd ole32!IsRunningInRPCSS+0x41 [d:w7rtmcomole32comclasscompobj.cxx:1959], calling ole32!__security_check_cookie [d:win7sp1_ldrminkernelcrtscrtw32miscamd64amdsecgs.asm:72]
000000001c1ff780 000007fefe862528 ole32!RegisterThreadCleanupCallback+0x28 [d:w7rtmcomole32comclasscompobj.cxx:1855], calling KERNELBASE!FlsSetValue
000000001c1ff7f0 000007fefe860c82 ole32!CoUninitialize+0xbe [d:w7rtmcomole32comclasscompobj.cxx:2657], calling ole32!NotifyInitializeSpies [d:w7rtmcomole32comclasscompobj.cxx:1717]
000000001c1ff820 000007fef126fec9 clr!Thread::SetApartment+0xf9, calling clr!Thread::GetApartment
000000001c1ff840 000007fef1299297 clr!PerAppDomainTPCountList::GetAppDomainIndexForThreadpoolDispatch+0x6f
000000001c1ff880 000007fef129920b clr!ThreadpoolMgr::ExecuteWorkRequest+0x4c
000000001c1ff8b0 000007fef129910a clr!ThreadpoolMgr::WorkerThreadStart+0xf6, calling clr!ThreadpoolMgr::ExecuteWorkRequest
000000001c1ff8e0 0000000076f01a0a kernel32!HeapFree+0xa, calling ntdll!RtlFreeHeap
000000001c1ff910 000007fef10b435d clr!EEHeapFreeInProcessHeap+0x39, calling kernel32!HeapFree
000000001c1ff970 000007fef11833de clr!Thread::intermediateThreadProc+0x7d
000000001c1ffaf0 000007fef11833c7 clr!Thread::intermediateThreadProc+0x66, calling clr!_chkstk
000000001c1ffb30 0000000076ef59bd kernel32!BaseThreadInitThunk+0xd
000000001c1ffb60 000000007712a2e1 ntdll!RtlUserThreadStart+0x21

OS Thread Id: 0x3608 (4)
Current frame: (MethodDesc 000007fe91923920 +0x49 ConsoleApplication5.Program.DoWork())
Child-SP         RetAddr          Caller, Callee
000000001bfef060 000007feda63d0b5 (MethodDesc 000007feda1c07d0 +0x285 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001bfef1c0 000007feda63ce19 (MethodDesc 000007feda1c07c0 +0x9 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)), calling (MethodDesc 000007feda1c07d0 +0 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001bfef1f0 000007feda63cdd7 (MethodDesc 000007feda1c07b0 +0x57 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)), calling (MethodDesc 000007feda1c07c0 +0 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean))
000000001bfef240 000007feda5b0301 (MethodDesc 000007feda1cc3f0 +0x51 System.Threading.ThreadHelper.ThreadStart()), calling (MethodDesc 000007feda1c07b0 +0 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object))
000000001bfef290 000007fef1119e03 clr!CallDescrWorkerInternal+0x83
000000001bfef2d0 000007fef1119e7e clr!CallDescrWorkerWithHandler+0x4a, calling clr!CallDescrWorkerInternal
000000001bfef310 000007fef1119ef0 clr!MethodDescCallSite::CallTargetWorker+0x2e2, calling clr!CallDescrWorkerWithHandler
000000001bfef350 000007fef10c6472 clr!ArgIteratorTemplate<ArgIteratorBase>::ComputeReturnFlags+0x4a, calling clr!SigPointer::PeekElemTypeClosed
000000001bfef3a0 000007fef111b34a clr!MethodDescCallSite::CallTargetWorker+0xa1, calling clr!_chkstk
000000001bfef3f0 000007fef111b281 clr!ArgIteratorTemplate<ArgIteratorBase>::ForceSigWalk+0x139, calling clr!ArgIteratorBase::IsVarArg
000000001bfef4c0 000007fef123594d clr!ThreadNative::KickOffThread_Worker+0x105, calling clr!MethodDescCallSite::CallTargetWorker
000000001bfef520 000000007712a3e2 ntdll!RtlUserThreadStart+0x122, calling ntdll!RtlLeaveCriticalSection
000000001bfef590 000000007714dba8 ntdll!RtlAllocateHeap+0x178, calling ntdll!TpAlpcRegisterCompletionList+0xa720
000000001bfef650 000007fefe862645 ole32!InitThreadCtx+0x41 [d:w7rtmcomole32comclasscompobj.cxx:2288]
000000001bfef670 000007fefe8629bf ole32!TLSAddToMap+0x9f [d:w7rtmcomole32comclass ls.cxx:166], calling ntdll!RtlLeaveCriticalSection
000000001bfef680 000007fefe8625b5 ole32!wCoInitializeEx+0x79 [d:w7rtmcomole32comclasscompobj.cxx:2467], calling ole32!InitThreadCtx [d:w7rtmcomole32comclasscompobj.cxx:2235]
000000001bfef6a0 000007fefe862528 ole32!RegisterThreadCleanupCallback+0x28 [d:w7rtmcomole32comclasscompobj.cxx:1855], calling KERNELBASE!FlsSetValue
000000001bfef6d0 000007fef11245bb clr!ManagedThreadCallState::IsAppDomainEqual+0x1f, calling clr!ADID::operator==
000000001bfef700 000007fef112458c clr!Frame::Pop+0x50
000000001bfef730 000007fef10b378a clr!EEHeapAllocInProcessHeap+0x46, calling ntdll!RtlAllocateHeap
000000001bfef740 000007fef112451a clr!COMCustomAttribute::PopSecurityContextFrame+0x192, calling clr!Frame::Pop+0x24
000000001bfef760 000007fef126f57a clr!Thread::AllocateIOCompletionContext+0x13, calling clr!operator new
000000001bfef770 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock
000000001bfef7d0 000007fef126fdb2 clr!ThreadStore::TransferStartedThread+0x83, calling clr!ThreadStore::CheckForEEShutdown
000000001bfef7e0 000007fef1124413 clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame+0x18, calling clr!Frame::Push
000000001bfef810 000007fef11243f3 clr!FrameWithCookie<DebuggerU2MCatchHandlerFrame>::FrameWithCookie<DebuggerU2MCatchHandlerFrame>+0x1c, calling clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame
000000001bfef820 000007fef126fcf6 clr!Thread::HasStarted+0x16e, calling clr!CORProfilerTrackThreads
000000001bfef840 000007fef1124491 clr!COMCustomAttribute::PopSecurityContextFrame+0xbd, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x12c
000000001bfef8d0 000007fef11245ef clr!Thread::SetExposedContext+0x93, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x48
000000001bfef930 000007fef1235831 clr!ThreadNative::KickOffThread+0xbd, calling clr!Thread::SetExposedContext+0x64
000000001bfef970 0000000076f01a0a kernel32!HeapFree+0xa, calling ntdll!RtlFreeHeap
000000001bfef9d0 000007fef10b4384 clr!operator delete+0x14, calling clr!EEHeapFreeInProcessHeap
000000001bfefa00 000007fef11833de clr!Thread::intermediateThreadProc+0x7d
000000001bfefb00 000007fef11833c7 clr!Thread::intermediateThreadProc+0x66, calling clr!_chkstk
000000001bfefb40 0000000076ef59bd kernel32!BaseThreadInitThunk+0xd
000000001bfefb70 000000007712a2e1 ntdll!RtlUserThreadStart+0x21

原文地址:https://www.cnblogs.com/WCFGROUP/p/5774756.html