From owner-freebsd-current Tue Sep 10 13:48:26 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BCA7F37B400; Tue, 10 Sep 2002 13:48:23 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4A26E43E3B; Tue, 10 Sep 2002 13:48:22 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id GAA01539; Wed, 11 Sep 2002 06:11:02 +1000 Date: Wed, 11 Sep 2002 06:18:48 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Robert Watson Cc: Don Lewis , , Subject: Re: vnode lock assertion problem in nfs_link() In-Reply-To: Message-ID: <20020911060453.C3443-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Tue, 10 Sep 2002, Robert Watson wrote: > ... Also, last time I tried to use the ddb > show lockedvnods command, I got the problem attached below due to locking > issues, which makes it a lot harder to debug locking problems... > > Robert N M Watson FreeBSD Core Team, TrustedBSD Projects > robert@fledge.watson.org Network Associates Laboratories > > db> show lockedvnods > Locked vnodes > panic: blockable sleep lock (sleep mutex) mountlist @ > ../../../kern/vfs_subr.c:2621 > Debugger("panic") Try removing all the locking in the command. ddb commands can't use locking. I have printfs in _mtx_lock_flags(), _mtx_lock_spin_flags(), _mtx_lock_sleep() and _mtx_lock_spin() to detect locking when ddb is active. The error handling would be better if trap_fatal() were called before panic panic(), like it is for null pointer panics. ddb on i386's then notices that it shot itself and longjmps to its entry point. This handles things like reading through garbage pointers OK, but not external state changes like locking. Maybe my printfs should be trap_fatals or or direct longjmps. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message