I'm doing postmortem analysis on a high memory pressure .net application using WinDbg with a process dump and this process is a Windows service.
I got a feeling that most of this 14GB of this process memory consumption comes from aborted threads thus lots of orphan semaphore/events/mutant etc. But I wasn't able to put all this together and add them up like how much memory it takes for a single semaphore/events/mutant and what kind of WinDbg commands that will be helpful for this kind of situation?
The following is the WinDbg output:
!handle
**Type Count**
None 90
Event 5550
Section 41
File 1166
Directory 3
Mutant 160
Semaphore 4581
Key 78
Token 2
Thread 553
IoCompletion 6
Timer 1
TpWorkerFactory 3
ALPC Port 9
WaitCompletionPacket 33
!address -summary
--- Usage Summary ---------------- RgnCount ----------- Total Size -------- %ofBusy %ofTotal
<unknown> 471 3`86ea2000 ( 14.108 Gb) 92.40% 0.01%
!threads(lots of thread listed have ThreadAbortException exceptions)
Lock
ID OSID ThreadOBJ State GC Mode GC Alloc Context Domain Count Apt Exception
12 3 33f0 00000017e3c23200 1282b221 Preemptive 0000000000000000:0000000000000000 00000017e3bb3930 1 MTA System.Threading.ThreadAbortException 000000181de5d668