Subject: kern/12698: RAIDframe apparently caused a crash when no components were found.
To: None <gnats-bugs@gnats.netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 04/19/2001 02:05:38
>Number:         12698
>Category:       kern
>Synopsis:       RAIDframe apparently caused a crash when no components were found.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 18 23:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Greg A. Woods
>Release:        2001/03/24
>Organization:
Planix, Inc.; Toronto, Ontario; Canada
>Environment:

System: NetBSD proven 1.5T NetBSD 1.5T (PROVEN) #5: Tue Apr 17 20:14:46 EDT 2001 woods@proven:/work/woods/NetBSD-src/sys/arch/i386/compile/PROVEN i386
Architecture: i386
Machine: i386

>Description:

	I accidentally left a sample RAID configuration file in
	/etc/raid0.conf and experienced the following crash on boot:

>How-To-Repeat:

	create a valid /etc/raid0.conf file for which no components have
	ever been initialised and then reboot

>Fix:

	unknown

	but the work-around is to make sure there's no /etc/raid0.conf
	when there's not supposed to be one.... :-)
>Release-Note:
>Audit-Trail:
>Unformatted:
 >> NetBSD/i386 BIOS Boot, Revision 2.6
 >> (woods@whome, Thu Mar 16 17:01:34 EST 2000)
 >> Memory: 636/195584 k
 Use hd1a:netbsd to boot sd0 when wd0 is also installed
 Press return to boot now, any other key for boot menu
 booting sd0a:netbsd - starting in 0
 3199516+65900+754816 [74+175728+158937]=0x428590
 [ using 335236 bytes of netbsd ELF symbol table ]
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
     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.5T (PROVEN) #5: Tue Apr 17 20:14:46 EDT 2001
     woods@proven:/work/woods/NetBSD-src/sys/arch/i386/compile/PROVEN
 cpu0: Intel Pentium II (Klamath) (686-class), 299.22 MHz
 cpu0: I-cache 16K 32b/line 4-way, D-cache 16K 32b/line 2/4-way
 cpu0: L2 cache 512K 32b/line 4-way
 cpu0: features 80fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR>
 cpu0: features 80fbff<PGE,MCA,CMOV,MMX>
 total memory = 191 MB
 avail memory = 172 MB
 using 2478 buffers containing 9912 KB of memory
 biostramp installed @ 1000
 BIOS32 rev. 0 found at 0xf0851
 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 82441FX PCI and Memory Controller (PMC) (rev. 0x02)
 vga1 at pci0 dev 7 function 0: S3 Trio32/64 (rev. 0x54)
 wsdisplay0 at vga1
 ppb0 at pci0 dev 11 function 0: IBM 82351 PCI-PCI Bridge (rev. 0x01)
 pci1 at ppb0 bus 1
 pci1: i/o space, memory space enabled
 ahc0 at pci1 dev 4 function 0
 ahc0: interrupting at irq 14
 ahc0: aic7880 Wide Channel A, SCSI Id=7, 16/255 SCBs
 scsibus0 at ahc0 channel 0: 16 targets, 8 luns per target
 le0 at pci1 dev 5 function 0: PCnet-PCI Ethernet
 le0: address 00:06:29:05:cf:8d
 le0: 8 receive buffers, 2 transmit buffers
 le0: interrupting at irq 11
 tlp0 at pci1 dev 7 function 0: Macronix MX98715AEC-x Ethernet, pass 2.5
 tlp0: broken MicroWire interface detected; setting SROM size to 1Kb
 tlp0: interrupting at irq 10
 tlp0: Ethernet address 00:80:c6:f1:46:80
 tlp0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX
 siop0 at pci0 dev 14 function 0: Symbios Logic 53c875 (ultra-wide scsi)
 siop0: using on-board RAM
 siop0: interrupting at irq 15
 scsibus1 at siop0: 16 targets, 8 luns per target
 pcib0 at pci0 dev 19 function 0
 pcib0: Intel 82371SB PCI-to-ISA Bridge (PIIX3) (rev. 0x01)
 pciide0 at pci0 dev 19 function 1: Intel 82371SB IDE Interface (PIIX3) (rev. 0x00)
 pciide0: bus-master DMA support present
 pciide0: primary channel wired to compatibility mode
 pciide0: primary channel ignored (disabled)
 pciide0: secondary channel wired to compatibility modepciide0: secondary channel ignored (disabled)
 uhci0 at pci0 dev 19 function 2: Intel 82371SB USB Host Controller (PIIX3) (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
 isa0 at pcib0
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns16550a, working fifo
 com0: console
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns16550a, working fifo
 kbc selftest: ffffffff
 lptprobe: mask ff data 55 failed
 lptprobe: mask ff data 55 failed
 lpt2 at isa0 port 0x3bc-0x3bf: polled
 pcppi0 at isa0 port 0x61
 midi0 at pcppi0: PC speaker
 spkr0 at pcppi0
 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 f7e7 netmask ffe7 ttymask ffe7
 scsibus0: waiting 2 seconds for devices to settle...ahc0: target 0 using 16bit transfers
 ahc0: target 0 synchronous at 20.0MHz, offset = 0x8
 ahc0: target 0 using tagged queuing
 sd0 at scsibus0 target 0 lun 0: <QUANTUM, VIKING 4.5 SCA, 8600> SCSI2 0/direct fixed
 sd0: 4345 MB, 6144 cyl, 8 head, 181 sec, 512 bytes/sect x 8899737 sectors
 ahc0: target 1 using 16bit transfers
 ahc0: target 1 synchronous at 20.0MHz, offset = 0x8
 ahc0: target 1 using tagged queuing
 sd1 at scsibus0 target 1 lun 0: <QUANTUM, VIKING 4.5 SCA, 8600> SCSI2 0/direct fixed
 sd1: 4345 MB, 6144 cyl, 8 head, 181 sec, 512 bytes/sect x 8899737 sectors
 ahc0: target 2 using 16bit transfers
 ahc0: target 2 synchronous at 20.0MHz, offset = 0x8
 ahc0: target 2 using tagged queuing
 sd2 at scsibus0 target 2 lun 0: <QUANTUM, VIKING 4.5 WSE, 880P> SCSI2 0/direct fixed
 sd2: 4345 MB, 6144 cyl, 8 head, 181 sec, 512 bytes/sect x 8899737 sectors
 ahc0: target 4 using 16bit transfers
 ahc0: target 4 synchronous at 20.0MHz, offset = 0x8
 ahc0: target 4 using tagged queuing
 sd3 at scsibus0 target 4 lun 0: <FUJITSU, MAB3045SC, 0109> SCSI2 0/direct fixed
 sd3: 4343 MB, 8491 cyl, 5 head, 209 sec, 512 bytes/sect x 8895370 sectors
 ahc0: target 6 using 8bit transfers
 ahc0: target 6 synchronous at 10.0MHz, offset = 0xf
 cd0 at scsibus0 target 6 lun 0: <IBM, CDRM00203\000\000\000\000\000!K, 1.01> SCSI2 5/cdr
 om removable
 scsibus1: waiting 2 seconds for devices to settle...
 siop0: alloc newcdb at PHY addr 0x1b000
 siop0: target 0 using tagged queuing
 sd4 at scsibus1 target 0 lun 0: <SEAGATE, ST43400N, 1028> SCSI2 0/direct fixed
 siop0: target 0 now synchronous at 10.0Mhz, offset 15
 sd4: 2777 MB, 2737 cyl, 21 head, 98 sec, 512 bytes/sect x 5688447 sectors
 siop0: target 1 using tagged queuing
 sd5 at scsibus1 target 1 lun 0: <SEAGATE, ST43400N, 0116> SCSI2 0/direct fixed
 siop0: target 1 now synchronous at 10.0Mhz, offset 15
 sd5: 2777 MB, 2737 cyl, 21 head, 98 sec, 512 bytes/sect x 5688447 sectors
 siop0: target 2 using tagged queuing
 sd6 at scsibus1 target 2 lun 0: <SEAGATE, ST43400N, 1028> SCSI2 0/direct fixed
 siop0: target 2 now synchronous at 10.0Mhz, offset 15
 sd6: 2777 MB, 2737 cyl, 21 head, 98 sec, 512 bytes/sect x 5688447 sectors
 siop0: target 3 using tagged queuing
 sd7 at scsibus1 target 3 lun 0: <SEAGATE, ST43400N, 1028> SCSI2 0/direct fixed
 siop0: target 3 now synchronous at 10.0Mhz, offset 15
 sd7: 2777 MB, 2737 cyl, 21 head, 98 sec, 512 bytes/sect x 5688447 sectors
 st0 at scsibus1 target 4 lun 0: <EXABYTE, EXB-85058HE-0000, 0108> SCSI2 1/sequential removable
 st0: siop0: target 4 now synchronous at 5.0Mhz, offset 15
 drive empty
 ch0 at scsibus1 target 5 lun 0: <EXABYTE, EXB-210, 3.08> SCSI2 8/changer removable
 ch0: 11 slots, 1 drive, 1 picker, 0 portals
 raidattach: Asked for 4 units
 Kernelized RAIDframe activated
 IPsec: Initialized Security Association Processing.
 WARNING: old BSD partition ID!
 findroot: can't open dev sd2a (6)
 findroot: can't open dev sd3a (6)
 findroot: can't open dev sd4a (6)
 findroot: can't open dev sd5a (6)
 findroot: can't open dev sd6a (6)
 findroot: can't open dev sd7a (6)
 WARNING: old BSD partition ID!
 boot device: sd0
 root on sd0a dumps on sd0b
 mountroot: trying msdos...
 mountroot: trying cd9660...
 mountroot: trying ntfs...
 mountroot: trying nfs...
 mountroot: trying ext2fs...
 mountroot: trying ffs...
 root file system type: ffsinit: copying out path `/sbin/init' 11
 Tue Apr 17 20:28:40 EDT 2001
 RAIDFRAME: protectedSectors is 64
 raid0: Summary of serial numbers:
 -440955719 1
 1313429331 1
 960051513 1
 raid0: Summary of mod counters:
 -440955719 1
 3223092 1
 Hosed component: /dev/sd4d
 raid0: Too many different serial numbers!
 raid0: Component /dev/sd4d being configured at row: 0 col: 0
          Row: -440955719 Column: -440955719 Num Rows: -440955719 Num Columns: -440955719
          Version: -440955719 Serial Number: -440955719 Mod Counter: -440955719
          Clean: Yes Status: -440955719
 /dev/sd4d has a different modfication count: 3223092 -440955719
 Row out of alignment for: /dev/sd4d
 Column out of alignment for: /dev/sd4d
 Number of rows do not match for: /dev/sd4d
 Number of columns do not match for: /dev/sd4d
 raid0: Component /dev/sd5d being configured at row: 0 col: 1
          Row: 2099202 Column: 2 Num Rows: 63488 Num Columns: 4194336
          Version: 1301305579 Serial Number: 1313429331 Mod Counter: 3223092
          Clean: Yes Status: 2095072
 /dev/sd5d has a different serial number: -440955719 1313429331
 Row out of alignment for: /dev/sd5d
 Column out of alignment for: /dev/sd5d
 Number of rows do not match for: /dev/sd5d
 Number of columns do not match for: /dev/sd5d
 raid0: Component /dev/sd6d being configured at row: 0 col: 2
          Row: 960051513 Column: 960051513 Num Rows: 960051513 Num Columns: 960051513
          Version: 960051513 Serial Number: 960051513 Mod Counter: 960051513
          Clean: Yes Status: 960051513
 /dev/sd6d has a different serial number: -440955719 960051513
 /dev/sd6d has a different modfication count: 3223092 960051513
 Row out of alignment for: /dev/sd6d
 Column out of alignment for: /dev/sd6d
 Number of rows do not match for: /dev/sd6d
 Number of columns do not match for: /dev/sd6d
 raid0: Component /dev/sd7d being configured at row: 0 col: 3
          Row: 0 Column: 0 Num Rows: 0 Num Columns: 0
          Version: 0 Serial Number: 0 Mod Counter: 0
          Clean: No Status: 0
 /dev/sd7d has a different serial number: -440955719 0
 /dev/sd7d has a different modfication count: 3223092 0
 Column out of alignment for: /dev/sd7d
 Number of rows do not match for: /dev/sd7d
 Number of columns do not match for: /dev/sd7d
 /dev/sd7d is not clean!
 raid0: There were fatal errors
 Closing vnode for row: 0 col: 0
 Closing vnode for row: 0 col: 1
 Closing vnode for row: 0 col: 2
 Closing vnode for row: 0 col: 3
 RAIDFRAME: failed rf_ConfigureDisks with 22
 Closing vnode for row: 0 col: 0
 vnode was NULL
 Closing vnode for row: 0 col: 1
 vnode was NULL
 Closing vnode for row: 0 col: 2
 vnode was NULL
 Closing vnode for row: 0 col: 3
 vnode was NULL
 raidctl: ioctl (RAIDFRAME_CONFIGURE) failed: Invalid argument
 raidctl: ioctl (RAIDFRAME_CHECK_PARITY) failed: Device not configured
 swapctl: adding W/dev/sd0b as swaAp device at prioRrity 0
 NING: old BSD partition ID!
 swapctl: adding /dev/sd1b as swap device at priority 0
 swapctl: adding /dev/sd2b as swap device at priority 0
 swapctl: adding /dev/sd3b as swap device at priority 0
 Automatic boot in progress: starting file system checks.
 /dev/rsd0a: file system is clean; not checking
 /dev/rsd1a: file system is clean; not checking
 /dev/rsd0e: file system is clean; not checking
 /dev/rsd1e: file system is clean; not checking
 /dev/rsd3h: file system is clean; not checking
 /dev/rsd2h: file system is clean; not checking
 /dev/rsd0f: file system is clean; not checking
 /dev/rsd1f: file system is clean; not checking
 Setting tty flags.
 Enabling ipfilter.
 IP Filter: v3.4.9 initialized.  Default = pass all, Logging = enabled
 Setting sysctl variables:
 sysctl: sysctl() for kern.login_name_max failed: Operation not permitted
 net.inet.tcp.mssdflt: 512 -> 1024
 net.inet.tcp.mss_ifmtu: 0 -> 1
 net.inet.ip.mtudisc: 0 -> 1
 net.inet.tcp.newreno: 0 -> 1
 ddb.onpanic: 1 -> 0
 ddb.maxwidth: 80 -> 88
 ddb.lines: 24 -> 31
 Starting network.
 Hostname: proven
 NIS domainname: .weird.com
 add net 127.0.0.0: gateway 127.0.0.1
 add net fe80::: gateway ::1
 /etc/rc: WARNING: $ip6sitelocal is not set properly.
 add net fec0::: gateway ::1
 add net ::ffff:0.0.0.0: gateway ::1
 add net ::224.0.0.0: gateway ::1
 add net ::127.0.0.0: gateway ::1
 add net ::0.0.0.0: gateway ::1
 add net ::255.0.0.0: gateway ::1
 add net 2002:e000::: gateway ::1
 add net 2002:7f00::: gateway ::1
 add net 2002:0000::: gateway ::1
 add net 2002:ff00::: gateway ::1
 add net ::0.0.0.0: gateway ::1
 IPv6 mode: host
 Configuring network interfaces: le0 tlp0.
 add net default: gateway 204.92.254.6
 Adding interface aliases:
 Building databases...
 /etc/rc: WARNING: $newsyslog is not set properly.
 Starting syslogd.
 Checking for core dump...
 dumplo = 318001152 (621096 * 512)
 panic: getblk: block size invariant failed
 Begin traceback...
 getblk(d028fa40,f7720,800,0,0) at getblk+0xd0
 bread(d028fa40,f7720,800,ffffffff,d0ad2e48) at bread+0x29
 spec_read(d0ad2e88,d0ad2e9c,c01cc356,d0ad2e88,0) at spec_read+0x25c
 ufsspec_read(d0ad2e88,0,4,d027c600,d0ad2e88) at ufsspec_read+0x2d
 vn_read(d027c600,d0ad2f3c,d0ad2ed4,c089ef00,0) at vn_read+0xba
 dofileread(d029255c,8,d027c600,8072d40,4) at dofileread+0x93
 sys_pread(d029255c,d0ad2f88,d0ad2f80) at sys_pread+0xec
 syscall_plain(1f,1f,4,0,bfbfdc80) at syscall_plain+0x98
 End traceback...
 syncing disks... panic: lockmgr: locking against myself
 Begin traceback...
 lockmgr(d028fac4,10012,d028fa40,d0ad2cc0,c01cc8b3) at lockmgr+0x556
 genfs_lock(d0ad2cb4) at genfs_lock+0x18
 vn_lock(d028fa40,10012,d028fa40,d0ad2d00,d0ad2d24) at vn_lock+0x63
 vget(d028fa40,10012) at vget+0xbe
 ffs_sync(c0921000,2,c089ef00,d029255c) at ffs_sync+0x9c
 sys_sync(d029255c,0,0,100,c03878e0) at sys_sync+0x56
 vfs_shutdown(d0ad2db0,d0ad2da4,c01ac419,100,0) at vfs_shutdown+0x64
 cpu_reboot(100,0,0,c4a0eda0,800) at cpu_reboot+0x3b
 panic(c03878e0,d028fa40,d029255c,4,0) at panic+0xcd
 getblk(d028fa40,f7720,800,0,0) at getblk+0xd0
 bread(d028fa40,f7720,800,ffffffff,d0ad2e48) at bread+0x29
 spec_read(d0ad2e88,d0ad2e9c,c01cc356,d0ad2e88,0) at spec_read+0x25c
 ufsspec_read(d0ad2e88,0,4,d027c600,d0ad2e88) at ufsspec_read+0x2d
 vn_read(d027c600,d0ad2f3c,d0ad2ed4,c089ef00,0) at vn_read+0xba
 dofileread(d029255c,8,d027c600,8072d40,4) at dofileread+0x93
 sys_pread(d029255c,d0ad2f88,d0ad2f80) at sys_pread+0xec
 syscall_plain(1f,1f,4,0,bfbfdc80) at syscall_plain+0x98
 End traceback...