Greetings. I apologize in advance if this report is not helpful due to
a less conventional disk setup (root on USB flash, SR RAID 1 on two
2TB drives). I've had the following crash twice now with 6.0-stable
when attempting to reboot, at the point where it would normally say
"sd3 detached":

syncing disks... done
kernel: protection fault trap, code=0
Stopped at      bufq_destroy+0x83:      movq    0(%rdx),%rax
ddb{0}>

A freshly booted system can be rebooted all day long without issue,
the problem seems to manifest when the system has been running NFS and
Samba duties for a couple weeks and a low number of clients (< 5) are
connected. Supporting info (ddb panic/trace/ps/registers, dmesg,
disklabel, atactl) follows, thanks for your time.

Brian

ddb{0}> show panic
the kernel did not panic

ddb{0}> trace
bufq_destroy() at bufq_destroy+0x83
sddetach() at sddetach+0x3d
config_detach() at config_detach+0x13c
scsi_detach_lun() at scsi_detach_lun+0x97
sr_discipline_shutdown() at sr_discipline_shutdown+0x147
sr_shutdown() at sr_shutdown+0x2a
boot() at boot+0x144
reboot() at reboot+0x26
sys_reboot() at sys_reboot+0x5e
syscall() at syscall+0x27b
--- syscall (number 55) ---
end of kernel
end trace frame: 0x7f7ffffe4638, count: -10
0x18f35ee03a1a:

ddb{0}> ps
   TID   PPID   PGRP    UID  S       FLAGS  WAIT          COMMAND
*82195      1  82195      0  7         0x3                reboot
 58116      0      0      0  2     0x14200                zerothread
 29311      0      0      0  3     0x14200  aiodoned      aiodoned
 63303      0      0      0  3     0x14200  syncer        update
 90827      0      0      0  3     0x14200  cleaner       cleaner
  1847      0      0      0  3     0x14200  reaper        reaper
 87368      0      0      0  3     0x14200  pgdaemon      pagedaemon
 14370      0      0      0  3     0x14200  bored         srdis
 68510      0      0      0  3     0x14200  bored         crynlk
 84505      0      0      0  3     0x14200  bored         crypto
 60601      0      0      0  3     0x14200  pftm          pfpurge
 12238      0      0      0  3     0x14200  bored         sensors
 40703      0      0      0  3     0x14200  usbtsk        usbtask
 62918      0      0      0  3     0x14200  usbatsk       usbatsk
  4735      0      0      0  3  0x40014200  acpi0         acpi0
 95460      0      0      0  7  0x40014200                idle3
 79409      0      0      0  7  0x40014200                idle2
 66087      0      0      0  7  0x40014200                idle1
 82001      0      0      0  3     0x14200  bored         softnet
 20702      0      0      0  3     0x14200  bored         systqmp
 62808      0      0      0  3     0x14200  bored         systq
 18772      0      0      0  3  0x40014200                idle0
 46263      0      0      0  3     0x14200  bored         sbar
     1      0      1      0  3        0x82  wait          init
     0     -1      0      0  3     0x10200  scheduler     swapper

ddb{0}> show registers
rdi               0xffffffff818b6c10    bufqs_mtx
rsi                            0x282    mptramp_gdt32_desc+0x260
rbp               0xffff80002239dc70
rbx               0xffff800000163110
rdx               0x6b700f27d8cb8a7d
rcx               0xffffffff818cb240    cpu_info_primary
rax               0x6b700f27d8cb8a7d
r8                                 0
r9                                 0
r10               0xffff80002239da84
r11                                0
r12               0xffff800000163110
r13               0xffffffff818ca8a0    sd_cd
r14                                0
r15               0xffff800000163024
rip               0xffffffff8117f0d3    bufq_destroy+0x83
cs                               0x8
rflags                       0x10203    mptramp_longmode+0x15b
rsp               0xffff80002239dc50
ss                              0x10
bufq_destroy+0x83:      movq    0(%rdx),%rax

OpenBSD 6.0-stable (GENERIC.MP) #5: Wed Aug 24 04:47:51 UTC 2016
    
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 7979794432 (7610MB)
avail mem = 7733477376 (7375MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.8 @ 0xebe50 (48 entries)
bios0: vendor American Megatrends Inc. version "V10.2" date 12/24/2014
bios0: MSI MS-7865
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP APIC FPDT MCFG HPET SSDT SSDT CRAT SSDT
acpi0: wakeup devices SBAZ(S4) PS2K(S3) PS2M(S3) OHC1(S4) EHC1(S4)
OHC2(S4) EHC2(S4) OHC3(S4) EHC3(S4) XHC0(S4) BR11(S4) GPP2(S4)
PWRB(S3)
acpitimer0 at acpi0: 3579545 Hz, 32 bits
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: AMD Athlon(tm) 5350 APU with Radeon(tm) R3, 2046.44 MHz
cpu0: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu0: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16-way L2 cache
cpu0: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu0: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 99MHz
cpu0: mwait min=64, max=64, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: AMD Athlon(tm) 5350 APU with Radeon(tm) R3, 2046.16 MHz
cpu1: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu1: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16-way L2 cache
cpu1: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu1: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu1: smt 0, core 1, package 0
cpu2 at mainbus0: apid 2 (application processor)
cpu2: AMD Athlon(tm) 5350 APU with Radeon(tm) R3, 2046.17 MHz
cpu2: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu2: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16-way L2 cache
cpu2: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu2: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 3 (application processor)
cpu3: AMD Athlon(tm) 5350 APU with Radeon(tm) R3, 2046.17 MHz
cpu3: 
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,PAGE1GB,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,SKINIT,TOPEXT,ITSC,BMI1
cpu3: 32KB 64b/line 2-way I-cache, 32KB 64b/line 8-way D-cache, 2MB
64b/line 16-way L2 cache
cpu3: ITLB 32 4KB entries fully associative, 8 4MB entries fully associative
cpu3: DTLB 40 4KB entries fully associative, 8 4MB entries fully associative
cpu3: smt 0, core 3, package 0
ioapic0 at mainbus0: apid 5 pa 0xfec00000, version 21, 24 pins
ioapic1 at mainbus0: apid 6 pa 0xfec01000, version 21, 32 pins
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318180 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (GPP0)
acpiprt2 at acpi0: bus -1 (GPP3)
acpiprt3 at acpi0: bus 1 (BR11)
acpiprt4 at acpi0: bus -1 (GPP2)
acpicpu0 at acpi0: C2(0@400 io@0x414), C1(@1 halt!), PSS
acpicpu1 at acpi0: C2(0@400 io@0x414), C1(@1 halt!), PSS
acpicpu2 at acpi0: C2(0@400 io@0x414), C1(@1 halt!), PSS
acpicpu3 at acpi0: C2(0@400 io@0x414), C1(@1 halt!), PSS
"PNP0501" at acpi0 not configured
acpibtn0 at acpi0: PWRB
"pnp0c14" at acpi0 not configured
cpu0: 2046 MHz: speeds: 2050 1850 1650 1400 1200 1000 800 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "AMD AMD64 16h Host" rev 0x00
vga1 at pci0 dev 1 function 0 vendor "ATI", unknown product 0x9830 rev 0x00
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
azalia0 at pci0 dev 1 function 1 "ATI Radeon HD Audio" rev 0x00: msi
azalia0: no supported codecs
pchb1 at pci0 dev 2 function 0 vendor "AMD", unknown product 0x1538 rev 0x00
ppb0 at pci0 dev 2 function 1 "AMD AMD64 16h PCIE" rev 0x00: msi
pci1 at ppb0 bus 1
em0 at pci1 dev 0 function 0 "Intel 82574L" rev 0x00: msi, address
68:05:ca:24:f3:3e
xhci0 at pci0 dev 16 function 0 "AMD Bolton xHCI" rev 0x01: msi
usb0 at xhci0: USB revision 3.0
uhub0 at usb0 "AMD xHCI root hub" rev 3.00/1.00 addr 1
ahci0 at pci0 dev 17 function 0 "AMD Hudson-2 SATA" rev 0x40: msi, AHCI 1.3
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 3.0Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, Hitachi HDS72202, JKAO> SCSI3
0/direct fixed naa.5000cca221f7a107
sd0: 1907729MB, 512 bytes/sector, 3907029168 sectors
sd1 at scsibus1 targ 1 lun 0: <ATA, Hitachi HDS72202, JKAO> SCSI3
0/direct fixed naa.5000cca221f2c7aa
sd1: 1907729MB, 512 bytes/sector, 3907029168 sectors
ohci0 at pci0 dev 18 function 0 "AMD Hudson-2 USB" rev 0x39: apic 5
int 18, version 1.0, legacy support
ehci0 at pci0 dev 18 function 2 "AMD Hudson-2 USB2" rev 0x39: apic 5 int 17
usb1 at ehci0: USB revision 2.0
uhub1 at usb1 "AMD EHCI root hub" rev 2.00/1.00 addr 1
ohci1 at pci0 dev 19 function 0 "AMD Hudson-2 USB" rev 0x39: apic 5
int 18, version 1.0, legacy support
ehci1 at pci0 dev 19 function 2 "AMD Hudson-2 USB2" rev 0x39: apic 5 int 17
usb2 at ehci1: USB revision 2.0
uhub2 at usb2 "AMD EHCI root hub" rev 2.00/1.00 addr 1
piixpm0 at pci0 dev 20 function 0 "AMD Hudson-2 SMBus" rev 0x3a: polling
iic0 at piixpm0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-12800
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-12800
pcib0 at pci0 dev 20 function 3 "AMD Hudson-2 LPC" rev 0x11
pchb2 at pci0 dev 24 function 0 "AMD AMD64 16h Link Cfg" rev 0x00
pchb3 at pci0 dev 24 function 1 "AMD AMD64 16h Address Map" rev 0x00
pchb4 at pci0 dev 24 function 2 "AMD AMD64 16h DRAM Cfg" rev 0x00
km0 at pci0 dev 24 function 3 "AMD AMD64 16h Misc Cfg" rev 0x00
pchb5 at pci0 dev 24 function 4 "AMD AMD64 16h CPU Power" rev 0x00
pchb6 at pci0 dev 24 function 5 vendor "AMD", unknown product 0x1535 rev 0x00
usb3 at ohci0: USB revision 1.0
uhub3 at usb3 "AMD OHCI root hub" rev 1.00/1.00 addr 1
usb4 at ohci1: USB revision 1.0
uhub4 at usb4 "AMD OHCI root hub" rev 1.00/1.00 addr 1
isa0 at pcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
umass0 at uhub2 port 1 configuration 1 interface 0 "UFD 3.0
Silicon-Power32G" rev 2.10/1.00 addr 2
umass0: using SCSI over Bulk-Only
scsibus2 at umass0: 2 targets, initiator 0
sd2 at scsibus2 targ 1 lun 0: <UFD 3.0, Silicon-Power32G, PMAP> SCSI4
0/direct removable serial.13fe55005AEAA5C6E818
sd2: 29840MB, 512 bytes/sector, 61112320 sectors
vscsi0 at root
scsibus3 at vscsi0: 256 targets
softraid0 at root
scsibus4 at softraid0: 256 targets
sd3 at scsibus4 targ 1 lun 0: <OPENBSD, SR RAID 1, 006> SCSI2 0/direct fixed
sd3: 1907724MB, 512 bytes/sector, 3907020272 sectors
root on sd2d (1577b13c81712964.d) swap on sd2b dump on sd2b

# disklabel -p m sd0
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: Hitachi HDS72202
duid: 15582013473c3ba0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 243201
total sectors: 3907029168 # total bytes: 1907729.1M
boundstart: 0
boundend: 3907029168
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:       1907729.1M                0  unused
  d:       1907725.0M             8192    RAID

# disklabel -p m sd1
# /dev/rsd1c:
type: SCSI
disk: SCSI disk
label: Hitachi HDS72202
duid: 0ba5eaeb66b64f1b
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 243201
total sectors: 3907029168 # total bytes: 1907729.1M
boundstart: 0
boundend: 3907029168
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:       1907729.1M                0  unused
  d:       1907725.0M             8192    RAID

# disklabel -p m sd3
# /dev/rsd3c:
type: SCSI
disk: SCSI disk
label: SR RAID 1
duid: 3a0769a9f5346e72
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 243200
total sectors: 3907020272 # total bytes: 1907724.7M
boundstart: 0
boundend: 3907020272
drivedata: 0

16 partitions:
#                size           offset  fstype [fsize bsize  cpg]
  c:       1907724.7M                0  unused
  d:         20480.0M             8192  4.2BSD   2048 16384    1 # /softdep
  e:         20480.0M         41951232  4.2BSD   2048 16384    1 #
/var/www/htdocs/pubroot
  f:        953862.0M         83894272  4.2BSD   8192 65536    1 # /space1
  g:        912898.0M       2037403648  4.2BSD   8192 65536    1 # /space2

# atactl sd0 readattr
Attributes table revision: 16
ID      Attribute name                  Threshold       Value   Raw
  1     Raw Read Error Rate               16            100     0x000000000000
  2     Throughput Performance            54            132     0x000000000069
  3     Spin Up Time                      24            117     0x000c025f0271
  4     Start/Stop Count                   0            100     0x00000000001b
  5     Reallocated Sector Count           5            100     0x000000000000
  7     Seek Error Rate                   67            100     0x000000000000
  8     Seek Time Performance             20            119     0x000000000024
  9     Power-On Hours Count               0             99     0x0000000021c5
 10     Spin Retry Count                  60            100     0x000000000000
 12     Device Power Cycle Count           0            100     0x00000000001b
192     Power-Off Retract Count            0            100     0x00000000003f
193     Load Cycle Count                   0            100     0x00000000003f
194     Temperature                        0            109     0x003f00190037
196     Reallocation Event Count           0            100     0x000000000000
197     Current Pending Sector Count       0            100     0x000000000000
198     Off-Line Scan Uncorrectable Sect   0            100     0x000000000000
199     Ultra DMA CRC Error Count          0            200     0x000000000000

# atactl sd1 readattr
Attributes table revision: 16
ID      Attribute name                  Threshold       Value   Raw
  1     Raw Read Error Rate               16            100     0x000000000000
  2     Throughput Performance            54            132     0x000000000069
  3     Spin Up Time                      24            119     0x000c02570266
  4     Start/Stop Count                   0            100     0x00000000001a
  5     Reallocated Sector Count           5            100     0x000000000000
  7     Seek Error Rate                   67            100     0x000000000000
  8     Seek Time Performance             20            119     0x000000000024
  9     Power-On Hours Count               0             99     0x00000000214b
 10     Spin Retry Count                  60            100     0x000000000000
 12     Device Power Cycle Count           0            100     0x00000000001a
192     Power-Off Retract Count            0            100     0x00000000003b
193     Load Cycle Count                   0            100     0x00000000003b
194     Temperature                        0            120     0x003800180032
196     Reallocation Event Count           0            100     0x000000000000
197     Current Pending Sector Count       0            100     0x000000000000
198     Off-Line Scan Uncorrectable Sect   0            100     0x000000000000
199     Ultra DMA CRC Error Count          0            200     0x000000000000

Reply via email to