Subject: Re: lock debugging
To: Jed Davis <>
From: Pavel Cahyna <>
List: tech-kern
Date: 11/17/2006 11:54:46
On Fri, Nov 17, 2006 at 05:49:54AM -0500, Jed Davis wrote:
> For diagnosing problems with locking (e.g., lots of processes getting
> stuck on vnlock), it would be nice to be able to dump, for each lock
> on the system that's being slept on, which lwp holds it and which are
> sleeping on it.  Finding the thread at the root (or, for vnlock, leaf)
> of the trouble should then be easier.
> Given a struck lock*, the identity of the holder is right there; but
> getting from a sleeping lwp to the lock it's sleeping on seems harder.
> A quick glance shows that the sleep address will point to the struct
> lock (except in the LK_DRAIN case when it's the lk_flags field, it
> looks like), but it might also point to something else entirely.

yes, I'm working on this.