>Synopsis: uvm_fault when plugging in disk with EFI GPT partition
>Category: system kernel amd64
>Environment:
System : OpenBSD 5.8
Details : OpenBSD 5.8-current (GENERIC.MP) #1376: Tue Sep 22
19:41:42 MDT 2015
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
Plugging a USB disk with (only) a EFI GPT partition triggers a
uvm_fault on #1371 (Sep 16) and #1376 (Sep 22), amd64. kernel messages
before fault, trace and ps included below.
The same disk can be plugged without any problem on another machine,
running #1035 / July 27's -current (i386). fdisk and disklabel taken
from that machine are also included below. If any information is needed
(e.g. disk's first few sectors) let me know.
>How-To-Repeat:
plug in the disk
>Fix:
messages before and after fault:
umass0 at uhub2 port 2 configuration 1 interface 0 "JMicron USB to ATA/ATAPI
Bridge" rev 2.00/1.00 addr 6
umass0: using SCSI over Bulk-Only
scsibus4 at umass0: 2 targets, initiator 0
sd2 at scsibus4 targ 1 lun 0: <WDC WD50, 00BEKT-00KA9T0, 1A01> SCSI2 0/direct
fixed serial.152d2338D57861A80601
sd2: 476940MB, 512 bytes/sector, 976773168 sectors
uvm_fault(0xffffffff818d2920, 0xffff800032db8000, 0, 1) -> e
kernel: page fault trap, code=0
Stopped at crc32+0x27: movzbl 0(%rsi),%edx
trace:
crc32() at crc32+0x27
gpt_chk_hdr() at gpt_chk_hdr+0x31
spoofgptlabel() at spoofgptlabel+0xec
readdoslabel() at readdoslabel+0x638
readdisklabel() at readdisklabel+0xc2
sdgetdisklabel() at sdgetdisklabel+0x1cd
sdopen() at sdopen+0x226
spec_open() at spec_open+0x213
VOP_OPEN() at VOP_OPEN+0x3f
disk_readlabel() at disk_readlabel+0xe0
disk_attach_callback() at disk_attach_callback+0x78
taskq_thread() at taskq_thread+0x6c
end trace frame: 0x0, count: -12
ps:
TID PPID PGRP UID S FLAGS WAIT COMMAND
14537 1 14537 0 3 0x83 ttyin getty
5720 1 5720 0 3 0x83 ttyin getty
13766 1 13766 0 3 0x83 ttyin getty
8847 1 8847 0 3 0x83 ttyin getty
70 1 70 0 3 0x83 ttyin ksh
15523 1 15523 0 3 0x88 poll cron
31372 1 31372 0 3 0 biowait hotplugd
11497 1 11497 0 3 0x80 nanosleep sensorsd
23412 1 23412 0 3 0x80 kqread apmd
13837 1 13837 99 3 0x90 poll sndiod
27449 1 27449 0 3 0x90 kqread inetd
23788 12178 12178 95 3 0x90 kqread smtpd
26142 12178 12178 95 3 0x90 kqread smtpd
10136 12178 12178 95 3 0x90 kqread smtpd
14019 12178 12178 95 3 0x90 kqread smtpd
10571 12178 12178 95 3 0x90 kqread smtpd
5125 12178 12178 103 3 0x90 kqread smtpd
12178 1 12178 0 3 0x80 kqread smtpd
2917 1 2917 0 3 0xb0 select lpd
11861 1 11861 0 3 0x80 kqread ifstated
14145 1 14145 0 3 0x80 select sshd
dmesg:
OpenBSD 5.8-current (GENERIC.MP) #1376: Tue Sep 22 19:41:42 MDT 2015
[email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
real mem = 8357658624 (7970MB)
avail mem = 8100405248 (7725MB)
mpath0 at root
scsibus0 at mpath0: 256 targets
mainbus0 at root
bios0 at mainbus0: SMBIOS rev. 2.6 @ 0xe0010 (78 entries)
bios0: vendor LENOVO version "6QET70WW (1.40 )" date 10/11/2012
bios0: LENOVO 3680WE9
acpi0 at bios0: rev 2
acpi0: sleep states S0 S3 S4 S5
acpi0: tables DSDT FACP SSDT ECDT APIC MCFG HPET ASF! BOOT SSDT TCPA DMAR SSDT
SSDT SSDT
acpi0: wakeup devices LID_(S3) SLPB(S3) IGBE(S4) EXP1(S4) EXP2(S4) EXP3(S4)
EXP4(S4) EXP5(S4) EHC1(S3) EHC2(S3) HDEF(S4)
acpitimer0 at acpi0: 3579545 Hz, 24 bits
acpiec0 at acpi0
acpimadt0 at acpi0 addr 0xfee00000: PC-AT compat
cpu0 at mainbus0: apid 0 (boot processor)
cpu0: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2660.40 MHz
cpu0:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu0: 256KB 64b/line 8-way L2 cache
cpu0: smt 0, core 0, package 0
mtrr: Pentium Pro MTRR support, 8 var ranges, 88 fixed ranges
cpu0: apic clock running at 132MHz
cpu0: mwait min=64, max=64, C-substates=0.2.1.1, IBE
cpu1 at mainbus0: apid 1 (application processor)
cpu1: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2660.00 MHz
cpu1:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu1: 256KB 64b/line 8-way L2 cache
cpu1: smt 1, core 0, package 0
cpu2 at mainbus0: apid 4 (application processor)
cpu2: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2660.00 MHz
cpu2:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu2: 256KB 64b/line 8-way L2 cache
cpu2: smt 0, core 2, package 0
cpu3 at mainbus0: apid 5 (application processor)
cpu3: Intel(R) Core(TM) i5 CPU M 520 @ 2.40GHz, 2660.00 MHz
cpu3:
FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE,SSE3,PCLMUL,DTES64,MWAIT,DS-CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,SSE4.1,SSE4.2,POPCNT,AES,NXE,LONG,LAHF,PERF,ITSC,SENSOR,ARAT
cpu3: 256KB 64b/line 8-way L2 cache
cpu3: smt 1, core 2, package 0
ioapic0 at mainbus0: apid 1 pa 0xfec00000, version 20, 24 pins
ioapic0: misconfigured as apic 2, remapped to apid 1
acpimcfg0 at acpi0 addr 0xe0000000, bus 0-255
acpihpet0 at acpi0: 14318179 Hz
acpiprt0 at acpi0: bus 0 (PCI0)
acpiprt1 at acpi0: bus -1 (PEG_)
acpiprt2 at acpi0: bus 13 (EXP1)
acpiprt3 at acpi0: bus -1 (EXP2)
acpiprt4 at acpi0: bus -1 (EXP3)
acpiprt5 at acpi0: bus -1 (EXP4)
acpiprt6 at acpi0: bus 2 (EXP5)
acpicpu0 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS
acpicpu1 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS
acpicpu2 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS
acpicpu3 at acpi0: C3(350@245 mwait.3@0x20), C2(500@205 mwait.3@0x10),
C1(1000@3 mwait.1), PSS
acpipwrres0 at acpi0: PUBS, resource for EHC1, EHC2
acpitz0 at acpi0: critical temperature is 100 degC
acpibtn0 at acpi0: LID_
acpibtn1 at acpi0: SLPB
acpibat0 at acpi0: BAT0 model "42T4694" serial 545 type LION oem "SANYO"
acpibat1 at acpi0: BAT1 not present
acpiac0 at acpi0: AC unit online
acpithinkpad0 at acpi0
acpidock0 at acpi0: GDCK docked (15)
cpu0: Enhanced SpeedStep 2660 MHz: speeds: 2400, 2399, 2266, 2133, 1999, 1866,
1733, 1599, 1466, 1333, 1199 MHz
pci0 at mainbus0 bus 0
pchb0 at pci0 dev 0 function 0 "Intel Core Host" rev 0x02
vga1 at pci0 dev 2 function 0 "Intel HD Graphics" rev 0x02
intagp0 at vga1
agp0 at intagp0: aperture at 0xd0000000, size 0x10000000
inteldrm0 at vga1
drm0 at inteldrm0
inteldrm0: 1280x800
wsdisplay0 at vga1 mux 1: console (std, vt100 emulation)
wsdisplay0: screen 1-5 added (std, vt100 emulation)
"Intel 3400 MEI" rev 0x06 at pci0 dev 22 function 0 not configured
em0 at pci0 dev 25 function 0 "Intel 82577LM" rev 0x06: msi, address
xx:xx:xx:xx:xx:xx
ehci0 at pci0 dev 26 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 23
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "Intel EHCI root hub" rev 2.00/1.00 addr 1
azalia0 at pci0 dev 27 function 0 "Intel 3400 HD Audio" rev 0x06: msi
azalia0: codecs: Conexant/0x5069, Intel/0x2804, using Conexant/0x5069
audio0 at azalia0
ppb0 at pci0 dev 28 function 0 "Intel 3400 PCIE" rev 0x06: msi
pci1 at ppb0 bus 13
ppb1 at pci0 dev 28 function 4 "Intel 3400 PCIE" rev 0x06: msi
pci2 at ppb1 bus 2
iwn0 at pci2 dev 0 function 0 "Intel Centrino Advanced-N 6200" rev 0x35: msi,
MIMO 2T2R, MoW, address xx:xx:xx:xx:xx:xx
ehci1 at pci0 dev 29 function 0 "Intel 3400 USB" rev 0x06: apic 1 int 19
usb1 at ehci1: USB revision 2.0
uhub1 at usb1 "Intel EHCI root hub" rev 2.00/1.00 addr 1
ppb2 at pci0 dev 30 function 0 "Intel 82801BAM Hub-to-PCI" rev 0xa6
pci3 at ppb2 bus 14
pcib0 at pci0 dev 31 function 0 "Intel QM57 LPC" rev 0x06
ahci0 at pci0 dev 31 function 2 "Intel 3400 AHCI" rev 0x06: msi, AHCI 1.3
ahci0: port 0: 3.0Gb/s
ahci0: port 1: 1.5Gb/s
scsibus1 at ahci0: 32 targets
sd0 at scsibus1 targ 0 lun 0: <ATA, HITACHI HTS72503, PC3Z> SCSI3 0/direct
fixed naa.5000cca645c68684
sd0: 305245MB, 512 bytes/sector, 625142448 sectors
cd0 at scsibus1 targ 1 lun 0: <HL-DT-ST, DVDRAM GU10N, MX05> ATAPI 5/cdrom
removable
ichiic0 at pci0 dev 31 function 3 "Intel 3400 SMBus" rev 0x06: apic 1 int 23
iic0 at ichiic0
spdmem0 at iic0 addr 0x50: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
spdmem1 at iic0 addr 0x51: 4GB DDR3 SDRAM PC3-10600 SO-DIMM
itherm0 at pci0 dev 31 function 6 "Intel 3400 Thermal" rev 0x06
isa0 at pcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5 irq 1 irq 12
pckbd0 at pckbc0 (kbd slot)
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pms0 at pckbc0 (aux slot)
wsmouse0 at pms0 mux 0
wsmouse1 at pms0 mux 0
pms0: Synaptics touchpad, firmware 7.4
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
aps0 at isa0 port 0x1600/31
pci4 at mainbus0 bus 255
pchb1 at pci4 dev 0 function 0 "Intel QuickPath" rev 0x02
pchb2 at pci4 dev 0 function 1 "Intel QuickPath" rev 0x02
pchb3 at pci4 dev 2 function 0 "Intel QPI Link" rev 0x02
pchb4 at pci4 dev 2 function 1 "Intel QPI Physical" rev 0x02
pchb5 at pci4 dev 2 function 2 "Intel Reserved" rev 0x02
pchb6 at pci4 dev 2 function 3 "Intel Reserved" rev 0x02
uhub2 at uhub0 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
uhub3 at uhub2 port 5 "Lenovo product 0x1005" rev 2.00/0.01 addr 3
uhub4 at uhub3 port 2 "NEC hub" rev 2.00/1.00 addr 4
uhub5 at uhub4 port 4 "NEC hub" rev 2.00/1.00 addr 5
uhub6 at uhub1 port 1 "Intel Rate Matching Hub" rev 2.00/0.00 addr 2
vscsi0 at root
scsibus2 at vscsi0: 256 targets
softraid0 at root
scsibus3 at softraid0: 256 targets
softraid0: sd1 was not shutdown properly
sd1 at scsibus3 targ 1 lun 0: <OPENBSD, SR CRYPTO, 005> SCSI2 0/direct fixed
sd1: 305242MB, 512 bytes/sector, 625135808 sectors
root on sd1a (40b8b4a2a7e90f03.a) swap on sd1b dump on sd1b
WARNING: / was not properly unmounted
usbdevs:
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 addr 2: high speed, self powered, config 1, Rate Matching Hub(0x0020),
Intel(0x8087), rev 0.00
port 1 powered
port 2 powered
port 3 powered
port 4 powered
port 5 addr 3: high speed, self powered, config 1, product 0x1005(0x1005),
Lenovo(0x17ef), rev 0.01
port 1 powered
port 2 addr 4: high speed, self powered, config 1, hub(0x005a), NEC(0x0409),
rev 1.00
port 1 powered
port 2 powered
port 3 powered
port 4 addr 5: high speed, self powered, config 1, hub(0x005a),
NEC(0x0409), rev 1.00
port 1 powered
port 2 powered
port 3 powered
port 4 powered
port 3 powered
port 4 powered
port 6 powered
port 2 powered
port 3 powered
Controller /dev/usb1:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000),
Intel(0x8086), rev 1.00
port 1 addr 2: high speed, self powered, config 1, Rate Matching Hub(0x0020),
Intel(0x8087), rev 0.00
port 1 powered
port 2 powered
port 3 powered
port 4 powered
port 5 powered
port 6 powered
port 7 powered
port 8 powered
port 2 powered
port 3 powered
fdisk (on another machine):
Disk: sd0 geometry: 60801/255/63 [976773168 Sectors]
Offset: 0 Signature: 0xAA55
Starting Ending LBA Info:
#: id C H S - C H S [ start: size ]
-------------------------------------------------------------------------------
0: EE 0 0 2 - 60801 80 63 [ 1: 976773167 ] EFI GPT
1: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
2: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
3: 00 0 0 0 - 0 0 0 [ 0: 0 ] unused
disklabel (on another machine):
# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: 00BEKT-00KA9T0
duid: b8caeead30180ed5
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 255
sectors/cylinder: 16065
cylinders: 60801
total sectors: 976773168
boundstart: 0
boundend: 976773168
drivedata: 0
16 partitions:
# size offset fstype [fsize bsize cpg]
a: 976773120 0 4.2BSD 4096 32768 1
c: 976773168 0 unused