From owner-freebsd-current@FreeBSD.ORG Sat Jan 25 17:36:58 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2D49572 for ; Sat, 25 Jan 2014 17:36:58 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DEEC912C5 for ; Sat, 25 Jan 2014 17:36:57 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.7/8.14.7) with ESMTP id s0PHL7FH067611 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Sat, 25 Jan 2014 09:21:07 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.7/8.14.7/Submit) id s0PHL6CZ067610 for freebsd-current@freebsd.org; Sat, 25 Jan 2014 09:21:06 -0800 (PST) (envelope-from sgk) Date: Sat, 25 Jan 2014 09:21:06 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: Instant panic CAM or USB subsystem Message-ID: <20140125172106.GA67590@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.22 (2013-10-16) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Jan 2014 17:36:58 -0000 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: 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=) 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=, code=-1056387128) at /usr/src/sys/ddb/db_main.c:231 #5 0xc078a9f8 in kdb_trap (type=, code=, tf=) at /usr/src/sys/kern/subr_kdb.c:656 #6 0xc0a112f2 in trap (frame=) 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=) at cpufunc.h:71 #9 0xc07546c3 in vpanic (fmt=, ap=) 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=, file=0x12
, line=1309824) at /usr/src/sys/kern/kern_mutex.c:793 #12 0xc047333c in cam_periph_find (name=) at /usr/src/sys/cam/cam_periph.c:301 #13 0xc0491062 in cdregister (periph=, arg=0xc72ee22c) at /usr/src/sys/cam/scsi/scsi_cd.c:1007 #14 0xc047313c in cam_periph_alloc (name=, path=0xc752d490, ac_callback=, code=) at /usr/src/sys/cam/cam_periph.c:249 #15 0xc04907cc in cdasync (callback_arg=, code=, arg=0xc78cd000) at /usr/src/sys/cam/scsi/scsi_cd.c:548 #16 0xc047d485 in xpt_async_process_dev (device=, 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=) at /usr/src/sys/cam/cam_xpt.c:5274 #20 0xc07234df in fork_exit (callout=0xc047eb90 ) 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@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 @ 2.00GHz (1995.04-MHz 686-class CPU) Origin="GenuineIntel" Id=0x6fd Family=0x6 Model=0xf Stepping=13 Features=0xbfebfbff Features2=0xe3bd AMD Features=0x20000000 AMD Features2=0x1 TSC: P-state invariant, performance statistics real memory = 3221225472 (3072 MB) avail memory = 3140329472 (2994 MB) Event timer "LAPIC" quality 400 ACPI APIC Table: 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 irqs 0-23 on motherboard random: initialized kbd1 at kbdmux0 acpi0: on motherboard hpet0: 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: on acpi0 cpu1: on acpi0 atrtc0: port 0x70-0x71,0x72-0x77 irq 8 on acpi0 Event timer "RTC" frequency 32768 Hz quality 0 attimer0: 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: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0xefe8-0xefef mem 0xfea00000-0xfeafffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0 agp0: on vgapci0 agp0: aperture size is 256M, detected 7676k stolen memory drm0: 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: mem 0xfeb00000-0xfebfffff at device 2.1 on pci0 uhci0: port 0x6f20-0x6f3f irq 20 at device 26.0 on pci0 usbus0 on uhci0 uhci1: port 0x6f00-0x6f1f irq 21 at device 26.1 on pci0 usbus1 on uhci1 ehci0: mem 0xfed1c400-0xfed1c7ff irq 22 at device 26.7 on pci0 usbus2: EHCI version 1.0 usbus2 on ehci0 hdac0: mem 0xfe9fc000-0xfe9fffff irq 21 at device 27.0 on pci0 pcib1: at device 28.0 on pci0 pci11: on pcib1 pcib2: at device 28.1 on pci0 pci12: on pcib2 wpi0: mem 0xfe8ff000-0xfe8fffff irq 17 at device 0.0 on pci12 pcib3: at device 28.5 on pci0 pci9: on pcib3 bge0: mem 0xfe7f0000-0xfe7fffff irq 17 at device 0.0 on pci9 bge0: CHIP ID 0x0000a002; ASIC REV 0x0a; CHIP REV 0xa0; PCI-E miibus0: on bge0 brgphy0: 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: port 0x6f80-0x6f9f irq 20 at device 29.0 on pci0 usbus3 on uhci2 uhci3: port 0x6f60-0x6f7f irq 21 at device 29.1 on pci0 usbus4 on uhci3 uhci4: port 0x6f40-0x6f5f irq 22 at device 29.2 on pci0 usbus5 on uhci4 ehci1: mem 0xfed1c000-0xfed1c3ff irq 20 at device 29.7 on pci0 usbus6: EHCI version 1.0 usbus6 on ehci1 pcib4: at device 30.0 on pci0 pci3: on pcib4 cbb0: at device 1.0 on pci3 cardbus0: on cbb0 pccard0: <16-bit PCCard bus> on cbb0 pci3: at device 1.4 (no driver attached) isab0: at device 31.0 on pci0 isa0: on isab0 atapci0: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0x6fa0-0x6faf irq 16 at device 31.1 on pci0 ata0: at channel 0 on atapci0 atapci1: port 0x6eb0-0x6eb7,0x6eb8-0x6ebb,0x6ec0-0x6ec7,0x6ec8-0x6ecb,0x6ee0-0x6eef,0xeff0-0xefff irq 17 at device 31.2 on pci0 ata2: at channel 0 on atapci1 ata3: at channel 1 on atapci1 ichsmb0: port 0x10c0-0x10df mem 0xfe9fbf00-0xfe9fbfff irq 17 at device 31.3 on pci0 smbus0: on ichsmb0 smb0: on smbus0 acpi_lid0: on acpi0 acpi_button0: on acpi0 acpi_button1: on acpi0 acpi_acad0: on acpi0 battery0: on acpi0 battery1: on acpi0 acpi_tz0: on acpi0 atkbdc0: port 0x60,0x64,0x62,0x66 irq 1 on acpi0 atkbd0: irq 1 on atkbdc0 kbd0 at atkbd0 atkbd0: [GIANT-LOCKED] psm0: 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: at iomem 0xc0000-0xcefff,0xcf000-0xcffff pnpid ORM0000 on isa0 sc0: at flags 0x100 on isa0 sc0: VGA <8 virtual consoles, flags=0x300> vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ppc0: parallel port not found. coretemp0: on cpu0 est0: on cpu0 p4tcc0: on cpu0 coretemp1: on cpu1 est1: on cpu1 p4tcc1: on cpu1 Timecounters tick every 1.000 msec hdacc0: at cad 0 on hdac0 hdaa0: at nid 1 on hdacc0 pcm0: 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: at usbus1 uhub0: on usbus1 ugen0.1: at usbus0 uhub1: on usbus0 ugen4.1: at usbus4 uhub2: on usbus4 ugen3.1: at usbus3 uhub3: on usbus3 ugen2.1: at usbus2 uhub4: on usbus2 ugen6.1: at usbus6 uhub5: on usbus6 ugen5.1: at usbus5 uhub6: 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: ATA-7 SATA 1.x device ada0: Sercd0 at ata0 bus 0 scbus0 target 0 lun 0 cd0: 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: at usbus6 umass0: 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: 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 ugen4.2: at usbus4 ums0: on usbus4 ums0: 8 buttons and [XYZT] coordinates ID=0 uhid0: 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