--- sys/kern/subr_turnstile.c 2012-12-16 21:34:47.380655934 +0100 +++ sys/kern/subr_turnstile.c.new 2012-12-16 21:34:34.876655759 +0100 @@ -210,20 +210,19 @@ thread_lock_flags(td, MTX_DUPOK); mtx_unlock_spin(&ts->ts_lock); MPASS(td->td_proc != NULL); MPASS(td->td_proc->p_magic == P_MAGIC); /* * If the thread is asleep, then we are probably about - * to deadlock. To make debugging this easier, just - * panic and tell the user which thread misbehaved so - * they can hopefully get a stack trace from the truly - * misbehaving thread. + * to deadlock. To make debugging this easier, show + * backtrace of misbehaving thread and panic to not + * leave the kernel deadlocked. */ if (TD_IS_SLEEPING(td)) { printf( "Sleeping thread (tid %d, pid %d) owns a non-sleepable lock\n", td->td_tid, td->td_proc->p_pid); kdb_backtrace_thread(td); panic("sleeping thread"); }