From owner-freebsd-hackers Thu Nov 7 09:36:58 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id JAA06393 for hackers-outgoing; Thu, 7 Nov 1996 09:36:58 -0800 (PST) Received: from who.cdrom.com (who.cdrom.com [204.216.27.3]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id JAA06364 for ; Thu, 7 Nov 1996 09:36:52 -0800 (PST) Received: from parkplace.cet.co.jp (parkplace.cet.co.jp [202.32.64.1]) by who.cdrom.com (8.7.5/8.6.11) with ESMTP id IAA17188 for ; Thu, 7 Nov 1996 08:39:55 -0800 (PST) Received: from localhost (michaelh@localhost) by parkplace.cet.co.jp (8.8.2/CET-v2.1) with SMTP id QAA27029; Thu, 7 Nov 1996 16:39:23 GMT Date: Fri, 8 Nov 1996 01:39:23 +0900 (JST) From: Michael Hancock To: David Greenman cc: Thomas David Rivers , freebsd-hackers@freefall.freebsd.org Subject: Re: More info on the daily panics... In-Reply-To: <199611070813.AAA02988@root.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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;