Skip to content

Commit

Permalink
turnstile: Mention the lock name when panicking due to a sleeping thread
Browse files Browse the repository at this point in the history
This will hopefully make it a bit easier to track down the cause of such
panics.

MFC after:	2 weeks
  • Loading branch information
markjdb committed Aug 10, 2024
1 parent ce4dcb9 commit aea9dba
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sys/kern/subr_turnstile.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

/*
Expand Down

0 comments on commit aea9dba

Please sign in to comment.