debugging deadlocks

Thanks for the previous reply Tony. Another question though. Debugging
deadlocks with ERESOURCEs is fairly easy (!locks and get digging).
However, if I have a thread(s) waiting on a dispatcher object how do I
find out which thread currently owns said object? There is no reference
to the owning thread in the dispatcher header so where is this information
hidden? In the dispatcher database somewhere? Thanks in advance for your
help. Regards,

Douglas.

Minor question. Where should one find the !kdex2x86.list functionality
when debugging XP dumps since this is flagged as for W2K use only. I
could not find it in any of the windbg extension dlls under directories
winext or winxp.

If the dispatcher object is a KEVENT, then there is truly no ownership
information stored. If it is a KMUTANT, the owning thread is stored
just beyond the dispatch header (“dt nt!_KMUTANT”). Semaphore’s do not
store ownership information either. Alas, in such cases it is often
impossible to prove the deadlock dependency cycle.

If you really like (or must) dig, then you can always unassembled the
code stream of other suspect threads to see if you can find where they
“acquired” the mutex or semaphore. This is an ugly, slow, painful path
but one that you can use if you really do need to find the deadlock.

One other thing to recall: KEVENTs come in two flavors - notification
and synchronization. If the KEVENT is the former type and you suspect
it is involved in a deadlock situation, you can often track back by
looking at the allocation point (I’ve often found that notification
events are created within the stack frame of a local caller, helping me
track it down, since it HAD to be passed to another thread somehow…)

I DO wish there were ownership information. Deadlock debugging would be
so much easier!

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Douglas G. Hanley
Sent: Tuesday, February 08, 2005 3:59 AM
To: Kernel Debugging Interest List
Subject: [windbg] debugging deadlocks

Thanks for the previous reply Tony. Another question though. Debugging
deadlocks with ERESOURCEs is fairly easy (!locks and get digging).
However, if I have a thread(s) waiting on a dispatcher object how do I
find out which thread currently owns said object? There is no reference
to the owning thread in the dispatcher header so where is this
information
hidden? In the dispatcher database somewhere? Thanks in advance for
your
help. Regards,

Douglas.

Minor question. Where should one find the !kdex2x86.list functionality
when debugging XP dumps since this is flagged as for W2K use only. I
could not find it in any of the windbg extension dlls under directories
winext or winxp.


You are currently subscribed to windbg as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

Just noticed your second point:

I generally just copy the debugger extension into the directory where I
want. In addition to !list (which is the best list walker I’ve seen)
there are a few other gems.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Douglas G. Hanley
Sent: Tuesday, February 08, 2005 3:59 AM
To: Kernel Debugging Interest List
Subject: [windbg] debugging deadlocks

Thanks for the previous reply Tony. Another question though. Debugging
deadlocks with ERESOURCEs is fairly easy (!locks and get digging).
However, if I have a thread(s) waiting on a dispatcher object how do I
find out which thread currently owns said object? There is no reference
to the owning thread in the dispatcher header so where is this
information
hidden? In the dispatcher database somewhere? Thanks in advance for
your
help. Regards,

Douglas.

Minor question. Where should one find the !kdex2x86.list functionality
when debugging XP dumps since this is flagged as for W2K use only. I
could not find it in any of the windbg extension dlls under directories
winext or winxp.


You are currently subscribed to windbg as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com

What is the difference between !kdex2x86.list and !ext.list functionality?
Does the old one do something better?

----- Original Message -----
From: “Tony Mason”
To: “Kernel Debugging Interest List”
Sent: Tuesday, February 08, 2005 5:31 AM
Subject: RE: [windbg] debugging deadlocks

Just noticed your second point:

I generally just copy the debugger extension into the directory where I
want. In addition to !list (which is the best list walker I’ve seen)
there are a few other gems.

Regards,

Tony

Tony Mason
Consulting Partner
OSR Open Systems Resources, Inc.
http://www.osr.com

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Douglas G. Hanley
Sent: Tuesday, February 08, 2005 3:59 AM
To: Kernel Debugging Interest List
Subject: [windbg] debugging deadlocks

Thanks for the previous reply Tony. Another question though. Debugging
deadlocks with ERESOURCEs is fairly easy (!locks and get digging).
However, if I have a thread(s) waiting on a dispatcher object how do I
find out which thread currently owns said object? There is no reference
to the owning thread in the dispatcher header so where is this
information
hidden? In the dispatcher database somewhere? Thanks in advance for
your
help. Regards,

Douglas.

Minor question. Where should one find the !kdex2x86.list functionality
when debugging XP dumps since this is flagged as for W2K use only. I
could not find it in any of the windbg extension dlls under directories
winext or winxp.


You are currently subscribed to windbg as: xxxxx@osr.com
To unsubscribe send a blank email to xxxxx@lists.osr.com


You are currently subscribed to windbg as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com