Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 7 Nov 1996 12:54:35 -0500 (EST)
From:      Thomas David Rivers <ponds!rivers@dg-rtp.dg.com>
To:        michaelh@cet.co.jp, ponds!Root.COM!dg@ucbvax.Berkeley.EDU
Cc:        ponds!freefall.freebsd.org!freebsd-hackers@ucbvax.Berkeley.EDU, ponds!ponds!rivers@ucbvax.Berkeley.EDU
Subject:   Re: More info on the daily panics...
Message-ID:  <199611071754.MAA03193@lakes.water.net>

next in thread | raw e-mail | index | archive | help
> 
> > 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:
> 

 Ask and ye shall receive....

 I think the original patch was in reverse order; here's what I've
done relative to 2.1.5-STABLE.

 By the way, it's Dave, not Thomas... It's a southern idiocyncratic
'feature' to use your middle-name as your familiar title, not your
first.  So, why don't I do that in the GECOS field of my passwd
entry?... well, that's an entirely different issue, involving my
father, his father and some issues with the banking establishment.. :-)  :-)

	- Dave R. -

*** vfs_subr.c.ori	Thu Nov  7 12:46:24 1996
--- vfs_subr.c	Thu Nov  7 12:49:24 1996
***************
*** 828,839 ****
  	vp->v_usecount--;
  	if (vp->v_usecount > 0)
  		return;
- #ifdef DIAGNOSTIC
  	if (vp->v_usecount != 0 /* || vp->v_writecount != 0 */ ) {
  		vprint("vrele: bad ref count", vp);
  		panic("vrele: ref cnt");
  	}
- #endif
  	if (vp->v_flag & VAGE) {
  		TAILQ_INSERT_HEAD(&vnode_free_list, vp, v_freelist);
  		vp->v_flag &= ~VAGE;
--- 828,839 ----
  	vp->v_usecount--;
  	if (vp->v_usecount > 0)
  		return;
  	if (vp->v_usecount != 0 /* || vp->v_writecount != 0 */ ) {
+ #ifdef DIAGNOSTIC
  		vprint("vrele: bad ref count", vp);
+ #endif
  		panic("vrele: ref cnt");
  	}
  	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?199611071754.MAA03193>