From owner-freebsd-stable@FreeBSD.ORG Fri Mar 17 12:15:52 2006 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EA1C116A425; Fri, 17 Mar 2006 12:15:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from fw.zoral.com.ua (ll-227.216.82.212.sovam.net.ua [212.82.216.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 703A143D45; Fri, 17 Mar 2006 12:15:50 +0000 (GMT) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by fw.zoral.com.ua (8.13.3/8.13.3) with ESMTP id k2HCFixf007492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 17 Mar 2006 14:15:44 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.13.4/8.13.4) with ESMTP id k2HCFhWx067601; Fri, 17 Mar 2006 14:15:43 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.13.4/8.13.4/Submit) id k2HCFhBW067600; Fri, 17 Mar 2006 14:15:43 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 17 Mar 2006 14:15:43 +0200 From: Kostik Belousov To: Ariff Abdullah Message-ID: <20060317121543.GE1203@deviant.kiev.zoral.com.ua> References: <20060317185142.56e5042d.ariff@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="WBsA/oQW3eTA3LlM" Content-Disposition: inline In-Reply-To: <20060317185142.56e5042d.ariff@FreeBSD.org> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: ClamAV version 0.88, clamav-milter version 0.87 on fw.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=5.0 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on fw.zoral.com.ua Cc: freebsd-stable@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: acquiring duplicate lock of same type: "vnode interlock" X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 17 Mar 2006 12:15:52 -0000 --WBsA/oQW3eTA3LlM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Mar 17, 2006 at 06:51:42PM +0800, Ariff Abdullah wrote: > I think I've read somewhere about panic during early root mount, fsck > etc.. Perhaps this might be related: >=20 > Full dmesg: http://people.freebsd.org/~ariff/misc/dmesg.boot.amd64 >=20 > [....] > acquiring duplicate lock of same type: "vnode interlock" > 1st vnode interlock @ kern/vfs_vnops.c:791 > 2nd vnode interlock @ kern/vfs_subr.c:2018 > KDB: stack backtrace: > witness_checkorder() at witness_checkorder+0x4da > _mtx_lock_flags() at _mtx_lock_flags+0x4a > vrefcnt() at vrefcnt+0x31 > null_checkvp() at null_checkvp+0x65 > null_lock() at null_lock+0x5b > VOP_LOCK_APV() at VOP_LOCK_APV+0x81 > vn_lock() at vn_lock+0x6b > nullfs_root() at nullfs_root+0x4c > vfs_donmount() at vfs_donmount+0x1096 > nmount() at nmount+0x82 > syscall() at syscall+0x21b > Xfast_syscall() at Xfast_syscall+0xa8 > --- syscall (378, FreeBSD ELF64, nmount), rip =3D 0x800679e8c, rsp =3D > 0x7fffffffe558, rbp =3D 0x7fffffffee40 --- It does not seem to be the moment of mounting root. Do you have nullfs mounts in fstab ? If yes, then, probably, some user-mode output is absent in your trace. Anyway, issue looks like cosmetic and manifests itself only under both WITNESS and DIAGNOSTIC options, living itself in diagonstic code. The patch shuts the witness in dirty manner: Index: sys/fs/nullfs/null_subr.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /usr/local/arch/ncvs/src/sys/fs/nullfs/null_subr.c,v retrieving revision 1.50 diff -u -r1.50 null_subr.c --- sys/fs/nullfs/null_subr.c 22 Feb 2006 06:15:12 -0000 1.50 +++ sys/fs/nullfs/null_subr.c 17 Mar 2006 12:13:46 -0000 @@ -306,7 +306,7 @@ while (null_checkvp_barrier) /*WAIT*/ ; panic("null_checkvp"); } - if (vrefcnt(a->null_lowervp) < 1) { + if (a->null_lowervp->v_usecount < 1) { int i; u_long *p; printf("vp =3D %p, unref'ed lowervp\n", (void *)vp); for (p =3D (u_long *) a, i =3D 0; i < 8; i++) I do not think that it worthy to reorg code to allow to use vrefcnt. --WBsA/oQW3eTA3LlM Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQFEGqhuC3+MBN1Mb4gRAqnmAKCB6mxoGGLfJk0TEbP1tMPirERBAgCgp7FG hn2pmPvu+yi8ejjUkreJ1JU= =PltH -----END PGP SIGNATURE----- --WBsA/oQW3eTA3LlM--