diff --git a/sys/kern/kern_mutex.c b/sys/kern/kern_mutex.c index 18dcc7ea3851..bf157eb240f3 100644 --- a/sys/kern/kern_mutex.c +++ b/sys/kern/kern_mutex.c @@ -119,7 +119,9 @@ propagate_priority(struct thread *td) MPASS(td->td_proc != NULL); MPASS(td->td_proc->p_magic == P_MAGIC); - KASSERT(!TD_IS_SLEEPING(td), ("sleeping thread owns a mutex")); + KASSERT(!TD_IS_SLEEPING(td), ( + "sleeping thread (pid %d) owns a mutex", + td->td_proc->p_pid)); if (td->td_priority <= pri) /* lower is higher priority */ return; diff --git a/sys/kern/subr_turnstile.c b/sys/kern/subr_turnstile.c index 18dcc7ea3851..bf157eb240f3 100644 --- a/sys/kern/subr_turnstile.c +++ b/sys/kern/subr_turnstile.c @@ -119,7 +119,9 @@ propagate_priority(struct thread *td) MPASS(td->td_proc != NULL); MPASS(td->td_proc->p_magic == P_MAGIC); - KASSERT(!TD_IS_SLEEPING(td), ("sleeping thread owns a mutex")); + KASSERT(!TD_IS_SLEEPING(td), ( + "sleeping thread (pid %d) owns a mutex", + td->td_proc->p_pid)); if (td->td_priority <= pri) /* lower is higher priority */ return;