Hello.

Trying to play around a bit with softraid using vnd reliably results
in a panic when assembling the raid volume. I think the first time I
tried this was around 4.9 so it's not something new.

While the combination of vnd and softraid may not be useful for any
real purpose, I noticed this while hoping to be able to fail a disk in
a somewhat simpler to retry manner than the nailgun approach I read
about here recently...

I don't know if it's important, but also after the trace and ps listed
below, boot reboot won't reboot the first time, but I can enter ddb
again by sending a serial break and then get the machine to reboot by
reexecuting the boot reboot command.

Regards,
Eivind

root:skoeske> dd if=/dev/zero of=disk1 bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 3.852 secs (27215650 bytes/sec)
root:skoeske> r disk1=disk2
dd if=/dev/zero of=disk2 bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 2.569 secs (40802861 bytes/sec)
root:skoeske> r disk2=disk3
dd if=/dev/zero of=disk3 bs=1m count=100
100+0 records in
100+0 records out
104857600 bytes transferred in 3.750 secs (27957919 bytes/sec)
root:skoeske> vnconfig vnd0 disk1
root:skoeske> vnconfig vnd1 disk2
root:skoeske> vnconfig vnd2 disk3
root:skoeske> fdisk -iy vnd0
Warning CHS values out of bounds only saving LBA values
Writing MBR at offset 0.
root:skoeske> fdisk -iy vnd1 
Warning CHS values out of bounds only saving LBA values
Writing MBR at offset 0.
root:skoeske> fdisk -iy vnd2 
Warning CHS values out of bounds only saving LBA values
Writing MBR at offset 0.
root:skoeske> printf "a\n\n\n\nRAID\nw\nq\n\n" | disklabel -E vnd0
Label editor (enter '?' for help at any prompt)
> partition: [a] offset: [128] size: [204672] FS type: [4.2BSD] > > No label 
> changes.
root:skoeske> printf "a\n\n\n\nRAID\nw\nq\n\n" | disklabel -E vnd1 
Label editor (enter '?' for help at any prompt)
> partition: [a] offset: [128] size: [204672] FS type: [4.2BSD] > > No label 
> changes.
root:skoeske> printf "a\n\n\n\nRAID\nw\nq\n\n" | disklabel -E vnd2 
Label editor (enter '?' for help at any prompt)
> partition: [a] offset: [128] size: [204672] FS type: [4.2BSD] > > No label 
> changes.
root:skoeske> bioctl -c 5 -l /dev/vnd0a,/dev/vnd1a,/dev/vnd2a softraid0
sd0 at scsibus1 targ 1 lun 0: <OPENBSD, SR RAID 5, 005> SCSI2 0/direct fixed
sd0: 199MB, 512 bytes/sector, 408064 sectors
softraid0: SR RAID 5 volume attached as sd0
panic: softraid0: sr_wu_put got active wu
Stopped at      Debugger+0x4:   popl    %ebp
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger(d08fa43c,f2017e08,d08ce53b,f2017e08,0) at Debugger+0x4
panic(d08ce53b,d0f8a014,f2017e3c,d105fa30,d105ce00) at panic+0x5d
sr_wu_put(d105f000,d0ff12b8,f2017e3c,f2017e3c,d02030dd) at sr_wu_put+0x104
scsi_io_put(d105fa30,d0ff12b8,8000,d1068000,d1068000) at scsi_io_put+0x19
scsi_xs_put(f1f4d000,d1068000,f2017e8c,d0418d98,f1f4d000) at scsi_xs_put+0x37
sr_raidp_intr(d1068000,f1e8601c,f11ec000,200,52000) at sr_raidp_intr+0x15b
vndstrategy(d1068000,0,0,50,d1068000) at vndstrategy+0x70
spec_strategy(f2017f48,0,f2017f6c,d03ee028,d1053f50) at spec_strategy+0x3d
VOP_STRATEGY(d1068000,0,0,0,d0ff12f8) at VOP_STRATEGY+0x2c
sr_startwu_callback(d105f000,d0ff12b8,d02008bf,d1053f40,d03ee050) at sr_startwu
_callback+0x39
workq_thread(d1053f40) at workq_thread+0x36
Bad frame pointer: 0xd0bc6ed8
ddb> ps
   PID   PPID   PGRP    UID  S       FLAGS  WAIT          COMMAND
* 4458      0      0      0  7    0x100200                srdis
  9614   9263  31326   1000  3        0x80  ttyin         less
  9263  31326  31326   1000  3        0x88  pause         sh
 31326   8662  31326   1000  3        0x80  wait          man
  8662  24219   8662   1000  3        0x88  pause         ksh
 24219   7388   7388   1000  3        0x80  select        sshd
  7388   1358   7388      0  3        0x80  poll          sshd
  8332      1   8332      0  2        0x80                ksh
 21947      1  21947      0  3        0x80  ttyin         getty
 28840      1  28840      0  3        0x80  ttyin         getty
 32669      1  32669      0  3        0x80  ttyin         getty
 25686      1  25686      0  3        0x80  ttyin         getty
 19769      1  19769      0  3        0x80  ttyin         getty
 10627      1  10627      0  3        0x80  select        cron
 14888      1  14888     99  3        0x80  poll          sndiod
  5483      1   5483      0  3        0x80  select        inetd
 27714  10979  10979     95  3        0x80  kqread        smtpd
  9877  10979  10979     95  3        0x80  kqread        smtpd
 31352  10979  10979     95  3        0x80  kqread        smtpd
 17499  10979  10979     95  3        0x80  kqread        smtpd
 25024  10979  10979     95  3        0x80  kqread        smtpd
 28736  10979  10979     95  3        0x80  kqread        smtpd
 22163  10979  10979     95  3        0x80  kqread        smtpd
 24159  10979  10979     95  3        0x80  kqread        smtpd
 10979      1  10979      0  3        0x80  kqread        smtpd
  1641      1   1641      0  3        0x80  poll          rwhod
  1358      1   1358      0  3        0x80  select        sshd
 31559      0      0      0  3    0x100280  nfsidl        nfsio
 23999      0      0      0  3    0x100280  nfsidl        nfsio
 16359      0      0      0  3    0x100280  nfsidl        nfsio
 15513      0      0      0  3    0x100280  nfsidl        nfsio
   461  31825  31825      0  3        0x80  nfsd          nfsd
 15871  31825  31825      0  3        0x80  nfsd          nfsd
 17378  31825  31825      0  3        0x80  nfsd          nfsd
 30747  31825  31825      0  3        0x80  nfsd          nfsd
 31825      1  31825      0  3        0x80  netcon        nfsd
 24922      1  24922      0  3        0x80  select        mountd
  8593      1   8593     28  3        0x80  poll          portmap
 19700  24876  31438     83  3        0x80  poll          ntpd
 24876  31438  31438     83  3        0x80  poll          ntpd
 31438      1  31438      0  3        0x80  poll          ntpd
  2741  23915  23915     74  3        0x80  bpf           pflogd
 23915      1  23915      0  3        0x80  netio         pflogd
  2049   9843   9843     73  3           0  ffs_fsync     syslogd
  9843      1   9843      0  3        0x80  netio         syslogd
    14      0      0      0  3    0x100200  aiodoned      aiodoned
    13      0      0      0  3    0x100200  syncer        update
    12      0      0      0  3    0x100200  cleaner       cleaner
    11      0      0      0  3    0x100200  reaper        reaper
    10      0      0      0  3    0x100200  pgdaemon      pagedaemon
     9      0      0      0  3    0x100200  bored         crypto
     8      0      0      0  3    0x100200  pftm          pfpurge
     7      0      0      0  3    0x100200  usbtsk        usbtask
     6      0      0      0  3    0x100200  usbatsk       usbatsk
     5      0      0      0  3    0x100200  apmev         apm0
     4      0      0      0  2    0x100200                syswq
     3      0      0      0  3  0x40100200                idle0
     2      0      0      0  3    0x100200  kmalloc       kmthread
     1      0      1      0  3        0x80  wait          init
     0     -1      0      0  3       0x200  scheduler     swapper
ddb> 


OpenBSD 5.2-current (GENERIC) #7: Mon Dec 17 10:51:42 MST 2012
    dera...@i386.openbsd.org:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Celeron(TM) CPU 1100MHz ("GenuineIntel" 686-class) 1.10 GHz
cpu0: 
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PSE36,MMX,FXSR,SSE,PERF
real mem  = 125370368 (119MB)
avail mem = 112373760 (107MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 09/18/02, BIOS32 rev. 0 @ 0xfb3b0, SMBIOS 
rev. 2.2 @ 0xf0800 (43 entries)
bios0: vendor Phoenix Technologies, LTD version "6.00 PG" date 09/18/2002
apm0 at bios0: Power Management spec V1.2 (slowidle)
acpi at bios0 function 0x0 not configured
pcibios0 at bios0: rev 2.1 @ 0xf0000/0xdef4
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfde50/160 (8 entries)
pcibios0: PCI Exclusive IRQs: 5 10 11 12
pcibios0: PCI Interrupt Router at 000:01:0 ("SiS 85C503 System" rev 0x00)
pcibios0: PCI bus #1 is the last bus
bios0: ROM list: 0xc0000/0xc000
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 0 function 0 "SiS 630 PCI" rev 0x30
sisagp0 at pchb0
agp0 at sisagp0: aperture at 0xe8000000, size 0x4000000
pciide0 at pci0 dev 0 function 1 "SiS 5513 EIDE" rev 0xd0: 630S: DMA, channel 0 
configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: <ST380215A>
wd0: 16-sector PIO, LBA48, 76319MB, 156301488 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
pciide0: channel 1 disabled (no drives)
pcib0 at pci0 dev 1 function 0 "SiS 85C503 System" rev 0x00
sis0 at pci0 dev 1 function 1 "SiS 900 10/100BaseTX" rev 0x84: irq 10, address 
00:08:9b:82:06:7c
ukphy0 at sis0 phy 0: Generic IEEE 802.3u media interface, rev. 0: OUI 
0x000760, model 0x0000
ohci0 at pci0 dev 1 function 2 "SiS 5597/5598 USB" rev 0x07: irq 5, version 
1.0, legacy support
ohci1 at pci0 dev 1 function 3 "SiS 5597/5598 USB" rev 0x07: irq 5, version 
1.0, legacy support
autri0 at pci0 dev 1 function 4 "SiS 7018 Audio" rev 0x02: irq 12
ac97: codec id 0x414c4710 (Avance Logic ALC200)
ac97: codec features headphone, 18 bit DAC, 18 bit ADC, Realtek 3D
audio0 at autri0
midi0 at autri0: <4DWAVE MIDI UART>
ppb0 at pci0 dev 2 function 0 "SiS 86C201 AGP" rev 0x00
pci1 at ppb0 bus 1
vga1 at pci1 dev 0 function 0 "SiS 6300" rev 0x21
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
rl0 at pci0 dev 12 function 0 "Realtek 8139" rev 0x10: irq 11, address 
00:08:9b:6a:1f:94
rlphy0 at rl0 phy 0: RTL internal PHY
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pckbc0 at isa0 port 0x60/5
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
it0 at isa0 port 0x2e/2: IT8705F rev 2, EC port 0x290
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
usb0 at ohci0: USB revision 1.0
uhub0 at usb0 "SiS OHCI root hub" rev 1.00/1.00 addr 1
usb1 at ohci1: USB revision 1.0
uhub1 at usb1 "SiS OHCI root hub" rev 1.00/1.00 addr 1
mtrr: Pentium Pro MTRR support
vscsi0 at root
scsibus0 at vscsi0: 256 targets
softraid0 at root
scsibus1 at softraid0: 256 targets
root on wd0a (ee00000000000001.a) swap on wd0b dump on wd0b
WARNING: / was not properly unmounted

Reply via email to