Subject: panic: biodone already/pool_get
To: None <current-users@netbsd.org>
From: Brian C. Grayson <bgrayson@orac.ece.utexas.edu>
List: current-users
Date: 03/15/2000 01:26:20
  My home machine has been panic'ing whenever there is significant
disk activity.  The panic is either:

netbsd.22.dump:(gdb) panic: biodone already

  or

netbsd.23.dump:(gdb) panic: pool_get(%s): free list modified: magic=%x; page %p; item addr %p

  One way of triggering this panic is to try to build a kernel
with -g.  :)  I'm thinking that this must have something to do
with my hardware, like a timing bug or bad chipset, because if
this was affecting everyone else, we'd all be dead in the
water!  This might be related to someone else's pool_get bug
that I saw a few weeks ago on current-users.

  I updated my source tree via CVS at around 10pm CST on
3/14/2000, and compiled a GENERIC kernel with POOL_DIAGNOSTIC,
and got the following (dmesg, followed by gdb backtrace).  I can
forward to any interested parties the other 13 backtraces that
I have, but they are all pretty similar.

  Note that the pool logs say that there were two gets without
an intervening put.

  TIA!

  Brian
------------------------------------------------------------------------------
NetBSD 1.4U (GENERIC.pool) #0: Wed Mar 15 00:46:40 CST 2000
    root@k9.ece.utexas.edu:/home/src/puresrc/syssrc/sys/arch/i386/compile/GENERI
C.pool
cpu0: family 5 model 8 step c
cpu0: AMD K6-2 (586-class)
total memory = 48768 KB
avail memory = 40760 KB
using 635 buffers containing 2540 KB of memory
BIOS32 rev. 0 found at 0xfb520
mainbus0 (root)
pci0 at mainbus0 bus 0: configuration mode 1
pci0: i/o space, memory space enabled
pchb0 at pci0 dev 0 function 0
pchb0: Intel 82439TX System Controller (MTXC) (rev. 0x01)
pcib0 at pci0 dev 7 function 0
pcib0: Intel 82371AB PCI-to-ISA Bridge (PIIX4) (rev. 0x01)
pciide0 at pci0 dev 7 function 1: Intel 82371AB IDE controller (PIIX4)
pciide0: bus-master DMA support present
pciide0: primary channel wired to compatibility mode
atapibus0 at pciide0 channel 0
cd0 at atapibus0 drive 1: <Memorex CRW-1622, AH1234567892123  L2, D4.0> type 5 c
drom removable
cd0: 32-bits data port
cd0: drive supports PIO mode 3, DMA mode 1
wd0 at pciide0 channel 0 drive 0: <QUANTUM BIGFOOT_CY4320A>
wd0: drive supports 32-sector pio transfers, lba addressing
wd0: 4134 MB, 8960 cyl, 15 head, 63 sec, 512 bytes/sect x 8467200 sectors
wd0: 32-bits data port
wd0: drive supports PIO mode 4, DMA mode 2
pciide0: primary channel interrupting at irq 14
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2 (using DMA data transfers)
cd0(pciide0:0:1): using PIO mode 0, DMA mode 1 (using DMA data transfers)
pciide0: secondary channel wired to compatibility mode
wd1 at pciide0 channel 1 drive 0: <Maxtor 91303D6>
wd1: drive supports 16-sector pio transfers, lba addressing
wd1: 12427 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 25450992 sectors
wd1: 32-bits data port
wd1: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
pciide0: secondary channel interrupting at irq 15
wd1(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2 (using DMA data transfers)
uhci0 at pci0 dev 7 function 2: Intel 82371AB USB Host Controller (PIIX4) (rev. 
0x01)
uhci0: interrupting at irq 10
usb0 at uhci0: USB revision 1.0
uhub0 at usb0
uhub0: Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
Intel 82371AB Power Management Controller (PIIX4) (miscellaneous bridge, revisio
n 0x01) at pci0 dev 7 function 3 not configured
vga1 at pci0 dev 8 function 0: S3 Trio64V2/DX (rev. 0x14)
wsdisplay0 at vga1: console (80x25, vt100 emulation)
vr0 at pci0 dev 9 function 0: VIA VT3043 (Rhine) 10/100 Ethernet
vr0: interrupting at irq 12
vr0: Ethernet address: 00:80:c8:f9:03:8e
ukphy0 at vr0 phy 8: Generic IEEE 802.3u media interface
ukphy0: OUI 0x00606e, model 0x0000, rev. 0
ukphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
vr0: supplying EUI64: 00:80:c8:ff:fe:f9:03:8e
isa0 at pcib0
aic0 at isa0 port 0x340-0x35f irq 11
scsibus0 at aic0: 8 targets, 8 luns per target
com0 at isa0 port 0x3f8-0x3ff irq 4: ns8250 or ns16450, no fifo
com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
pckbc0 at isa0 port 0x60-0x64
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
lpt0 at isa0 port 0x378-0x37b irq 7
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
sysbeep0 at pcppi0
isapnp0 at isa0 port 0x279: ISA Plug 'n Play device support
npx0 at isa0 port 0xf0-0xff: using exception 16
fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 head, 18 sec
isapnp0: no ISA Plug 'n Play devices found
biomask ef65 netmask ff65 ttymask ffe7
scsibus0: waiting 2 seconds for devices to settle...
boot device: wd1
root on wd1a dumps on wd1b
root file system type: ffs
IP Filter: v3.3.8 initialized.  Default = pass all, Logging = enabled
vr0: starting DAD for fe80:0001::0280:c8ff:fef9:038e
vr0: DAD complete for fe80:0001::0280:c8ff:fef9:038e - no duplicates found
        log entry 9:
                action = get, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1291
        log entry 8:
                action = put, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1451
        log entry 7:
                action = get, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1291
        log entry 6:
                action = put, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1451
        log entry 5:
                action = get, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1291
        log entry 4:
                action = put, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1451
        log entry 3:
                action = get, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1291
        log entry 2:
                action = put, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1451
        log entry 1:
                action = get, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1291
        log entry 0:
                action = get, addr = 0xc06d9680
                file: ../../../../uvm/uvm_swap.c at line 1291
panic: pool_get(swp vnd): free list modified: magic=c06d9600; page 0xc06d9000; i
tem addr 0xc06d9680

syncing disks... pool swp vnd: reentrancy at file ../../../../uvm/uvm_swap.c lin
e 1451
         previous entry at file ../../../../uvm/uvm_swap.c line 1291
panic: pr_enter
------------------------------------------------------------------------------
GNU gdb 4.17
(gdb) panic: pool_get(%s): free list modified: magic=%x; page %p; item addr %p

#0  0xc03c372d in fmt.36 ()
(gdb) #0  0xc03c372d in fmt.36 ()
#1  0x1165000 in ?? ()
#2  0xc02c944b in cpu_reboot ()
#3  0xc019f231 in panic ()
#4  0xc019e3ea in _pool_put ()
#5  0xc02c2fd6 in sw_reg_iodone ()
#6  0xc01b37c2 in biodone ()
#7  0xc02dfc3d in wddone ()
#8  0xc02e1ba9 in wdc_ata_bio_done ()
#9  0xc02e1a84 in wdc_ata_bio_intr ()
#10 0xc015fb74 in wdcintr ()
#11 0xc02fe68e in pciide_compat_intr ()
#12 0xc0101cd4 in Xintr15 ()
------------------------------------------------------------------------------

Here's a similar backtrace from a March 7(?) build, with symbols:
(gdb) panic: pool_get(%s): free list modified: magic=%x; page %p; item addr %p

#0  0xc02c228d in fmt.36 ()
(gdb) #0  0xc02c228d in fmt.36 ()
#1  0x1195000 in ?? ()
#2  0xc0236367 in cpu_reboot (howto=260, bootstr=0x0)
    at ../../../../arch/i386/i386/machdep.c:1091
#3  0xc0154b39 in panic () at ../../../../kern/subr_prf.c:216
#4  0xc0153cf2 in _pool_put (pp=0xc0519d00, v=0xc058d480, 
    file=0xc02d25fb "../../../../uvm/uvm_swap.c", line=1451)
    at ../../../../kern/subr_pool.c:223
#5  0xc022fdbe in sw_reg_iodone (bp=0xc058d480)
    at ../../../../uvm/uvm_swap.c:1451
#6  0xc0169076 in biodone (bp=0xc058d480) at ../../../../kern/vfs_bio.c:948
#7  0xc0248351 in wddone (v=0xc04dd800) at ../../../../dev/ata/wd.c:619
#8  0xc024a3c9 in wdc_ata_bio_done (chp=0xc04c6d20, xfer=0xc04d9000)
    at ../../../../dev/ata/ata_wdc.c:660
#9  0xc024a2a4 in wdc_ata_bio_intr (chp=0xc04c6d20, xfer=0xc04d9000, irq=1)
    at ../../../../dev/ata/ata_wdc.c:601
#10 0xc011d9c4 in wdcintr (arg=0xc04c6d20) at ../../../../dev/ic/wdc.c:675
#11 0xc024d252 in pciide_compat_intr (arg=0xc04c6d20)
    at ../../../../dev/pci/pciide.c:636
#12 0xc0101cd4 in Xintr15 ()