Subject: current panics when umounting disk using softdeps
To: None <port-alpha@netbsd.org>
From: Ari Lukkarinen <arska@lukkarinen.org>
List: port-alpha
Date: 09/05/2004 15:04:47
Hi

I am running NetBSD current on Alpha (Digital Personal Workstation 500au).
I have problems with softdeps. I can mount and use a disk mounted with
a softdep option, but umounting the disk causes the system to panic.

I have slightly modified init.c, because otherwise
the memory file system containing devices is too small and
the system does not boot cleanly. However, 
I think that the modification should not cause the problem.


-------------------------
# uname -a NetBSD obelix.koti 2.0G NetBSD 2.0G (GENERIC) #1: Sun Aug 22
21:19:13 EEST 2004 
arska@obelix.koti:/usr/wrk/obj/src/usr/cvs/src/sys/arch/alpha/compile/GENERIC
alpha


panic: kernel diagnostic assertion "vp != NULL" failed: file 
"/usr/cvs/src/sys/u
fs/ffs/ffs_softdep.c", line 5139
Stopped in pid 3060.1 (umount) at       netbsd:cpu_Debugger+0x4: 
ret zero,(ra)
db> trace
cpu_Debugger() at netbsd:cpu_Debugger+0x4
panic() at netbsd:panic+0x1f8
__assert() at netbsd:__assert+0x38
flush_inodedep_deps() at netbsd:flush_inodedep_deps+0x404
softdep_sync_metadata() at netbsd:softdep_sync_metadata+0xc8
ffs_full_fsync() at netbsd:ffs_full_fsync+0x16c
ffs_fsync() at netbsd:ffs_fsync+0x68
VOP_FSYNC() at netbsd:VOP_FSYNC+0x4c
ffs_flushfiles() at netbsd:ffs_flushfiles+0x13c
softdep_flushfiles() at netbsd:softdep_flushfiles+0x44
ffs_unmount() at netbsd:ffs_unmount+0x278
dounmount() at netbsd:dounmount+0x148
sys_unmount() at netbsd:sys_unmount+0x134
syscall_plain() at netbsd:syscall_plain+0xc4
XentSys() at netbsd:XentSys+0x5c
--- syscall (22) ---
--- user mode ---


$ diff init.c init.c.orig
189,190c189,195
< #define NINODE 2048
< #define FSSIZE 2048
---
> #define NINODE 896
> #define FSSIZE ((8192         /* boot area */                         \
>       + 2 * 8192              /* two copies of superblock */          \
>       + 4096                  /* cylinder group info */               \
>       + NINODE * (128 + 18)   /* inode and directory entry */         \
>       + mfile[0].len          /* size of MAKEDEV file */              \
>       + 2 * 4096) / 512)      /* some slack */


Sep  5 14:30:04 obelix syslogd: restart
Sep  5 14:30:04 obelix /netbsd: consinit: not using prom console
Sep  5 14:30:04 obelix /netbsd: Copyright (c) 1996, 1997, 1998, 1999, 
2000, 2001, 2002, 2003, 2004
Sep  5 14:30:04 obelix /netbsd:     The NetBSD Foundation, Inc.  All 
rights reserved.
Sep  5 14:30:04 obelix /netbsd: Copyright (c) 1982, 1986, 1989, 1991, 1993
Sep  5 14:30:04 obelix /netbsd:     The Regents of the University of 
California.  All rights reserved.
Sep  5 14:30:04 obelix /netbsd:
Sep  5 14:30:04 obelix /netbsd: NetBSD 2.0G (GENERIC) #1: Sun Aug 22 
21:19:13 EEST 2004
Sep  5 14:30:04 obelix /netbsd: 
arska@obelix.koti:/usr/wrk/obj/src/usr/cvs/src/sys/arch/alpha/compile/GENERIC
Sep  5 14:30:04 obelix /netbsd: Digital Personal WorkStation 500au, 
500MHz, s/n
Sep  5 14:30:04 obelix /netbsd: 8192 byte page size, 1 processor.
Sep  5 14:30:04 obelix /netbsd: total memory = 1024 MB
Sep  5 14:30:04 obelix /netbsd: (1896 KB reserved for PROM, 1022 MB used 
by NetBSD)
Sep  5 14:30:04 obelix /netbsd: avail memory = 996 MB
Sep  5 14:30:04 obelix /netbsd: mainbus0 (root)
Sep  5 14:30:04 obelix /netbsd: cpu0 at mainbus0: ID 0 (primary), 21164A-0
Sep  5 14:30:05 obelix /netbsd: cpu0: Architecture extensions: 1<BWX>
Sep  5 14:30:05 obelix /netbsd: cia0 at mainbus0: DECchip 2117x Core Logic 
Chipset (Pyxis), pass 1
Sep  5 14:30:05 obelix /netbsd: cia0: extended capabilities: 1<BWEN>
Sep  5 14:30:05 obelix /netbsd: cia0: using BWX for PCI config access
Sep  5 14:30:05 obelix /netbsd: pci0 at cia0 bus 0
Sep  5 14:30:05 obelix /netbsd: tlp0 at pci0 dev 3 function 0: DECchip 
21143 Ethernet, pass 3.0
Sep  5 14:30:05 obelix /netbsd: tlp0: interrupting at dec 550 irq 0
Sep  5 14:30:05 obelix /netbsd: tlp0: DEC , Ethernet address 
00:00:f8:76:4e:79
Sep  5 14:30:05 obelix /netbsd: nsphy0 at tlp0 phy 5: DP83840 10/100 media 
interface, rev. 1
Sep  5 14:30:05 obelix /netbsd: nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 
100baseTX-FDX, auto
Sep  5 14:30:05 obelix /netbsd: tlp0: 10baseT, 10baseT-FDX, 10base2, 
10base5
Sep  5 14:30:05 obelix /netbsd: sio0 at pci0 dev 7 function 0: Contaq 
Microsystems 82C693 PCI-ISA Bridge (rev. 0x00)
Sep  5 14:30:05 obelix /netbsd: cypide0 at pci0 dev 7 function 1
Sep  5 14:30:05 obelix /netbsd: cypide0: Cypress 82C693 IDE Controller 
(rev. 0x00)
Sep  5 14:30:05 obelix /netbsd: cypide0: bus-master DMA support present
Sep  5 14:30:05 obelix /netbsd: cypide0: primary channel wired to 
compatibility mode
Sep  5 14:30:05 obelix /netbsd: cypide0: primary channel interrupting at 
isa irq 14
Sep  5 14:30:05 obelix /netbsd: atabus0 at cypide0 channel 0
Sep  5 14:30:05 obelix /netbsd: cypide1 at pci0 dev 7 function 2
Sep  5 14:30:05 obelix /netbsd: cypide1: Cypress 82C693 IDE Controller 
(rev. 0x00)
Sep  5 14:30:05 obelix /netbsd: cypide1: hardware does not support DMA
Sep  5 14:30:05 obelix /netbsd: cypide1: primary channel wired to 
compatibility mode
Sep  5 14:30:05 obelix /netbsd: cypide1: secondary channel interrupting at 
isa irq 15
Sep  5 14:30:05 obelix /netbsd: atabus1 at cypide1 channel 0
Sep  5 14:30:05 obelix /netbsd: ohci0 at pci0 dev 7 function 3: Contaq 
Microsystems 82C693 PCI-ISA Bridge (rev. 0x00)
Sep  5 14:30:05 obelix /netbsd: ohci0: interrupting at isa irq 10
Sep  5 14:30:05 obelix /netbsd: ohci0: OHCI version 1.0, legacy support
Sep  5 14:30:05 obelix /netbsd: usb0 at ohci0: USB revision 1.0
Sep  5 14:30:05 obelix /netbsd: uhub0 at usb0
Sep  5 14:30:05 obelix /netbsd: uhub0: Contaq Microsys OHCI root hub, 
class 9/0, rev 1.00/1.00, addr 1
Sep  5 14:30:05 obelix /netbsd: uhub0: 2 ports with 2 removable, self 
powered
Sep  5 14:30:05 obelix /netbsd: tga0 at pci0 dev 12 function 0: TGA2 pass 
2, board type T8-02
Sep  5 14:30:05 obelix /netbsd: tga0: 1280 x 1024, 8bpp, Bt485 RAMDAC
Sep  5 14:30:05 obelix /netbsd: tga0: interrupting at dec 550 irq 8
Sep  5 14:30:05 obelix /netbsd: wsdisplay0 at tga0 (kbdmux ignored)
Sep  5 14:30:05 obelix /netbsd: ppb0 at pci0 dev 20 function 0: Digital 
Equipment DC21152 PCI-PCI Bridge (rev. 0x02)
Sep  5 14:30:05 obelix /netbsd: pci1 at ppb0 bus 1
Sep  5 14:30:05 obelix /netbsd: pci1: i/o space, memory space enabled, 
rd/line, wr/inv ok
Sep  5 14:30:05 obelix /netbsd: isp0 at pci1 dev 4 function 0: QLogic 1020 
Fast Wide SCSI HBA
Sep  5 14:30:05 obelix /netbsd: isp0: interrupting at dec 550 irq 3
Sep  5 14:30:05 obelix /netbsd: isp0: invalid NVRAM header
Sep  5 14:30:05 obelix /netbsd: scsibus0 at isp0: 16 targets, 8 luns per 
target
Sep  5 14:30:06 obelix /netbsd: isp1 at pci1 dev 8 function 0: QLogic 1020 
Fast Wide SCSI HBA
Sep  5 14:30:06 obelix /netbsd: isp1: interrupting at dec 550 irq 12
Sep  5 14:30:06 obelix /netbsd: scsibus1 at isp1: 16 targets, 8 luns per 
target
Sep  5 14:30:06 obelix /netbsd: isa0 at sio0
Sep  5 14:30:06 obelix /netbsd: lpt0 at isa0 port 0x3bc-0x3bf irq 7
Sep  5 14:30:06 obelix /netbsd: com0 at isa0 port 0x3f8-0x3ff irq 4: 
ns16550a, working fifo
Sep  5 14:30:06 obelix /netbsd: com0: console
Sep  5 14:30:06 obelix /netbsd: com1 at isa0 port 0x2f8-0x2ff irq 3: 
ns16550a, working fifo
Sep  5 14:30:06 obelix /netbsd: pckbc0 at isa0 port 0x60-0x64
Sep  5 14:30:06 obelix /netbsd: vga0 at isa0 port 0x3b0-0x3df iomem 
0xa0000-0xbffff
Sep  5 14:30:06 obelix /netbsd: wsdisplay1 at vga0 (kbdmux ignored)
Sep  5 14:30:06 obelix /netbsd: sb0 at isa0 port 0x220-0x237 irq 5 drq 1: 
dsp v3.01
Sep  5 14:30:06 obelix /netbsd: audio0 at sb0: half duplex, mmap, 
independent
Sep  5 14:30:06 obelix /netbsd: midi at sb0 not configured
Sep  5 14:30:06 obelix /netbsd: opl at sb0 not configured
Sep  5 14:30:06 obelix /netbsd: pcppi0 at isa0 port 0x61
Sep  5 14:30:06 obelix /netbsd: midi0 at pcppi0: PC speaker
Sep  5 14:30:06 obelix /netbsd: spkr0 at pcppi0
Sep  5 14:30:06 obelix /netbsd: isabeep0 at pcppi0
Sep  5 14:30:06 obelix /netbsd: fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
Sep  5 14:30:06 obelix /netbsd: mcclock0 at isa0 port 0x70-0x71: mc146818 
or compatible
Sep  5 14:30:06 obelix /netbsd: fd0 at fdc0 drive 0: 1.44MB, 80 cyl, 2 
head, 18 sec
Sep  5 14:30:06 obelix /netbsd: Kernelized RAIDframe activated
Sep  5 14:30:06 obelix /netbsd: atapibus0 at atabus1: 2 targets
Sep  5 14:30:06 obelix /netbsd: scsibus0: waiting 2 seconds for devices to 
settle...
Sep  5 14:30:06 obelix /netbsd: cd0 at atapibus0 drive 0: <TOSHIBA CD-ROM 
XM-6302B, , 1012> cdrom removable
Sep  5 14:30:06 obelix /netbsd: scsibus1: waiting 2 seconds for devices to 
settle...
Sep  5 14:30:06 obelix /netbsd: cd0: 32-bit data port
Sep  5 14:30:06 obelix /netbsd: cd0: drive supports PIO mode 4, DMA mode 2
Sep  5 14:30:06 obelix /netbsd: cd0(cypide1:0:0): using PIO mode 4
Sep  5 14:30:06 obelix /netbsd: sd0 at scsibus0 target 0 lun 0: <DEC, 
RZ2CC-KA (C) DEC, 5520> disk fixed
Sep  5 14:30:06 obelix /netbsd: sd0: 4091 MB, 3708 cyl, 20 head, 113 sec, 
512 bytes/sect x 8380080 sectors
Sep  5 14:30:06 obelix /netbsd: sd0: sync (50.00ns offset 8), 16-bit 
(40.000MB/s) transfers, tagged queueing
Sep  5 14:30:06 obelix /netbsd: sd1 at scsibus0 target 2 lun 0: <HITACHI, 
DK329H-91WC, AKAK> disk fixed
Sep  5 14:30:07 obelix /netbsd: sd1: 8781 MB, 7931 cyl, 10 head, 226 sec, 
512 bytes/sect x 17985430 sectors
Sep  5 14:30:07 obelix /netbsd: sd1: sync (50.00ns offset 8), 16-bit 
(40.000MB/s) transfers, tagged queueing
Sep  5 14:30:07 obelix /netbsd: root on sd1a dumps on sd1b
Sep  5 14:30:07 obelix /netbsd: root file system type: ffs
Sep  5 14:30:07 obelix /netbsd: cc_microset[0]: delta 1094383767848633, 
resetting state
Sep  5 14:30:07 obelix /netbsd: warning: no /dev/console
Sep  5 14:30:07 obelix /netbsd: cc_microset[0]: delta 151367, resetting 
state
Sep  5 14:30:05 obelix savecore: no core dump
Sep  5 14:30:07 obelix ntpd[2813]: ntpd 4.2.0-r Wed Aug  4 19:34:36 EEST 
2004 (1)
Sep  5 14:30:09 obelix ntpd[2813]: precision = 2.000 usec
Sep  5 14:30:09 obelix ntpd[2813]: kernel time sync status 0040
Sep  5 14:30:09 obelix ntpd[2813]: frequency initialized 21.072 PPM from 
/var/db/ntp.drift
Sep  5 14:35:16 obelix /netbsd: cc_microset[0]: delta 114946412, resetting 
state
Sep  5 14:30:05 obelix savecore: no core dump
Sep  5 14:30:07 obelix ntpd[2813]: ntpd 4.2.0-r Wed Aug  4 19:34:36 EEST 
2004 (1)
Sep  5 14:30:09 obelix ntpd[2813]: precision = 2.000 usec
Sep  5 14:30:09 obelix ntpd[2813]: kernel time sync status 0040
Sep  5 14:30:09 obelix ntpd[2813]: frequency initialized 21.072 PPM from 
/var/db/ntp.drift