From owner-freebsd-stable Fri Feb 2 8: 3:47 2001 Delivered-To: freebsd-stable@freebsd.org Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by hub.freebsd.org (Postfix) with SMTP id 1030037B699; Fri, 2 Feb 2001 08:03:27 -0800 (PST) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 2 Feb 2001 16:03:26 +0000 (GMT) To: Chris Williams Cc: "'freebsd-hackers@freebsd.org'" , "'freebsd-stable@freebsd.org'" , iedowse@maths.tcd.ie Subject: Re: Have root on vinum, one small problem.. In-Reply-To: Your message of "Fri, 02 Feb 2001 10:54:51 EST." <4FC7AFEB1135D41199260000F87A88260D9530@TRSBS> Date: Fri, 02 Feb 2001 16:03:26 +0000 From: Ian Dowse Message-ID: <200102021603.aa24556@salmon.maths.tcd.ie> Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <4FC7AFEB1135D41199260000F87A88260D9530@TRSBS>, Chris Williams write s: > >Things seems to be working quite well, but there is one strange behavior which > worries me; whenever I shut down, right after syncing I get a panic: > >panic: Vrele: negative ref cnt I noticed this a while ago - it is due to inconsistent handling of 'rootvnode' in the kernel. You should find the details if you search for 'rootvnode' in the -hackers archive. The following patch should work around the panic by adding an extra vnode reference for rootvp: Ian Index: init_main.c =================================================================== RCS file: /FreeBSD/FreeBSD-CVS/src/sys/kern/init_main.c,v retrieving revision 1.134.2.3 diff -u -r1.134.2.3 init_main.c --- init_main.c 2000/09/07 19:13:36 1.134.2.3 +++ init_main.c 2001/02/02 16:01:52 @@ -456,6 +456,7 @@ VREF(fdp->fd_fd.fd_cdir); VOP_UNLOCK(rootvnode, 0, &proc0); fdp->fd_fd.fd_rdir = rootvnode; + VREF(fdp->fd_fd.fd_rdir); } SYSINIT(retrofit, SI_SUB_ROOT_FDTAB, SI_ORDER_FIRST, xxx_vfs_root_fdtab, NULL) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message