threads/132215: Crash after running ppp

Robert Watson rwatson at
Mon Mar 2 08:52:40 PST 2009

On Mon, 2 Mar 2009, John Baldwin wrote:

>> Unread portion of the kernel message buffer:
>> Sleeping thread (tid 100053, pid 516) owns a non-sleepable lock
>> panic: sleeping thread
> Can you do something like this in kgdb:
> frame 5
> set $td = (struct thread *)(m->mtx_lock & ~3)
> p $td->td_tid
> (This should print out a thread ID)
> thread $td->td_tid
> where
> This should give you the stack trace of the misbehaving thread which slept
> while holding a route lock.
> Also, this is a kernel bug, not a thread issue.

Actually, just a stack trace of tid 100053/pid 516 should be sufficient.  This 
is the second report I've had of a panic along these lines relating to ppp, 
and it seems likely to me that the fixes to routing locking have introduced an 
edge case where the routing code sleeps allocating or waiting for a route 
while holding a lock where it didn't happen previously.  If we can work out 
the stack trace leading to the sleep, we can probably fix this in short order.

Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the freebsd-threads mailing list