From owner-freebsd-hackers Thu Nov 7 14:39:37 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id OAA21957 for hackers-outgoing; Thu, 7 Nov 1996 14:39:37 -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 OAA21922 for ; Thu, 7 Nov 1996 14:39:30 -0800 (PST) Received: from dg-rtp.dg.com (dg-rtp.rtp.dg.com [128.222.1.2]) by who.cdrom.com (8.7.5/8.6.11) with SMTP id KAA17767 for ; Thu, 7 Nov 1996 10:50:35 -0800 (PST) Received: by dg-rtp.dg.com (5.4R3.10/dg-rtp-v02) id AA17516; Thu, 7 Nov 1996 13:50:03 -0500 Received: from ponds by dg-rtp.dg.com.rtp.dg.com; Thu, 7 Nov 1996 13:50 EST Received: from lakes.water.net (lakes [10.0.0.3]) by ponds.water.net (8.7.5/8.7.3) with ESMTP id MAA08502; Thu, 7 Nov 1996 12:53:33 -0500 (EST) Received: (from rivers@localhost) by lakes.water.net (8.7.5/8.6.9) id MAA03193; Thu, 7 Nov 1996 12:54:35 -0500 (EST) Date: Thu, 7 Nov 1996 12:54:35 -0500 (EST) From: Thomas David Rivers Message-Id: <199611071754.MAA03193@lakes.water.net> To: michaelh@cet.co.jp, ponds!Root.COM!dg@ucbvax.Berkeley.EDU Subject: Re: More info on the daily panics... Cc: ponds!freefall.freebsd.org!freebsd-hackers@ucbvax.Berkeley.EDU, ponds!ponds!rivers@ucbvax.Berkeley.EDU Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > > 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;