From owner-freebsd-current Tue Sep 25 18: 6:50 2001 Delivered-To: freebsd-current@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id C42C637B419; Tue, 25 Sep 2001 18:06:45 -0700 (PDT) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 26 Sep 2001 02:04:44 +0100 (BST) To: John Baldwin Cc: Bill Fenner , freebsd-current@FreeBSD.org, evms@cs.bu.edu, mark@grondar.za, peter@wemm.org Subject: Re: panic on mount In-Reply-To: Your message of "Tue, 25 Sep 2001 14:47:13 PDT." Date: Wed, 26 Sep 2001 02:04:40 +0100 From: Ian Dowse Message-ID: <200109260204.aa91624@salmon.maths.tcd.ie> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message , John Baldwin writes: > >It looks like the mutex is really held since the mtx_assert before >witness_unlock didn't trigger. You can try turning witness off for the time >being as a workaround. I'm not sure why witness would be broken, however. Revision 1.41 of sys/mutex.h seems to be the culprit. Before 1.41, the defined(LOCK_DEBUG) and !defined(LOCK_DEBUG) cases were identical except that with LOCK_DEBUG defined, the function versions of _mtx_*lock_* were used. After 1.41, the !defined(LOCK_DEBUG) case misses all the MPASS/KASSERT/LOCK_LOG/WITNESS bits. A simple workaround that seems to stop the panics is below. Ian Index: mutex.h =================================================================== RCS file: /dump/FreeBSD-CVS/src/sys/sys/mutex.h,v retrieving revision 1.41 diff -u -r1.41 mutex.h --- mutex.h 2001/09/22 21:19:55 1.41 +++ mutex.h 2001/09/26 00:46:09 @@ -238,7 +238,7 @@ #define mtx_unlock(m) mtx_unlock_flags((m), 0) #define mtx_unlock_spin(m) mtx_unlock_spin_flags((m), 0) -#ifdef LOCK_DEBUG +#if 1 #define mtx_lock_flags(m, opts) \ _mtx_lock_flags((m), (opts), LOCK_FILE, LOCK_LINE) #define mtx_unlock_flags(m, opts) \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message