asking for information on "Dead Threads" (seen in !threads)

asking for information on "Dead Threads" (seen in !threads)

Post by Umlja3lNY0 » Thu, 22 May 2008 17:33:01


i I have a problem where a windows application has a low CPU hang and I am
trying to rule out some symptoms I am seeing.

Without going into too many details at this time, BEFORE the problem occurs
if i take a dump of the process (using adplus -hang) I see the following

0:000> !threads
Loaded Son of Strike data table version 5 from
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\mscorwks.dll"
ThreadCount: 27
UnstartedThread: 0
BackgroundThread: 4
PendingThread: 0
DeadThread: 22
PreEmptive GC Alloc
Lock
ID ThreadOBJ State GC Context Domain
Count APT Exception
0 0x1560 0x0014f868 0x6020 Enabled 0x080c74ac:0x080c75a8 0x00169498
0 STA
2 0x1758 0x00162508 0xb220 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Finalizer)
8 0xf50 0x00231da0 0x1220 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn
10 0x1298 0x00232dd0 0x2001220 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn
XXX 0 0x00238aa0 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x00239448 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023cec8 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023cb58 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0023cd10 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023d080 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x00237378 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023d830 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0023d9e8 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023dba0 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0023dd58 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0514b1a0 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0514b358 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0514b510 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0514b6c8 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0514b880 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0514ba38 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0514bbf0 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0514bda8 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023b250 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
12 0x1548 0x0023b408 0x1800220 Enabled 0x00000000:0x00000000 0x00169498
0 MTA (Threadpool Worker)
XXX 0 0x0023b5c0 0x1800820 Enabled 0x00000000:0x00000000 0x00169498
0 Ukn (Threadpool Worker)
XXX 0 0x0023b778 0x1800820 Enabled
 
 
 

asking for information on "Dead Threads" (seen in !threads)

Post by Ben Voigt » Fri, 23 May 2008 06:21:33

> Now I don't know much about "Dead Threads" and I want to know if this

I would guess that these are the Windows equivalent of a unix "zombie", that
is the thread or process has exited, but someone still a handle to it so the
thread descriptor is kept around. It's just a resource leak. How do you
create your threads? Do you ever call CloseHandle on the thread handle?

 
 
 

asking for information on "Dead Threads" (seen in !threads)

Post by kodehove » Thu, 29 May 2008 15:48:02


Dead threads as reported by !threads are managed threads that have
completed whatever task they were assigned. If you application still
holds a reference to the corresponding thread instance, the thread
will be reported as dead and the de *** id for the thread is XXXX.
When the thread instance is no longer referenced, it will be collected
by the GC and it will disappear from the !threads listing.

Brian