Instant panic CAM or USB subsystem

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Sat, 25 Jan 2014 09:21:06 -0800
If I plug my Samsung Intensity II cellphone into a usb port,
I get an instant panic.  This is 100% reproducible.  I have
the core and kernel for further debugging.  Dmesg.boot follows
my sig.

% kgdb /boot/kernel/kernel /vmcore.0

Unread portion of the kernel message buffer:
cd1 at umass-sim1 bus 1 scbus4 target 0 lun 0
cd1: <SAMSUNG CD-ROM 1.00> Removable CD-ROM SCSI-2 device 
cd1: Serial Number 000000000002
cd1: 1.000MB/s transfers
cd1: cd present [3840000 x 512 byte records]
cd1: quirks=0x10<10_BYTE_ONLY>
panic: mutex CAM device lock not owned at /usr/src/sys/cam/cam_periph.c:301
cpuid = 0
KDB: enter: panic

(kgdb) bt
#0  doadump (textdump=0) at pcpu.h:233
#1  0xc04cf211 in db_dump (dummy=-1065835907, dummy2=0, dummy3=-1, dummy4=0xe2af25e4 "")
    at /usr/src/sys/ddb/db_command.c:543
#2  0xc04cecd7 in db_command (cmd_table=<value optimized out>) at /usr/src/sys/ddb/db_command.c:449
#3  0xc04cea10 in db_command_loop () at /usr/src/sys/ddb/db_command.c:502
#4  0xc04d12a2 in db_trap (type=<value optimized out>, code=-1056387128)
    at /usr/src/sys/ddb/db_main.c:231
#5  0xc078a9f8 in kdb_trap (type=<value optimized out>, code=<value optimized out>, 
    tf=<value optimized out>) at /usr/src/sys/kern/subr_kdb.c:656
#6  0xc0a112f2 in trap (frame=<value optimized out>) at /usr/src/sys/i386/i386/trap.c:711
#7  0xc09fa8cc in calltrap () at /usr/src/sys/i386/i386/exception.s:169
#8  0xc078a27d in kdb_enter (why=0xc0ad8ea3 "panic", msg=<value optimized out>) at cpufunc.h:71
#9  0xc07546c3 in vpanic (fmt=<value optimized out>, ap=<value optimized out>)
    at /usr/src/sys/kern/kern_shutdown.c:752
#10 0xc0754702 in panic (fmt=0xc0ad6b73 "mutex %s not owned at %s:%d")
    at /usr/src/sys/kern/kern_shutdown.c:688
#11 0xc07401d9 in __mtx_assert (c=0x35db, what=<value optimized out>, 
    file=0x12 <Address 0x12 out of bounds>, line=1309824) at /usr/src/sys/kern/kern_mutex.c:793
#12 0xc047333c in cam_periph_find (name=<value optimized out>) at /usr/src/sys/cam/cam_periph.c:301
#13 0xc0491062 in cdregister (periph=<value optimized out>, arg=0xc72ee22c)
    at /usr/src/sys/cam/scsi/scsi_cd.c:1007
#14 0xc047313c in cam_periph_alloc (name=<value optimized out>, path=0xc752d490, 
    ac_callback=<value optimized out>, code=<value optimized out>) at /usr/src/sys/cam/cam_periph.c:249
#15 0xc04907cc in cdasync (callback_arg=<value optimized out>, code=<value optimized out>, 
    arg=0xc78cd000) at /usr/src/sys/cam/scsi/scsi_cd.c:548
#16 0xc047d485 in xpt_async_process_dev (device=<value optimized out>, arg=0xc78cd800)
    at /usr/src/sys/cam/cam_xpt.c:4206
#17 0xc047b126 in xpt_async_process (periph=0x0, ccb=0xc78cd800) at /usr/src/sys/cam/cam_xpt.c:4171
#18 0xc047baf5 in xpt_done_process (ccb_h=0xc78cd800) at /usr/src/sys/cam/cam_xpt.c:5247
#19 0xc047ecf4 in xpt_done_td (arg=<value optimized out>) at /usr/src/sys/cam/cam_xpt.c:5274
#20 0xc07234df in fork_exit (callout=0xc047eb90 <xpt_done_td>) at /usr/src/sys/kern/kern_fork.c:977
#21 0xc09fa944 in fork_trampoline () at /usr/src/sys/i386/i386/exception.s:278
Current language:  auto; currently minimal
(kgdb) quit
laptop-kargl:root[202] exit
exit

Script done on Sat Jan 25 09:11:35 2014

-- 
Steve

Copyright (c) 1992-2014 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 11.0-CURRENT #1 r260692: Wed Jan 15 14:10:51 PST 2014
    kargl_at_laptop-kargl.apl.washington.edu:/dsk1/obj/usr/src/sys/MOBILE i386
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
CPU: Intel(R) Core(TM)2 Duo CPU     T7250  _at_ 2.00GHz (1995.04-MHz 686-class CPU)
  Origin="GenuineIntel"  Id=0x6fd  Family=0x6  Model=0xf  Stepping=13
  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=0xe3bd<SSE3,DTES64,MON,DS_CPL,VMX,EST,TM2,SSSE3,CX16,xTPR,PDCM>
  AMD Features=0x20000000<LM>
  AMD Features2=0x1<LAHF>
  TSC: P-state invariant, performance statistics
real memory  = 3221225472 (3072 MB)
avail memory = 3140329472 (2994 MB)
Event timer "LAPIC" quality 400
ACPI APIC Table: <DELL   M08    >
FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s)
 cpu0 (BSP): APIC ID:  0
 cpu1 (AP): APIC ID:  1
ioapic0: Changing APIC ID to 2
ioapic0 <Version 2.0> irqs 0-23 on motherboard
random: <Software, Yarrow> initialized
kbd1 at kbdmux0
acpi0: <DELL M08    > on motherboard
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 450
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
acpi0: reservation of 0, 9f000 (3) failed
acpi0: reservation of 100000, bf5c0400 (3) failed
cpu0: <ACPI CPU> on acpi0
cpu1: <ACPI CPU> on acpi0
atrtc0: <AT realtime clock> port 0x70-0x71,0x72-0x77 irq 8 on acpi0
Event timer "RTC" frequency 32768 Hz quality 0
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 2 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-safe" frequency 3579545 Hz quality 850
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
vgapci0: <VGA-compatible display> port 0xefe8-0xefef mem 0xfea00000-0xfeafffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
agp0: <Intel GM965 SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 7676k stolen memory
drm0: <Intel i965GM> on vgapci0
info: [drm] MSI enabled 1 message(s)
info: [drm] AGP at 0xe0000000 256MB
info: [drm] Initialized i915 1.6.0 20080730
vgapci0: Boot video device
vgapci1: <VGA-compatible display> mem 0xfeb00000-0xfebfffff at device 2.1 on pci0
uhci0: <Intel 82801H (ICH8) USB controller USB-D> port 0x6f20-0x6f3f irq 20 at device 26.0 on pci0
usbus0 on uhci0
uhci1: <Intel 82801H (ICH8) USB controller USB-E> port 0x6f00-0x6f1f irq 21 at device 26.1 on pci0
usbus1 on uhci1
ehci0: <Intel 82801H (ICH8) USB 2.0 controller USB2-B> mem 0xfed1c400-0xfed1c7ff irq 22 at device 26.7 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci0
hdac0: <Intel 82801H HDA Controller> mem 0xfe9fc000-0xfe9fffff irq 21 at device 27.0 on pci0
pcib1: <ACPI PCI-PCI bridge> at device 28.0 on pci0
pci11: <ACPI PCI bus> on pcib1
pcib2: <ACPI PCI-PCI bridge> at device 28.1 on pci0
pci12: <ACPI PCI bus> on pcib2
wpi0: <Intel(R) PRO/Wireless 3945ABG> mem 0xfe8ff000-0xfe8fffff irq 17 at device 0.0 on pci12
pcib3: <ACPI PCI-PCI bridge> at device 28.5 on pci0
pci9: <ACPI PCI bus> on pcib3
bge0: <Broadcom NetXtreme Gigabit Ethernet Controller, ASIC rev. 0x00a002> mem 0xfe7f0000-0xfe7fffff irq 17 at device 0.0 on pci9
bge0: CHIP ID 0x0000a002; ASIC REV 0x0a; CHIP REV 0xa0; PCI-E
miibus0: <MII bus> on bge0
brgphy0: <BCM5755 1000BASE-T media interface> PHY 1 on miibus0
brgphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, 1000baseT, 1000baseT-master, 1000baseT-FDX, 1000baseT-FDX-master, auto, auto-flow
bge0: Ethernet address: 00:1d:09:ba:cc:0d
uhci2: <Intel 82801H (ICH8) USB controller USB-A> port 0x6f80-0x6f9f irq 20 at device 29.0 on pci0
usbus3 on uhci2
uhci3: <Intel 82801H (ICH8) USB controller USB-B> port 0x6f60-0x6f7f irq 21 at device 29.1 on pci0
usbus4 on uhci3
uhci4: <Intel 82801H (ICH8) USB controller USB-C> port 0x6f40-0x6f5f irq 22 at device 29.2 on pci0
usbus5 on uhci4
ehci1: <Intel 82801H (ICH8) USB 2.0 controller USB2-A> mem 0xfed1c000-0xfed1c3ff irq 20 at device 29.7 on pci0
usbus6: EHCI version 1.0
usbus6 on ehci1
pcib4: <ACPI PCI-PCI bridge> at device 30.0 on pci0
pci3: <ACPI PCI bus> on pcib4
cbb0: <PCI-CardBus Bridge> at device 1.0 on pci3
cardbus0: <CardBus bus> on cbb0
pccard0: <16-bit PCCard bus> on cbb0
pci3: <serial bus, FireWire> at device 1.4 (no driver attached)
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
atapci0: <Intel ICH8M UDMA100 controller> port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x6fa0-0x6faf irq 16 at device 31.1 on pci0
ata0: <ATA channel> at channel 0 on atapci0
atapci1: <Intel ICH8M SATA300 controller> port 0x6eb0-0x6eb7,0x6eb8-0x6ebb,0x6ec0-0x6ec7,0x6ec8-0x6ecb,0x6ee0-0x6eef,0xeff0-0xefff irq 17 at device 31.2 on pci0
ata2: <ATA channel> at channel 0 on atapci1
ata3: <ATA channel> at channel 1 on atapci1
ichsmb0: <Intel 82801H (ICH8) SMBus controller> port 0x10c0-0x10df mem 0xfe9fbf00-0xfe9fbfff irq 17 at device 31.3 on pci0
smbus0: <System Management Bus> on ichsmb0
smb0: <SMBus generic I/O> on smbus0
acpi_lid0: <Control Method Lid Switch> on acpi0
acpi_button0: <Power Button> on acpi0
acpi_button1: <Sleep Button> on acpi0
acpi_acad0: <AC Adapter> on acpi0
battery0: <ACPI Control Method Battery> on acpi0
battery1: <ACPI Control Method Battery> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
atkbdc0: <Keyboard controller (i8042)> port 0x60,0x64,0x62,0x66 irq 1 on acpi0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
psm0: <PS/2 Mouse> irq 12 on atkbdc0
psm0: [GIANT-LOCKED]
psm0: model GlidePoint, device ID 0
uart0: <16550 or compatible> port 0x3f8-0x3ff irq 4 flags 0x10 on acpi0
ichwd0 on isa0
ichwd0: resuming after hardware watchdog timeout
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcefff,0xcf000-0xcffff pnpid ORM0000 on isa0
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <8 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
ppc0: parallel port not found.
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
p4tcc0: <CPU Frequency Thermal Control> on cpu0
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
p4tcc1: <CPU Frequency Thermal Control> on cpu1
Timecounters tick every 1.000 msec
hdacc0: <Sigmatel STAC9205X HDA CODEC> at cad 0 on hdac0
hdaa0: <Sigmatel STAC9205X Audio Function Group> at nid 1 on hdacc0
pcm0: <Sigmatel STAC9205X (Analog 2.0+HP/2.0)> at nid 13,10 and 12,11 on hdaa0
random: unblocking device.
usbus0: 12Mbps Full Speed USB v1.0
usbus1: 12Mbps Full Speed USB v1.0
usbus2: 480Mbps High Speed USB v2.0
usbus3: 12Mbps Full Speed USB v1.0
usbus4: 12Mbps Full Speed USB v1.0
usbus5: 12Mbps Full Speed USB v1.0
usbus6: 480Mbps High Speed USB v2.0
ugen1.1: <Intel> at usbus1
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen0.1: <Intel> at usbus0
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen4.1: <Intel> at usbus4
uhub2: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus4
ugen3.1: <Intel> at usbus3
uhub3: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ugen2.1: <Intel> at usbus2
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
ugen6.1: <Intel> at usbus6
uhub5: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus6
ugen5.1: <Intel> at usbus5
uhub6: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5
uhub0: 2 ports with 2 removable, self powered
uhub1: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
uhub6: 2 ports with 2 removable, self powered
uhub4: 4 ports with 4 removable, self powered
ada0 at ata2 bus 0 scbus1 target 0 lun 0
ada0: <WDC WD800BEVS-75RST0 04.01G04> ATA-7 SATA 1.x device
ada0: Sercd0 at ata0 bus 0 scbus0 target 0 lun 0
cd0: <SONY CDRWDVD CRX880A KD09> Removable CD-ROM SCSI-0 device 
cd0: 33.300MB/s transfers (UDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present
ial Number WD-WXCZ07905963
ada0: 150.000MB/s transfers (SATA 1.x, UDMA5, PIO 8192bytes)
ada0: 76319MB (156301488 512 byte sectors: 16H 63S/T 16383C)
ada0: Previously was known as ad0
SMP: AP CPU #1 Launched!
Root mount waiting for: usbus6
uhub5: 6 ports with 6 removable, self powered
Root mount waiting for: usbus6
Root mount waiting for: usbus6
ugen6.2: <Toshiba> at usbus6
umass0: <Toshiba External USB 3.0, class 0/0, rev 2.10/0.01, addr 2> on usbus6
(probe0:umass-sim0:0:0:0): REPORT LUNS. CDB: a0 00 00 00 00 00 00 00 00 10 00 00 
(probe0:umass-sim0:0:0:0): CAM status: SCSI Status Error
(probe0:umass-sim0:0:0:0): SCSI status: Check Condition
(probe0:umass-sim0:0:0:0): SCSI sense: Error code 0x0
(probe0:umass-sim0:0:0:0): Error 22, Unretryable error
da0 at umass-sim0 bus 0 scbus3 target 0 lun 0
da0: <TOSHIBA External USB 3.0 0001> Fixed Direct Access SCSI-6 device 
da0: Serial Number 2010110600754
da0: 40.000MB/s transfers
da0: 715404MB (1465149168 512 byte sectors: 255H 63S/T 91201C)
da0: quirks=0x2<NO_6_BYTE>
ugen4.2: <Logitech> at usbus4
ums0: <Logitech USB Receiver, class 0/0, rev 1.10/46.00, addr 2> on usbus4
ums0: 8 buttons and [XYZT] coordinates ID=0
uhid0: <Logitech USB Receiver, class 0/0, rev 1.10/46.00, addr 2> on usbus4
Trying to mount root from ufs:/dev/ad0s3a [rw]...
WARNING: / was not properly dismounted
wlan0: Ethernet address: 00:1c:bf:90:ab:44
Received on Sat Jan 25 2014 - 16:36:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:46 UTC