https://github.com/dotnet/coreclr/issues/12357
Thread Pooling
Thread Pools
Programming the Thread Pool in the .NET Framework
Optimize managed code for multi-core machines. MSDN Magazine, October 2007.
Parallel Programming with Microsoft .NET
BindIoCompletionCallback function,
On completion of an I/O request involving this file, a non-I/O worker thread will execute the specified callback function.
I/O Completion Ports
Concurrency - Throttling Concurrency in the CLR 4.0 ThreadPool
win32threadpool
DWORD __stdcall ThreadpoolMgr::WorkerThreadStart(LPVOID lpArgs)
500 Id: 25bf4.1b858 Suspend: 0 Teb: 00007ff6`3f28a000 Unfrozen
Child-SP RetAddr Call Site00000020`a84cf558 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa00000020`a84cf560 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x9400000020`a84cf600 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a00000020`a84cf6c0 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x10900000020`a84cf700 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b900000020`a84cf7a0 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d00000020`a84cfb60 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x2200000020`a84cfb90 00000000`00000000 ntdll!RtlUserThreadStart+0x34501 Id: 25bf4.368 Suspend: 0 Teb: 00007ff6`3f288000 Unfrozen
Child-SP RetAddr Call Site00000020`a854f448 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa00000020`a854f450 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x9400000020`a854f4f0 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a00000020`a854f5b0 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x10900000020`a854f5f0 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b900000020`a854f690 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d00000020`a854fcd0 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x2200000020`a854fd00 00000000`00000000 ntdll!RtlUserThreadStart+0x34502 Id: 25bf4.3d690 Suspend: 0 Teb: 00007ff6`3f286000 Unfrozen
Child-SP RetAddr Call Site00000020`a85cfa98 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa00000020`a85cfaa0 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x9400000020`a85cfb40 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a00000020`a85cfc00 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x10900000020`a85cfc40 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b900000020`a85cfce0 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d00000020`a85cff20 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x2200000020`a85cff50 00000000`00000000 ntdll!RtlUserThreadStart+0x34503 Id: 25bf4.406c Suspend: 0 Teb: 00007ff6`3f284000 Unfrozen
Child-SP RetAddr Call Site00000020`a864fc58 00007fff`d4ea1118 ntdll!NtWaitForSingleObject+0xa00000020`a864fc60 00007fff`ce50ce66 KERNELBASE!WaitForSingleObjectEx+0x9400000020`a864fd00 00007fff`ce50d247 clr!CLRSemaphore::Wait+0x8a00000020`a864fdc0 00007fff`ce50d330 clr!ThreadpoolMgr::UnfairSemaphore::Wait+0x10900000020`a864fe00 00007fff`ce5de8b6 clr!ThreadpoolMgr::WorkerThreadStart+0x1b900000020`a864fea0 00007fff`d60613d2 clr!Thread::intermediateThreadProc+0x7d00000020`a864fee0 00007fff`d7be5454 kernel32!BaseThreadInitThunk+0x2200000020`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, Callee000000001bdbeda0 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::EnsureGateThreadRunning000000001bdbef00 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 000007fe919d0060000000001bdbf040 000007fef1119e03 clr!CallDescrWorkerInternal+0x83000000001bdbf080 000007fef1119e7e clr!CallDescrWorkerWithHandler+0x4a, calling clr!CallDescrWorkerInternal000000001bdbf0a0 000007fef1111feb clr!HardCodedMetaSig::GetBinarySig+0x58, calling clr!_security_check_cookie000000001bdbf0c0 000007fef1119ef0 clr!MethodDescCallSite::CallTargetWorker+0x2e2, calling clr!CallDescrWorkerWithHandler000000001bdbf100 000007fef10c6472 clr!ArgIteratorTemplate<ArgIteratorBase>::ComputeReturnFlags+0x4a, calling clr!SigPointer::PeekElemTypeClosed000000001bdbf130 000000007714dba8 ntdll!RtlAllocateHeap+0x178, calling ntdll!TpAlpcRegisterCompletionList+0xa720000000001bdbf150 000007fef111b34a clr!MethodDescCallSite::CallTargetWorker+0xa1, calling clr!_chkstk000000001bdbf1a0 000007fef111b281 clr!ArgIteratorTemplate<ArgIteratorBase>::ForceSigWalk+0x139, calling clr!ArgIteratorBase::IsVarArg000000001bdbf270 000007fef1270bf9 clr!QueueUserWorkItemManagedCallback+0x2a, calling clr!MethodDescCallSite::CallTargetWorker000000001bdbf350 000007fef112458c clr!Frame::Pop+0x50000000001bdbf390 000007fef112451a clr!COMCustomAttribute::PopSecurityContextFrame+0x192, calling clr!Frame::Pop+0x24000000001bdbf420 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock000000001bdbf430 000007fef1124413 clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame+0x18, calling clr!Frame::Push000000001bdbf460 000007fef11243f3 clr!FrameWithCookie<DebuggerU2MCatchHandlerFrame>::FrameWithCookie<DebuggerU2MCatchHandlerFrame>+0x1c, calling clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame000000001bdbf480 0000000077152631 ntdll!LdrGetProcedureAddress+0x11, calling ntdll!LdrGetProcedureAddressEx000000001bdbf490 000007fef1124491 clr!COMCustomAttribute::PopSecurityContextFrame+0xbd, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x12c000000001bdbf4a0 000007fef1123ec1 clr!CORProfilerTrackThreads+0x9, calling clr!CORProfilerPresent000000001bdbf4d0 000007fef126fcf6 clr!Thread::HasStarted+0x16e, calling clr!CORProfilerTrackThreads000000001bdbf520 000007fef11245ef clr!Thread::SetExposedContext+0x93, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x48000000001bdbf580 000007fef1270b60 clr!ManagedPerAppDomainTPCount::DispatchWorkItem+0xb4, calling clr!Thread::SetExposedContext+0x64000000001bdbf680 000007fefe860c82 ole32!CoUninitialize+0xbe [d:\w7rtm\com\ole32\com\class\compobj.cxx:2657], calling ole32!NotifyInitializeSpies [d:\w7rtm\com\ole32\com\class\compobj.cxx:1717]000000001bdbf6b0 000007fef126fec9 clr!Thread::SetApartment+0xf9, calling clr!Thread::GetApartment000000001bdbf6d0 000007fef1299297 clr!PerAppDomainTPCountList::GetAppDomainIndexForThreadpoolDispatch+0x6f000000001bdbf710 000007fef129920b clr!ThreadpoolMgr::ExecuteWorkRequest+0x4c000000001bdbf740 000007fef129910a clr!ThreadpoolMgr::WorkerThreadStart+0xf6, calling clr!ThreadpoolMgr::ExecuteWorkRequest000000001bdbf770 0000000076f01a0a kernel32!HeapFree+0xa, calling ntdll!RtlFreeHeap000000001bdbf7a0 000007fef10b435d clr!EEHeapFreeInProcessHeap+0x39, calling kernel32!HeapFree000000001bdbf800 000007fef11833de clr!Thread::intermediateThreadProc+0x7d000000001bdbf900 000007fef11833c7 clr!Thread::intermediateThreadProc+0x66, calling clr!_chkstk000000001bdbf940 0000000076ef59bd kernel32!BaseThreadInitThunk+0xd000000001bdbf970 000000007712a2e1 ntdll!RtlUserThreadStart+0x21OS Thread Id: 0x7328 (5)Current frame: ntdll!NtDelayExecution+0xaChild-SP RetAddr Caller, Callee000000001c1fec70 000007fefd051203 KERNELBASE!SleepEx+0xb3, calling ntdll!NtDelayExecution000000001c1fece0 000007fefd05394b KERNELBASE!SetThreadLocale+0xab, calling ntdll!RtlActivateActivationContextUnsafeFast000000001c1fed10 000007fef12b69f8 clr!CExecutionEngine::ClrSleepEx+0x29, calling kernel32!SleepEx000000001c1fed40 000007fef12b6b81 clr!Thread::UserSleep+0x76, calling clr!ClrSleepEx000000001c1fed60 000007fef10b49d4 clr!HelperMethodFrame::Push+0x19, calling clr!GetThread000000001c1fed80 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::UserSleep000000001c1fedd0 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_InlineGetThread000000001c1feea0 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!LazyMachStateCaptureState000000001c1feee0 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::EnsureGateThreadRunning000000001c1ff070 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 000007fe919d0060000000001c1ff1b0 000007fef1119e03 clr!CallDescrWorkerInternal+0x83000000001c1ff1f0 000007fef1119e7e clr!CallDescrWorkerWithHandler+0x4a, calling clr!CallDescrWorkerInternal000000001c1ff210 000007fef1111feb clr!HardCodedMetaSig::GetBinarySig+0x58, calling clr!_security_check_cookie000000001c1ff230 000007fef1119ef0 clr!MethodDescCallSite::CallTargetWorker+0x2e2, calling clr!CallDescrWorkerWithHandler000000001c1ff270 000007fef10c6472 clr!ArgIteratorTemplate<ArgIteratorBase>::ComputeReturnFlags+0x4a, calling clr!SigPointer::PeekElemTypeClosed000000001c1ff2c0 000007fef111b34a clr!MethodDescCallSite::CallTargetWorker+0xa1, calling clr!_chkstk000000001c1ff310 000007fef111b281 clr!ArgIteratorTemplate<ArgIteratorBase>::ForceSigWalk+0x139, calling clr!ArgIteratorBase::IsVarArg000000001c1ff3e0 000007fef1270bf9 clr!QueueUserWorkItemManagedCallback+0x2a, calling clr!MethodDescCallSite::CallTargetWorker000000001c1ff400 000007fef1a5119a mscoreei!DllMainCRTStartup+0xce, calling mscoreei!DllMain000000001c1ff4b0 000007fef1182676 clr!REGUTIL::GetConfigInteger+0x62, calling clr!REGUTIL::RegCacheValueNameSeenPerhaps000000001c1ff4c0 000007fef112458c clr!Frame::Pop+0x50000000001c1ff500 000007fef112451a clr!COMCustomAttribute::PopSecurityContextFrame+0x192, calling clr!Frame::Pop+0x24000000001c1ff510 000007fefd06aa36 KERNELBASE!SetThreadStackGuarantee+0x46, calling KERNELBASE!GetSystemInfo000000001c1ff530 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock000000001c1ff590 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock000000001c1ff5a0 000007fef1124413 clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame+0x18, calling clr!Frame::Push000000001c1ff5c0 000007fef10c3a6c clr!ThreadStore::CheckForEEShutdown+0x1e, calling clr!ThreadStore::OtherThreadsComplete000000001c1ff5d0 000007fef11243f3 clr!FrameWithCookie<DebuggerU2MCatchHandlerFrame>::FrameWithCookie<DebuggerU2MCatchHandlerFrame>+0x1c, calling clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame000000001c1ff5f0 000007fef126fdb2 clr!ThreadStore::TransferStartedThread+0x83, calling clr!ThreadStore::CheckForEEShutdown000000001c1ff600 000007fef1124491 clr!COMCustomAttribute::PopSecurityContextFrame+0xbd, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x12c000000001c1ff610 000007fef1123ec1 clr!CORProfilerTrackThreads+0x9, calling clr!CORProfilerPresent000000001c1ff640 000007fef126fcf6 clr!Thread::HasStarted+0x16e, calling clr!CORProfilerTrackThreads000000001c1ff690 000007fef11245ef clr!Thread::SetExposedContext+0x93, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x48000000001c1ff6f0 000007fef1270b60 clr!ManagedPerAppDomainTPCount::DispatchWorkItem+0xb4, calling clr!Thread::SetExposedContext+0x64000000001c1ff700 000007fef1149f94 clr!SafeReleasePreemp+0x74000000001c1ff740 000007fefe8622bd ole32!IsRunningInRPCSS+0x41 [d:\w7rtm\com\ole32\com\class\compobj.cxx:1959], calling ole32!__security_check_cookie [d:\win7sp1_ldr\minkernel\crts\crtw32\misc\amd64\amdsecgs.asm:72]000000001c1ff780 000007fefe862528 ole32!RegisterThreadCleanupCallback+0x28 [d:\w7rtm\com\ole32\com\class\compobj.cxx:1855], calling KERNELBASE!FlsSetValue000000001c1ff7f0 000007fefe860c82 ole32!CoUninitialize+0xbe [d:\w7rtm\com\ole32\com\class\compobj.cxx:2657], calling ole32!NotifyInitializeSpies [d:\w7rtm\com\ole32\com\class\compobj.cxx:1717]000000001c1ff820 000007fef126fec9 clr!Thread::SetApartment+0xf9, calling clr!Thread::GetApartment000000001c1ff840 000007fef1299297 clr!PerAppDomainTPCountList::GetAppDomainIndexForThreadpoolDispatch+0x6f000000001c1ff880 000007fef129920b clr!ThreadpoolMgr::ExecuteWorkRequest+0x4c000000001c1ff8b0 000007fef129910a clr!ThreadpoolMgr::WorkerThreadStart+0xf6, calling clr!ThreadpoolMgr::ExecuteWorkRequest000000001c1ff8e0 0000000076f01a0a kernel32!HeapFree+0xa, calling ntdll!RtlFreeHeap000000001c1ff910 000007fef10b435d clr!EEHeapFreeInProcessHeap+0x39, calling kernel32!HeapFree000000001c1ff970 000007fef11833de clr!Thread::intermediateThreadProc+0x7d000000001c1ffaf0 000007fef11833c7 clr!Thread::intermediateThreadProc+0x66, calling clr!_chkstk000000001c1ffb30 0000000076ef59bd kernel32!BaseThreadInitThunk+0xd000000001c1ffb60 000000007712a2e1 ntdll!RtlUserThreadStart+0x21
OS Thread Id: 0x3608 (4)
Current frame: (MethodDesc 000007fe91923920 +0x49 ConsoleApplication5.Program.DoWork())Child-SP RetAddr Caller, Callee000000001bfef060 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+0x83000000001bfef2d0 000007fef1119e7e clr!CallDescrWorkerWithHandler+0x4a, calling clr!CallDescrWorkerInternal000000001bfef310 000007fef1119ef0 clr!MethodDescCallSite::CallTargetWorker+0x2e2, calling clr!CallDescrWorkerWithHandler000000001bfef350 000007fef10c6472 clr!ArgIteratorTemplate<ArgIteratorBase>::ComputeReturnFlags+0x4a, calling clr!SigPointer::PeekElemTypeClosed000000001bfef3a0 000007fef111b34a clr!MethodDescCallSite::CallTargetWorker+0xa1, calling clr!_chkstk000000001bfef3f0 000007fef111b281 clr!ArgIteratorTemplate<ArgIteratorBase>::ForceSigWalk+0x139, calling clr!ArgIteratorBase::IsVarArg000000001bfef4c0 000007fef123594d clr!ThreadNative::KickOffThread_Worker+0x105, calling clr!MethodDescCallSite::CallTargetWorker000000001bfef520 000000007712a3e2 ntdll!RtlUserThreadStart+0x122, calling ntdll!RtlLeaveCriticalSection000000001bfef590 000000007714dba8 ntdll!RtlAllocateHeap+0x178, calling ntdll!TpAlpcRegisterCompletionList+0xa720000000001bfef650 000007fefe862645 ole32!InitThreadCtx+0x41 [d:\w7rtm\com\ole32\com\class\compobj.cxx:2288]000000001bfef670 000007fefe8629bf ole32!TLSAddToMap+0x9f [d:\w7rtm\com\ole32\com\class\tls.cxx:166], calling ntdll!RtlLeaveCriticalSection000000001bfef680 000007fefe8625b5 ole32!wCoInitializeEx+0x79 [d:\w7rtm\com\ole32\com\class\compobj.cxx:2467], calling ole32!InitThreadCtx [d:\w7rtm\com\ole32\com\class\compobj.cxx:2235]000000001bfef6a0 000007fefe862528 ole32!RegisterThreadCleanupCallback+0x28 [d:\w7rtm\com\ole32\com\class\compobj.cxx:1855], calling KERNELBASE!FlsSetValue000000001bfef6d0 000007fef11245bb clr!ManagedThreadCallState::IsAppDomainEqual+0x1f, calling clr!ADID::operator==000000001bfef700 000007fef112458c clr!Frame::Pop+0x50000000001bfef730 000007fef10b378a clr!EEHeapAllocInProcessHeap+0x46, calling ntdll!RtlAllocateHeap000000001bfef740 000007fef112451a clr!COMCustomAttribute::PopSecurityContextFrame+0x192, calling clr!Frame::Pop+0x24000000001bfef760 000007fef126f57a clr!Thread::AllocateIOCompletionContext+0x13, calling clr!operator new000000001bfef770 000007fef10b31ec clr!ClrFlsIncrementValue+0x18, calling clr!ClrFlsGetBlock000000001bfef7d0 000007fef126fdb2 clr!ThreadStore::TransferStartedThread+0x83, calling clr!ThreadStore::CheckForEEShutdown000000001bfef7e0 000007fef1124413 clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame+0x18, calling clr!Frame::Push000000001bfef810 000007fef11243f3 clr!FrameWithCookie<DebuggerU2MCatchHandlerFrame>::FrameWithCookie<DebuggerU2MCatchHandlerFrame>+0x1c, calling clr!DebuggerU2MCatchHandlerFrame::DebuggerU2MCatchHandlerFrame000000001bfef820 000007fef126fcf6 clr!Thread::HasStarted+0x16e, calling clr!CORProfilerTrackThreads000000001bfef840 000007fef1124491 clr!COMCustomAttribute::PopSecurityContextFrame+0xbd, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x12c000000001bfef8d0 000007fef11245ef clr!Thread::SetExposedContext+0x93, calling clr!COMCustomAttribute::PopSecurityContextFrame+0x48000000001bfef930 000007fef1235831 clr!ThreadNative::KickOffThread+0xbd, calling clr!Thread::SetExposedContext+0x64000000001bfef970 0000000076f01a0a kernel32!HeapFree+0xa, calling ntdll!RtlFreeHeap000000001bfef9d0 000007fef10b4384 clr!operator delete+0x14, calling clr!EEHeapFreeInProcessHeap000000001bfefa00 000007fef11833de clr!Thread::intermediateThreadProc+0x7d000000001bfefb00 000007fef11833c7 clr!Thread::intermediateThreadProc+0x66, calling clr!_chkstk000000001bfefb40 0000000076ef59bd kernel32!BaseThreadInitThunk+0xd000000001bfefb70 000000007712a2e1 ntdll!RtlUserThreadStart+0x21