Unexplained kernel panic on 5-STABLE

John Baldwin jhb at freebsd.org
Mon Aug 14 14:17:18 UTC 2006


On Sunday 13 August 2006 03:36, Peter van Heusden wrote:
> Hi everyone
> 
> Almost every day, some time around midnight, my FreeBSD 5-STABLE kernel
> panics. I've attached the output of a kgdb session of the saved core
> file - is there any further info that would be useful to debugging? I've
> got no idea where to start looking for a solution to this problem, so
> please help!!

A thread is sleeping while holding a mutex.

> (kgdb) list *0xc066dfc3
> 0xc066dfc3 is in propagate_priority
> (/usr/src/sys/kern/subr_turnstile.c:245).
> 240                     /*
> 241                      * Pick up the lock that td is blocked on.
> 242                      */
> 243                     ts = td->td_blocked;
> 244                     MPASS(ts != NULL);
> 245                     tc = TC_LOOKUP(ts->ts_lockobj);
> 246                     mtx_lock_spin(&tc->tc_lock);
> 247    
> 248                     /*
> 249                      * This thread may not be blocked on this
> turnstile anymore
> (kgdb) backtrace
> #19 0xc066dfc3 in propagate_priority (td=0xc1e22c00) at
> /usr/src/sys/kern/subr_turnstile.c:243

Do the following in 'kgdb':

frame 19
p td->td_proc->p_pid
(this will output the 'pid' of the misbehaving thread)
proc <pid>
(<pid> is the pid from the previous command, this switches you to that
 thread)
backtrace

That backtrace will then show you which thread slept while holding a
mutex.

-- 
John Baldwin


More information about the freebsd-stable mailing list