Subject: kern/9223: panic: lfs_ialloc: inuse inode %d on the free list
To: None <gnats-bugs@gnats.netbsd.org>
From: None <jarle@runit.no>
List: netbsd-bugs
Date: 01/18/2000 04:01:10
>Number:         9223
>Category:       kern
>Synopsis:       panic: lfs_ialloc: inuse inode %d on the free list
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jan 18 04:00:01 2000
>Last-Modified:
>Originator:     Jarle Greipsland
>Organization:
RUNIT as
>Release:        2000-01-17
>Environment:
	
System: NetBSD honey.runit.sintef.no 1.4P NetBSD 1.4P (HONEY) #8: Tue Jan 18 11:28:08 CET 2000 jarle@honey.runit.sintef.no:/usr/src/sys/arch/alpha/compile/HONEY alpha


>Description:
Started a 'make build' in /usr/src.

My dmesg
[ preserving 251680 bytes of netbsd ELF symbol table ]
Copyright (c) 1996, 1997, 1998, 1999, 2000
    The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1982, 1986, 1989, 1991, 1993
    The Regents of the University of California.  All rights reserved.

NetBSD 1.4P (HONEY) #8: Tue Jan 18 11:28:08 CET 2000
    jarle@honey.runit.sintef.no:/usr/src/sys/arch/alpha/compile/HONEY
Digital AlphaPC 164 500 MHz
8192 byte page size, 1 processor.
total memory = 256 MB
(2472 KB reserved for PROM, 253 MB used by NetBSD)
avail memory = 232 MB
using 1635 buffers containing 13080 KB of memory
mainbus0 (root)
cpu0 at mainbus0: ID 0 (primary), 21164A-2 (pass 2)
cia0 at mainbus0: DECchip 2117x Core Logic Chipset (ALCOR/ALCOR2), pass 3
cia0: extended capabilities: 21<DWEN,BWEN>
cia0: using BWX for PCI config access
pci0 at cia0 bus 0
pci0: i/o space, memory space enabled, rd/line, rd/mult, wr/inv ok
isp0 at pci0 dev 5 function 0
isp0: interrupting at eb164 irq 2
isp0: Ultra Mode Capable
isp0: Board Revision 1040B, loaded F/W Revision 4.65.0
isp0: Last F/W revision was 4.65.0
isp0: 243 max I/O commands supported
isp0: enabled FW features (0x1)
isp0: driver initiated bus reset of bus 0
scsibus0 at isp0: 16 targets, 8 luns per target
ncr0 at pci0 dev 7 function 0: ncr 53c860 fast20 scsi
ncr0: interrupting at eb164 irq 1
ncr0: minsync=12, maxsync=137, maxoffs=8, 16 dwords burst, normal dma fifo
ncr0: single-ended, open drain IRQ driver
ncr0: restart (scsi reset).
scsibus1 at ncr0: 8 targets, 8 luns per target
sio0 at pci0 dev 8 function 0: Intel 82378ZB System I/O (SIO) (rev. 0x43)
tlp0 at pci0 dev 9 function 0: DECchip 21140 Ethernet, pass 1.2
tlp0: interrupting at eb164 irq 3
tlp0: DEC DE500-XA, Ethernet address 00:00:f8:30:94:81
tlp0: 10baseT, 100baseTX, 100baseTX-FDX, 10baseT-FDX
pciide0 at pci0 dev 11 function 0: CMD Technology PCI0646
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
wd0 at pciide0 channel 0 drive 0: <IBM-DJNA-370910>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 8693MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 17803440 sectors
wd0: 32-bits data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 4
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
pciide0: secondary channel ignored (disabled)
isa0 at sio0
com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
com0: console
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
lpt0 at isa0 port 0x3bc-0x3bf irq 7
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
isabeep0 at pcppi0
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
mcclock0 at isa0 port 0x70-0x71: mc146818 or compatible
scsibus0: waiting 2 seconds for devices to settle...
isp0: Bus 0 Target 0 Async Mode
sd0 at scsibus0 targ 0 lun 0: <IBM, DDRS-39130W, S97B> SCSI2 0/direct fixed
sd0: 8715 MB, 8387 cyl, 10 head, 212 sec, 512 bytes/sect x 17850000 sectors
scsibus1: waiting 2 seconds for devices to settle...
sd1 at scsibus1 targ 0 lun 0: <DEC, RZ29B    (C) DEC, 0016> SCSI2 0/direct fixed
sd1(ncr0:0:0): 10.0 MB/s (100 ns, offset 8)
sd1: 4091 MB, 3708 cyl, 20 head, 113 sec, 512 bytes/sect x 8380080 sectors
sd2 at scsibus1 targ 2 lun 0: <DEC, RZ29B    (C) DEC, 0009> SCSI2 0/direct fixed
sd2(ncr0:2:0): 10.0 MB/s (100 ns, offset 8)
sd2: 4091 MB, 3708 cyl, 20 head, 113 sec, 512 bytes/sect x 8380080 sectors
sd3 at scsibus1 targ 4 lun 0: <DEC, RZ29B    (C) DEC, 0014> SCSI2 0/direct fixed
sd3(ncr0:4:0): 10.0 MB/s (100 ns, offset 8)
sd3: 4091 MB, 3708 cyl, 20 head, 113 sec, 512 bytes/sect x 8380080 sectors
root on wd0a dumps on wd0b
root file system type: ffs
isp0: Bus 0 Target 0 at 20MHz Max Offset 8, 16 bit wide, Tagged Queueing Enabled

My /etc/fstab:
/dev/wd0a / ffs rw 1 1
/dev/wd0b none swap sw 0 0
/dev/wd0d /usr ffs rw 1 2
/dev/wd0f /var ffs rw 1 2
/dev/wd0g /local ffs rw 1 2
/kern /kern kernfs rw
/dev/wd0b /tmp mfs rw,-s=129024 0 0
/dev/sd0a /home ffs rw 1 2
/dev/ccd0a /spare lfs rw 1 2
#/dev/raid0a /spare lfs rw 1 2
/home/usr/src /usr/src null rw 0 0
/home/usr/xsrc /usr/xsrc null rw 0 0
/home/usr/pkg /usr/pkg null rw 0 0
/home/usr/pkgsrc /usr/pkgsrc null rw 0 0
/spare/usr/obj /usr/obj null rw 0 0

My ddb output from the console:
# panic: lfs_ialloc: inuse inode 1030 on the free list
Stopped in ld at        cpu_Debugger+0x4:       ret     zero,(ra)
db> trace
cpu_Debugger() at cpu_Debugger+0x4
panic() at panic+0xe4
lfs_valloc() at lfs_valloc+0x138
ufs_makeinode() at ufs_makeinode+0xc4
ufs_create() at ufs_create+0x40
lfs_create() at lfs_create+0xa8
layer_bypass() at layer_bypass+0x138
vn_open() at vn_open+0x14c
sys_open() at sys_open+0xf0
syscall() at syscall+0x1c8
XentSys() at XentSys+0x50
--- syscall (5, netbsd.sys_open) ---
--- user mode ---
db> ps
 PID             PPID       PGRP        UID S   FLAGS          COMMAND    WAIT
>How-To-Repeat:
Run some file system intensive stuff.
	
>Fix:
Unknown
	
>Audit-Trail:
>Unformatted:
>7170            7017      20924          0 2  0x4006               ld
 7017            7016      20924          0 3  0x4086             make    wait
 7016            6991      20924          0 3  0x4086               sh    wait
 6991            6990      20924          0 3  0x4086             make    wait
 6990            6975      20924          0 3  0x4086               sh    wait
 6975            6974      20924          0 3  0x4086             make    wait
 6974            6973      20924          0 3    0x86               sh    wait
 6973           20926      20924          0 3  0x4086               sh    wait
 20926          20924      20924          0 3  0x4086             make    wait
 20925            226      20925          0 3  0x4086             tail  select
 20924            226      20924          0 3    0x86              csh   pause
 226              225        226          0 3  0x4086              csh   pause
 225              224        225      16073 3  0x4086             bash    wait
 224              221        221      16073 3  0x4184            xterm  select
 221              219        221      16073 3  0x4084              csh   pause
 219              216        216          0 3    0x84            sshd1  select
 218                1        218          0 3  0x4086              csh   ttyin
 216                1        216          0 3    0x84            sshd1  select
 204                1        204          0 3    0x84            inetd  select
 201                1        201          0 3    0x84            xntpd   pause
 199                1        199          0 3   0x184             cron nanosle
 168              167        167          0 3    0x84     lfs_cleanerd segment
 167                1        167          0 3    0x84     lfs_cleanerd    wait
 164                1        164          0 3    0x84        mount_mfs  mfsidl
 158                1        158          0 3    0x84          portmap  select
 151                1        151          0 3    0x84          syslogd  select
 4                  0          0          0 3 0x20204          ioflush  syncer
 3                  0          0          0 3 0x20204           reaper  reaper
 2                  0          0          0 3 0x20204       pagedaemon daemon_
 1                  0          1          0 3  0x4084             init    wait
 0                 -1          0          0 3 0x20204          swapper schedul
db> 

My gdb process list output:
(gdb) xps
              proc   pid     flag st              wchan comm
0xfffffc000488db28  7170     4006  2                  0 ld
0xfffffc000488d938  7017     4086  3 0xfffffc000488d938 make (wait)
0xfffffc000488dd18  7016     4086  3 0xfffffc000488dd18 sh (wait)
0xfffffc000488d748  6991     4086  3 0xfffffc000488d748 make (wait)
0xfffffc000488cf88  6990     4086  3 0xfffffc000488cf88 sh (wait)
0xfffffc000488cd98  6975     4086  3 0xfffffc000488cd98 make (wait)
0xfffffc000488d558  6974       86  3 0xfffffc000488d558 sh (wait)
0xfffffc000488cba8  6973     4086  3 0xfffffc000488cba8 sh (wait)
0xfffffc000488c9b8 20926     4086  3 0xfffffc000488c9b8 make (wait)
0xfffffc000488c7c8 20925     4086  3 0xfffffc00005af668 tail (select)
0xfffffc000488c5d8 20924       86  3 0xfffffc00048d08e0 csh (pause)
0xfffffc000488c3e8   226     4086  3 0xfffffc00048d0478 csh (pause)
0xfffffc000488c1f8   225     4086  3 0xfffffc000488c1f8 bash (wait)
0xfffffc000488c008   224     4184  3 0xfffffc00005af668 xterm (select)
0xfffffc0001761b20   221     4084  3 0xfffffc0003cd31a8 csh (pause)
0xfffffc0001761550   219       84  3 0xfffffc00005af668 sshd1 (select)
0xfffffc00017607c0   218     4086  3 0xfffffc0001734010 csh (ttyin)
0xfffffc0001761d10   216       84  3 0xfffffc00005af668 sshd1 (select)
0xfffffc0001761930   204       84  3 0xfffffc00005af668 inetd (select)
0xfffffc0001761740   201       84  3 0xfffffc0003cd28d8 xntpd (pause)
0xfffffc0001760d90   199      184  3 0xfffffc00005873d4 cron (nanosleep)
0xfffffc0001760f80   168       84  3 0xfffffe0000111040 lfs_cleanerd (segment)
---Type <return> to continue, or q <return> to quit---
0xfffffc0001761360   167       84  3 0xfffffc0001761360 lfs_cleanerd (wait)
0xfffffc0001761170   164       84  3 0xfffffc0003c3a070 mount_mfs (mfsidl)
0xfffffc0001760ba0   158       84  3 0xfffffc00005af668 portmap (select)
0xfffffc00017609b0   151       84  3 0xfffffc00005af668 syslogd (select)
0xfffffc00017605d0     4    20204  3 0xfffffc00005aeba4 ioflush (syncer)
0xfffffc00017603e0     3    20204  3 0xfffffc00005ae720 reaper (reaper)
0xfffffc00017601f0     2    20204  3 0xfffffc00005cab90 pagedaemon (daemon_slp)
0xfffffc0001760000     1     4084  3 0xfffffc0001760000 init (wait)
0xfffffc00005abaa0     0    20204  3 0xfffffc00005abaa0 swapper (scheduler)

I have a core dump of this crash, and I can probably extract more
information if necessary (within a reasonable time frame -- I don't keep
core dumps forever :-).