From mark@greenpeace.grondar.za  Mon Aug 25 12:26:26 1997
Received: from gratis.grondar.za (gratis.grondar.za [196.7.18.133])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id MAA03075
          for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Aug 1997 12:24:26 -0700 (PDT)
Received: from greenpeace.grondar.za (Gr64FG/ZDIrlqOd3DNYgK1AjgtC5uK+K@greenpeace.grondar.za [196.7.18.132])
	by gratis.grondar.za (8.8.6/8.8.7) with ESMTP id VAA02753
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 25 Aug 1997 21:23:49 +0200 (SAT)
Received: (from mark@localhost)
	by greenpeace.grondar.za (8.8.7/8.8.7) id VAA00549;
	Mon, 25 Aug 1997 21:23:49 +0200 (SAT)
Message-Id: <199708251923.VAA00549@greenpeace.grondar.za>
Date: Mon, 25 Aug 1997 21:23:49 +0200 (SAT)
From: mark@grondar.za
Reply-To: mark@grondar.za
To: FreeBSD-gnats-submit@freebsd.org
Subject: CURRENT kernel has a "free vnode isn't" panic
X-Send-Pr-Version: 3.2

>Number:         4382
>Category:       kern
>Synopsis:       CURRENT kernel has a "free vnode isn't" panic
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Aug 25 12:30:01 PDT 1997
>Closed-Date:    Sun Jul 4 04:12:01 PDT 1999
>Last-Modified:  Sun Jul  4 04:14:32 PDT 1999
>Originator:     Mark Murray
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
YDN2FK
>Environment:

A CURRENT kernel compiled on July 27 was fine. Kernels compiled
since the 22nd Aug will panic if the (SCSI) disk gets too busy.
("Too busy" means a job like cvsup" or "cvs update"). Panic happens
randomly. Colleague at work with different motherboard and SCSI
controller reports similar panic.

>Description:

Kernel is built with the following config file:

#
# GA586DX -- Mark's Monster
#
#	$Id$

machine		"i386"
cpu		"I586_CPU"
ident		"GA586DX"
maxusers	16

options		INET			#InterNETworking
options		FFS			#Berkeley Fast Filesystem
options		NFS			#Network Filesystem
options		MFS			#Network Filesystem
options		"CD9660"		#ISO 9660 Filesystem
options		PROCFS			#Process filesystem
options		KERNFS			#Kernel filesystem
options		DEVFS			#Device filesystem
options		"COMPAT_43"		#Compatible with BSD 4.3 [KEEP THIS!]
options		SCSI_DELAY=15		#Be pessimistic about Joe SCSI device
options		UCONSOLE		#Allow users to grab the console
options		KTRACE			#kernel tracing
options		PERFMON			#Performance monitor
options		SYSVSHM			#SYSV shared memory support
options		SYSVSEM			#SYSV semaphore support
options		SYSVMSG			#SYSV message queue support

## Create a SMP capable kernel (mandatory options):
#options	SMP			# Symmetric MultiProcessor Kernel
#options	APIC_IO			# Symmetric (APIC) I/O
#
## Lets always enable the kernel debugger for SMP.
#options	DDB

config		kernel	root on sd0

controller	isa0
controller	pci0

controller	fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr
disk		fd0 at fdc0 drive 0

controller	ahc0
controller	scbus0
device		sd0
device		st0
device		cd0

device		sc0 at isa? port "IO_KBD" tty irq 1 vector scintr
device		psm0 at isa? port "IO_KBD" conflicts tty irq 12 vector psmintr

device		sio0 at isa? port "IO_COM1" tty irq 4 vector siointr
device		sio1 at isa? port "IO_COM2" tty irq 3 vector siointr
device		lpt0 at isa? port? tty irq 7 vector lptintr

device		npx0 at isa? port "IO_NPX" irq 13 vector npxintr

device		vx0

device		bktr0

controller	snd0
device		gus0 at isa? vector gusintr

pseudo-device	loop
pseudo-device	ether
pseudo-device	log
pseudo-device	tun	2
pseudo-device	vn	2
pseudo-device	pty	16
pseudo-device	gzip
pseudo-device	speaker

Digging through the entrails with gdb -k reveals the following:

[greenpeace] /sys/compile/GA586DX # gdb -k /kernel /var/crash/vmcore.0
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-freebsd), 
Copyright 1996 Free Software Foundation, Inc...
IdlePTD 257000
current pcb at 200d9c
panic: free vnode isn't
#0  boot (howto=256) at ../../kern/kern_shutdown.c:292
292					dumppcb.pcb_cr3 = rcr3();
(kgdb) where
#0  boot (howto=256) at ../../kern/kern_shutdown.c:292
#1  0xf01169c2 in panic (fmt=0xf01345a3 "free vnode isn't")
    at ../../kern/kern_shutdown.c:419
#2  0xf01345f8 in getnewvnode (tag=VT_UFS, mp=0xf0770e00, vops=0xf0744000, 
    vpp=0xf47c8d30) at ../../kern/vfs_subr.c:364
#3  0xf019c7f4 in ffs_vget (mp=0xf0770e00, ino=130689, vpp=0xf47c8db4)
    at ../../ufs/ffs/ffs_vfsops.c:945
#4  0xf019fe9e in ufs_lookup (ap=0xf47c8e24) at ../../ufs/ufs/ufs_lookup.c:578
#5  0xf0133cfd in lookup (ndp=0xf47c8eac) at vnode_if.h:31
#6  0xf013384f in namei (ndp=0xf47c8eac) at ../../kern/vfs_lookup.c:157
#7  0xf0138358 in stat (p=0xf07e4000, uap=0xf47c8f94, retval=0xf47c8f84)
    at ../../kern/vfs_syscalls.c:1567
#8  0xf01bd9cb in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 270209, 
      tf_esi = 426241, tf_ebp = -272640412, tf_isp = -193163292, 
      tf_ebx = 348992, tf_edx = -272640024, tf_ecx = 363584, tf_eax = 188, 
      tf_trapno = 7, tf_err = 7, tf_eip = 135129521, tf_cs = 31, 
      tf_eflags = 662, tf_esp = -272640576, tf_ss = 39})
    at ../../i386/i386/trap.c:947
#9  0x80de9b1 in ?? ()
#10 0x422f2 in ?? ()
#11 0x5f94 in ?? ()
#12 0x3f891 in ?? ()
#13 0x32069 in ?? ()
#14 0x1721d in ?? ()
#15 0x31ede in ?? ()
#16 0x323a6 in ?? ()
#17 0x1721d in ?? ()
#18 0x31f61 in ?? ()
#19 0x323a6 in ?? ()
#20 0x1721d in ?? ()
#21 0x31f61 in ?? ()
#22 0x323a6 in ?? ()
#23 0x1721d in ?? ()
#24 0x31f61 in ?? ()
#25 0x323a6 in ?? ()
#26 0x1721d in ?? ()
#27 0x31f61 in ?? ()
#28 0x3193b in ?? ()
#29 0x3f796 in ?? ()
#30 0x3f66d in ?? ()
#31 0x2482c in ?? ()
#32 0x1095 in ?? ()
(kgdb) quit

>How-To-Repeat:

See Above

>Fix:
	
Dunno

>Release-Note:
>Audit-Trail:

From: Steve Passe <smp@csn.net>
To: mark@grondar.za
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/4382: CURRENT kernel has a "free vnode isn't" panic 
Date: Mon, 25 Aug 1997 14:51:14 -0600

 Hi,
 
 this is a know problem, John is working on it and says:
 
 From: "John S. Dyson" <toor@dyson.iquest.net>
 Subject: Re: SMP seem to introduce some strange things...
 Date: Mon, 25 Aug 1997 05:35:05 -0500 (EST)
 
 I have been working on the problem (and alot of others regarding both UP and
 SMP in the VFS code.)  Rather than hacking a fix, I finally decided to rework
 the code correctly.  If I don't have a good fix by tonight (say, 21:00 EST)
 I'll back out my changes -- and we will have a proper fix within a few
 days.  I don't want to hold up other's progress much longer.
 
 The management of the vnodes and VM interface, and associated reference
 counts is pretty tricky (and currently wrong.)  PHK is working on the
 general vnode and namecache management (which is intricate in it's own
 right), but I am working the VM interface and making it fine grained SMP
 friendly.  Currently, it isn't.
 
 
 --
 Steve Passe	| powered by 
 smp@csn.net	|            Symmetric MultiProcessor FreeBSD
 
 

From: Mark Murray <mark@grondar.za>
To: Steve Passe <smp@csn.net>
Cc: mark@grondar.za, FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: kern/4382: CURRENT kernel has a "free vnode isn't" panic 
Date: Mon, 25 Aug 1997 23:28:09 +0200

 Thanks!
 
 Steve Passe wrote:
 > this is a know problem, John is working on it and says:
 
 Rest trimmed...
 
 M
 --
 Mark Murray
 Join the anti-SPAM movement: http://www.cauce.org

From: mjacob@feral.com
To: freebsd-gnats-submit@freebsd.org, mark@grondar.za
Cc:  Subject: Re: kern/4382: CURRENT kernel has a "free vnode isn't" panic
Date: Thu, 17 Sep 1998 15:26:08 -0700

 From -current sources as of today-
 
 
 2xPPro@180Mhz Intel 440FX board, only 32MB memory.
 
 I was running two simultaneous buildworlds (-j 4 each) plus some
 side I/O, and I dies in:
 
 panic("free vnode isn't")
         getnewvnode
         ffs_vget
         ufs_lookup
         ufs_vnoperate
         vfs_cache_lookup
         ufs_vnoperate
         lookup
         namei
         unlink
 
 So- pretty much same problem still exists.
 
State-Changed-From-To: open->closed 
State-Changed-By: hoek 
State-Changed-When: Sun Jul 4 04:12:01 PDT 1999 
State-Changed-Why:  
Originiator confirms this is one of the free vnode isn't panics that was fixed 
some time ago. 
>Unformatted:
