VS bug #:
Bug 1256002: [MemWatson] Memory: Thd_ThreadStack_microsoft_visualstudio_shell_ui_internal!Microsoft.VisualStudio.Services.VsTask.InternalGetResult
Analyzing some user dumps show many threads with the same stack:
For example, 1 dump shows 1800 threads totalling 2 Gigabytes with this same stack:
` #
00 ntdll!NtWaitForMultipleObjects
01 KERNELBASE!WaitForMultipleObjectsEx
02 clr!WaitForMultipleObjectsEx_SO_TOLERANT
03 clr!Thread::DoAppropriateAptStateWait
04 clr!Thread::DoAppropriateWaitWorker
05 clr!Thread::DoAppropriateWait
06 clr!SOIntolerantTransitionHandler::SetNoException
07 clr!CLREventBase::WaitEx
08 clr!CLREventBase::Wait
09 clr!Thread::Wait
0a clr!Thread::Block
0b clr!SyncBlock::Wait
0c clr!ObjHeader::Wait
0d clr!Object::Wait
0e clr!ObjectNative::WaitTimeout
0f mscorlib_ni!System.Threading.Monitor.Wait
10 mscorlib_ni!System.Threading.Monitor.Wait
11 mscorlib_ni!System.Threading.ManualResetEventSlim.Wait
12 mscorlib_ni!System.Threading.Tasks.Task.SpinThenBlockingWait
13 mscorlib_ni!System.Threading.Tasks.Task.InternalWait
14 mscorlib_ni!System.Threading.Tasks.Task
Sample ThreadPool Thread Leak demo:
https://github.com/calvinhsia/ThreadPool/blob/master/ThreadPool/MainWindow.xaml.cs
look at the DoDemoThreadLeakAsync method