Date: Mon, 16 Jan 2017 20:34:42 +0000 (UTC) From: Ed Maste <emaste@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r312311 - head/sys/kern Message-ID: <201701162034.v0GKYgV2042515@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: emaste Date: Mon Jan 16 20:34:42 2017 New Revision: 312311 URL: https://svnweb.freebsd.org/changeset/base/312311 Log: disambiguate msleep KASSERT diagnostics Previously "panic: msleep" could happen for a few different reasons. Break the KASSERTs out into individual cases to identify the failing condition. Found during the investigation that resulted in r308288. Reviewed by: kib, jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8604 Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Mon Jan 16 20:29:28 2017 (r312310) +++ head/sys/kern/kern_synch.c Mon Jan 16 20:34:42 2017 (r312311) @@ -152,8 +152,8 @@ _sleep(void *ident, struct lock_object * "Sleeping on \"%s\"", wmesg); KASSERT(sbt != 0 || mtx_owned(&Giant) || lock != NULL, ("sleeping without a lock")); - KASSERT(p != NULL, ("msleep1")); - KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); + KASSERT(ident != NULL, ("_sleep: NULL ident")); + KASSERT(TD_IS_RUNNING(td), ("_sleep: curthread not running")); if (priority & PDROP) KASSERT(lock != NULL && lock != &Giant.lock_object, ("PDROP requires a non-Giant lock")); @@ -247,8 +247,8 @@ msleep_spin_sbt(void *ident, struct mtx td = curthread; p = td->td_proc; KASSERT(mtx != NULL, ("sleeping without a mutex")); - KASSERT(p != NULL, ("msleep1")); - KASSERT(ident != NULL && TD_IS_RUNNING(td), ("msleep")); + KASSERT(ident != NULL, ("msleep_spin_sbt: NULL ident")); + KASSERT(TD_IS_RUNNING(td), ("msleep_spin_sbt: curthread not running")); if (SCHEDULER_STOPPED()) return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201701162034.v0GKYgV2042515>