Date: Fri, 8 Nov 1996 01:39:23 +0900 (JST) From: Michael Hancock <michaelh@cet.co.jp> To: David Greenman <dg@root.com> Cc: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>, freebsd-hackers@freefall.freebsd.org Subject: Re: More info on the daily panics... Message-ID: <Pine.SV4.3.95.961108013714.27008B-100000@parkplace.cet.co.jp> In-Reply-To: <199611070813.AAA02988@root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 7 Nov 1996, David Greenman wrote:
> In the one case of this problem that I looked into, it was caused by the
> v_usecount being negative. There was clearly one too many vrele's occuring
> somewhere. It was not caused by any sort of "freelist wrap" condition. The
> patch you've provided will kludge around the problem, but it is not in any
> sense a "fix". Each time a vnode is deallocated too many times (and thus
> v_usecount goes negative), you'll end up losing all of the vnodes on the
> freelist that follow it (potentially several thousand) because the condition
> will never go away. This is bad.
Then Thomas would be doing us a favor if he put in the following diff to
help track it down:
Index: vfs_subr.c
===================================================================
RCS file: /jaz/cvs/src/sys/kern/vfs_subr.c,v
retrieving revision 1.50
retrieving revision 1.49
diff -c -r1.50 -r1.49
*** vfs_subr.c 1996/01/02 18:13:20 1.50
--- vfs_subr.c 1995/12/17 21:23:19 1.49
***************
*** 36,42 ****
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
! * $Id: vfs_subr.c,v 1.50 1996/01/02 18:13:20 davidg Exp $
*/
/*
--- 36,42 ----
* SUCH DAMAGE.
*
* @(#)vfs_subr.c 8.13 (Berkeley) 4/18/94
! * $Id: vfs_subr.c,v 1.49 1995/12/17 21:23:19 phk Exp $
*/
/*
***************
*** 835,846 ****
vp->v_usecount--;
if (vp->v_usecount > 0)
return;
- if (vp->v_usecount < 0 /* || vp->v_writecount < 0 */ ) {
#ifdef DIAGNOSTIC
vprint("vrele: negative ref count", vp);
- #endif
panic("vrele: negative reference cnt");
}
if (vp->v_flag & VAGE) {
TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
vp->v_flag &= ~VAGE;
--- 835,846 ----
vp->v_usecount--;
if (vp->v_usecount > 0)
return;
#ifdef DIAGNOSTIC
+ if (vp->v_usecount < 0 /* || vp->v_writecount < 0 */ ) {
vprint("vrele: negative ref count", vp);
panic("vrele: negative reference cnt");
}
+ #endif
if (vp->v_flag & VAGE) {
TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
vp->v_flag &= ~VAGE;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.95.961108013714.27008B-100000>
