7.2-STABLE: Inserting USB device causes Fatal Trap 12

Norbert Papke fbsd-ml at scrapper.ca
Sun May 10 19:46:26 UTC 2009


Inserting a USB thumb drive into a running sytem result in a "Fatal trap 12: 
page fault while in kernel mode".  

Unfortunately, I was not able to save a core (not entirely sure why, I'll 
investigate separately).  I have manually copied the backtrace:

usb_transfer_complete
bus_dmamap_load
usbd_transfer
usbd_do_request_flags_pipe
usbd_do_request_flags
usbd_get_string_desc
usbd_get_string
usbd_devinfo_vp
usbd_devinfo
usbd_new_device
uhub_explore
usb_event_thread
fork_exit
for_trampine

The problem is repeatable.  It only happens when I insert the thumb drive into 
a running system.  If I boot with the thumb drive present, everything is 
fine.

Any help is greatly appreciated.

Cheers,

-- Norbert Papke.

=================================================

# uname -a
FreeBSD proven.lan 7.2-STABLE FreeBSD 7.2-STABLE #0 r191841: Tue May  5 
21:13:21 PDT 2009     
npapke at proven.lan:/usr/obj/red/public/freebsd/sources/stable/sys/PROVEN  
amd64

=================================================

Kernel config:

include GENERIC
ident PROVEN

options KDB             # kernel debugger (just in case)
options KDB_TRACE
options DDB             # kernel debugger (just in case)
options WITNESS
options WITNESS_SKIPSPIN

options IPSEC
device  crypto
device  stf             # for IPv6 tunneling

# keep kernel messages from different cpus separate
options PRINTF_BUFR_SIZE=64

option  SC_HISTORY_SIZE=2000
options SC_NORM_ATTR=(FG_GREEN|BG_BLACK)
options SC_NORM_REV_ATTR=(FG_YELLOW|BG_GREEN)
options SC_KERNEL_CONS_ATTR=(FG_LIGHTRED|BG_BLACK)
options SC_KERNEL_CONS_REV_ATTR=(FG_BLACK|BG_RED)

# Alternate Queuing of network packets
options ALTQ
options ALTQ_CBQ                # Class Bases Queuing (CBQ)
options ALTQ_RED                # Random Early Detection (RED)
options ALTQ_RIO                # RED In/Out
options ALTQ_HFSC               # Hierarchical Packet Scheduler (HFSC)
options ALTQ_PRIQ               # Priority Queuing (PRIQ)
options ALTQ_NOPCC              # Required for SMP build

# load as module for debugging
nodevice        re              # RealTek 8139C+/8169/8169S/8110S

=================================================

Copyright (c) 1992-2009 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
        The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 7.2-STABLE #0 r191841: Tue May  5 21:13:21 PDT 2009
    npapke at proven.lan:/usr/obj/red/public/freebsd/sources/stable/sys/PROVEN
WARNING: WITNESS option enabled, expect reduced performance.
Timecounter "i8254" frequency 1193182 Hz quality 0
CPU: Intel(R) Core(TM)2 Duo CPU     E8500  @ 3.16GHz (3155.59-MHz K8-class 
CPU)
  Origin = "GenuineIntel"  Id = 0x1067a  Stepping = 10
  
Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  
Features2=0x408e3fd<SSE3,RSVD2,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,CX16,xTPR,PDCM,<b19>,XSAVE>
  AMD Features=0x20100800<SYSCALL,NX,LM>
  AMD Features2=0x1<LAHF>
  Cores per package: 2
usable memory = 4279189504 (4080 MB)
avail memory  = 4097724416 (3907 MB)
ACPI APIC Table: <100808 APIC1053>
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0 <Version 2.0> irqs 0-23 on motherboard
kbd1 at kbdmux0
cryptosoft0: <software crypto> on motherboard
acpi0: <100808 XSDT1053> on motherboard
acpi0: [ITHREAD]
acpi0: Power Button (fixed)
acpi0: reservation of ffc00000, 300000 (3) failed
acpi0: reservation of fee00000, 1000 (3) failed
acpi0: reservation of 0, a0000 (3) failed
acpi0: reservation of 100000, bff00000 (3) failed
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x808-0x80b on acpi0
acpi_hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 900
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0xc000-0xc0ff mem 
0xd0000000-0xdfffffff,0xfe9f0000-0xfe9fffff irq 16 at device 0.0 on pci1
drm0: <ATI ATI Radeon HD 3600 XT> on vgapci0
info: [drm] MSI enabled 1 message(s)
vgapci0: child drm0 requested pci_enable_busmaster
info: [drm] Initialized radeon 1.29.0 20080528
hdac0: <ATI RV635 High Definition Audio Controller> mem 0xfe9ec000-0xfe9effff 
irq 17 at device 0.1 on pci1
hdac0: HDA Driver Revision: 20090329_0131
hdac0: [ITHREAD]
uhci0: <UHCI (generic) USB controller> port 0xbc00-0xbc1f irq 16 at device 
26.0 on pci0
uhci0: [GIANT-LOCKED]
uhci0: [ITHREAD]
usb0: <UHCI (generic) USB controller> on uhci0
usb0: USB revision 1.0
uhub0: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb0
uhub0: 2 ports with 2 removable, self powered
uhci1: <UHCI (generic) USB controller> port 0xb880-0xb89f irq 21 at device 
26.1 on pci0
uhci1: [GIANT-LOCKED]
uhci1: [ITHREAD]
usb1: <UHCI (generic) USB controller> on uhci1
usb1: USB revision 1.0
uhub1: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb1
uhub1: 2 ports with 2 removable, self powered
uhci2: <UHCI (generic) USB controller> port 0xb800-0xb81f irq 19 at device 
26.2 on pci0
uhci2: [GIANT-LOCKED]
uhci2: [ITHREAD]
usb2: <UHCI (generic) USB controller> on uhci2
usb2: USB revision 1.0
uhub2: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb2
uhub2: 2 ports with 2 removable, self powered
ehci0: <EHCI (generic) USB 2.0 controller> mem 0xfe8fe000-0xfe8fe3ff irq 18 at 
device 26.7 on pci0
ehci0: [GIANT-LOCKED]
ehci0: [ITHREAD]
usb3: EHCI version 1.0
usb3: companion controllers, 2 ports each: usb0 usb1 usb2
usb3: <EHCI (generic) USB 2.0 controller> on ehci0
usb3: USB revision 2.0
uhub3: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb3
uhub3: 6 ports with 6 removable, self powered
hdac1: <Intel 82801J High Definition Audio Controller> mem 
0xfe8f8000-0xfe8fbfff irq 22 at device 27.0 on pci0
hdac1: HDA Driver Revision: 20090329_0131
hdac1: [ITHREAD]
pcib2: <ACPI PCI-PCI bridge> irq 17 at device 28.0 on pci0
pci2: <ACPI PCI bus> on pcib2
pcib3: <ACPI PCI-PCI bridge> irq 16 at device 28.5 on pci0
pci3: <ACPI PCI bus> on pcib3
re0: <RealTek 8168/8168B/8168C/8168CP/8168D/8111B/8111C/8111CP PCIe Gigabit 
Ethernet> port 0xd800-0xd8ff mem 0xfeaff000-0xfeafffff,0xfdff0000-0xfdffffff 
irq 17 at device 0.0 on pci3
re0: Chip rev. 0x3c000000
re0: MAC rev. 0x00400000
miibus0: <MII bus> on re0
rgephy0: <RTL8169S/8110S/8211B media interface> PHY 1 on miibus0
rgephy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 
1000baseT-FDX, auto
re0: Ethernet address: 00:30:48:b0:6a:1f
re0: [FILTER]
uhci3: <UHCI (generic) USB controller> port 0xb480-0xb49f irq 23 at device 
29.0 on pci0
uhci3: [GIANT-LOCKED]
uhci3: [ITHREAD]
usb4: <UHCI (generic) USB controller> on uhci3
usb4: USB revision 1.0
uhub4: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb4
uhub4: 2 ports with 2 removable, self powered
uhci4: <UHCI (generic) USB controller> port 0xb400-0xb41f irq 19 at device 
29.1 on pci0
uhci4: [GIANT-LOCKED]
uhci4: [ITHREAD]
usb5: <UHCI (generic) USB controller> on uhci4
usb5: USB revision 1.0
uhub5: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb5
uhub5: 2 ports with 2 removable, self powered
uhci5: <UHCI (generic) USB controller> port 0xb080-0xb09f irq 18 at device 
29.2 on pci0
uhci5: [GIANT-LOCKED]
uhci5: [ITHREAD]
usb6: <UHCI (generic) USB controller> on uhci5
usb6: USB revision 1.0
uhub6: <Intel UHCI root hub, class 9/0, rev 1.00/1.00, addr 1> on usb6
uhub6: 2 ports with 2 removable, self powered
ehci1: <EHCI (generic) USB 2.0 controller> mem 0xfe8fc000-0xfe8fc3ff irq 23 at 
device 29.7 on pci0
ehci1: [GIANT-LOCKED]
ehci1: [ITHREAD]
usb7: EHCI version 1.0
usb7: companion controllers, 2 ports each: usb4 usb5 usb6
usb7: <EHCI (generic) USB 2.0 controller> on ehci1
usb7: USB revision 2.0
uhub7: <Intel EHCI root hub, class 9/0, rev 2.00/1.00, addr 1> on usb7
uhub7: 6 ports with 6 removable, self powered
umass0: <JetFlash Mass Storage Device, class 0/0, rev 2.00/1.00, addr 2> on 
uhub7
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci4: <ACPI PCI bus> on pcib4
dc0: <ADMtek AN985 10/100BaseTX> port 0xe800-0xe8ff mem 0xfebffc00-0xfebfffff 
irq 21 at device 1.0 on pci4
miibus1: <MII bus> on dc0
acphy0: <ACXXX 10/100 media interface> PHY 1 on miibus1
acphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
dc0: Ethernet address: 00:20:78:10:3e:98
dc0: [ITHREAD]
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH10 SATA300 controller> port 
0xb000-0xb007,0xac00-0xac03,0xa880-0xa887,0xa800-0xa803,0xa480-0xa48f,0xa400-0xa40f 
irq 19 at device 31.2 on pci0
atapci0: [ITHREAD]
ata2: <ATA channel 0> on atapci0
ata2: [ITHREAD]
ata3: <ATA channel 1> on atapci0
ata3: [ITHREAD]
ichsmb0: <SMBus controller> port 0x400-0x41f mem 0xfe8f7c00-0xfe8f7cff irq 18 
at device 31.3 on pci0
ichsmb0: [GIANT-LOCKED]
ichsmb0: [ITHREAD]
smbus0: <System Management Bus> on ichsmb0
smb0: <SMBus generic I/O> on smbus0
atapci1: <Intel ICH10 SATA300 controller> port 
0xa000-0xa007,0x9c00-0x9c03,0x9880-0x9887,0x9800-0x9803,0x9480-0x948f,0x9400-0x940f 
irq 19 at device 31.5 on pci0
atapci1: [ITHREAD]
ata4: <ATA channel 0> on atapci1
ata4: [ITHREAD]
ata5: <ATA channel 1> on atapci1
ata5: [ITHREAD]
acpi_button0: <Power Button> on acpi0
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: configured irq 4 not in bitmap of probed irqs 0
sio0: port may not be enabled
sio0: <16550A-compatible COM port> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
sio0: type 16550A
sio0: [FILTER]
ppc0: <Parallel port> port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (NIBBLE-only) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
ppbus0: [ITHREAD]
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
plip0: <PLIP network interface> on ppbus0
plip0: WARNING: using obsoleted IFF_NEEDSGIANT flag
ppc0: [GIANT-LOCKED]
ppc0: [ITHREAD]
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbd0: [ITHREAD]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: [ITHREAD]
psm0: model IntelliMouse, device ID 3
cpu0: <ACPI CPU> on acpi0
ACPI Warning (tbutils-0243): Incorrect checksum in table [OEMB] -  45, should 
be 40 [20070320]
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
cpu1: <ACPI CPU> on acpi0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
est: CPU supports Enhanced Speedstep, but is not recognized.
est: cpu_vendor GenuineIntel, msr 616492206004922
device_attach: est1 attach returned 6
p4tcc1: <CPU Frequency Thermal Control> on cpu1
orm0: <ISA Option ROM> at iomem 0xc0000-0xcffff on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
sio1: configured irq 3 not in bitmap of probed irqs 0
sio1: port may not be enabled
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 1.000 msec
IPsec: Initialized Security Association Processing.
ad4: 239372MB <Maxtor 7Y250M0 YAR51HW0> at ata2-master SATA150
ad7: 305245MB <Seagate ST3320620AS 3.AAK> at ata3-slave SATA300
ad8: 610480MB <WDC WD6401AALS-00L3B2 01.03B01> at ata4-master SATA300
GEOM_LABEL: Label for provider ad4s1a is ufsid/497cecd46b0e22e5.
acd0: DVDR <HL-DT-STDVD-RAM GH22NS30/1.01> at ata5-master SATA150
hdac0: HDA Codec #0: ATI R6xx HDMI
pcm0: <HDA ATI R6xx HDMI PCM #0 Digital> at cad 0 nid 1 on hdac0
hdac1: HDA Codec #2: Realtek ALC888
hdac1: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac1: hdac_command_send_internal: TIMEOUT numcmd=1, sent=1, received=0
hdac1: Codec #3 is not responding! Probing aborted.
pcm1: <HDA Realtek ALC888 PCM #0 Analog> at cad 2 nid 1 on hdac1
pcm2: <HDA Realtek ALC888 PCM #1 Analog> at cad 2 nid 1 on hdac1
pcm3: <HDA Realtek ALC888 PCM #2 Digital> at cad 2 nid 1 on hdac1
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
(probe1:umass-sim0:0:0:0): TEST UNIT READY. CDB: 0 0 0 0 0 0
(probe1:umass-sim0:0:0:0): CAM Status: SCSI Status Error
(probe1:umass-sim0:0:0:0): SCSI Status: Check Condition
(probe1:umass-sim0:0:0:0): UNIT ATTENTION asc:28,0
(probe1:umass-sim0:0:0:0): Not ready to ready change, medium may have changed
(probe1:umass-sim0:0:0:0): Retrying Command (per Sense Data)
acd0: FAILURE - INQUIRY ILLEGAL REQUEST asc=0x24 ascq=0x00
SMP: AP CPU #1 Launched!
WARNING: WITNESS option enabled, expect reduced performance.
da0 at umass-sim0 bus 0 target 0 lun 0
da0: <JetFlash Transcend 4GB 8.07> Removable Direct Access SCSI-2 device
da0: 40.000MB/s transfers
da0: 3830MB (7843840 512 byte sectors: 255H 63S/T 488C)
cd0 at ata3 bus 0 target 0 lun 0
cd0: <HL-DT-ST DVD-RAM GH22NS30 1.01> Removable CD-ROM SCSI-0 device
cd0: 3.300MB/s transfers
cd0: cd present [4098336 x 2048 byte records]
GEOM_LABEL: Label for provider acd0 is iso9660/THE_MATRIX_16X9LB_N_AMERICA.
Trying to mount root from ufs:/dev/ad4s1a
WARNING: / was not properly dismounted
WARNING: reducing size to maximum of 67108864 blocks per swap unit
GEOM_LABEL: Label ufsid/497cecd46b0e22e5 removed.
GEOM_LABEL: Label for provider ad4s1a is ufsid/497cecd46b0e22e5.
GEOM_LABEL: Label ufsid/497cecd46b0e22e5 removed.
This module (opensolaris) contains code covered by the
Common Development and Distribution License (CDDL)
see http://opensolaris.org/os/licensing/opensolaris_license/
WARNING: ZFS is considered to be an experimental feature in FreeBSD.
ZFS filesystem version 6
ZFS storage pool version 6
lock order reversal:
 1st 0xffffffff80e49de0 pf task mtx (pf task mtx) 
@ /red/public/freebsd/sources/stable/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:1394
 2nd 0xffffffff80ba94c0 ifnet (ifnet) 
@ /red/public/freebsd/sources/stable/sys/net/if.c:1623
KDB: stack backtrace:
db_trace_self_wrapper() at db_trace_self_wrapper+0x2a
witness_checkorder() at witness_checkorder+0x543
_mtx_lock_flags() at _mtx_lock_flags+0x1f
ifunit() at ifunit+0x24
pfioctl() at pfioctl+0x2531
devfs_ioctl_f() at devfs_ioctl_f+0x71
kern_ioctl() at kern_ioctl+0x91
ioctl() at ioctl+0xeb
syscall() at syscall+0x1a5
Xfast_syscall() at Xfast_syscall+0xab
--- syscall (54, FreeBSD ELF64, ioctl), rip = 0x80096296c, rsp = 
0x7fffffffdc18, rbp = 0x7fffffffdca0 ---
kqemu version 0x00010400
kqemu: KQEMU installed, max_locked_mem=2089448kB.
acd0: FAILURE - READ_BIG timed out
acd0: FAILURE - READ_BIG timed out
acd0: FAILURE - READ_BIG timed out
info: [drm] Setting GART location based on new memory map
info: [drm] Loading RV635 CP Microcode
info: [drm] Loading RV635 PFP Microcode
info: [drm] Resetting GPU
info: [drm] writeback test succeeded in 1 usecs
drm0: [ITHREAD]
acd0: FAILURE - READ_BIG timed out
acd0: FAILURE - READ_BIG timed out
(cd0:ata3:0:0:0): cddone: got error 0x5 back
tap0: Ethernet address: 00:bd:d8:9b:04:00
bridge0: Ethernet address: fa:cc:68:2e:a4:8e
tap0: promiscuous mode enabled
dc0: promiscuous mode enabled



More information about the freebsd-stable mailing list