From aea9dba46b81abc5c0fd4c42d3ac762d3bc1de37 Mon Sep 17 00:00:00 2001 From: Mark Johnston Date: Sat, 10 Aug 2024 15:42:35 +0000 Subject: [PATCH] turnstile: Mention the lock name when panicking due to a sleeping thread This will hopefully make it a bit easier to track down the cause of such panics. MFC after: 2 weeks --- sys/kern/subr_turnstile.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 0a20f3163e30..544dd9f52e9c 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -246,7 +246,8 @@ propagate_priority(struct thread *td) "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"); + panic("sleeping thread holds %s", + ts->ts_lockobj->lo_name); } /*