From owner-freebsd-current@FreeBSD.ORG Thu Nov 13 17:25:35 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 112EB3A7 for ; Thu, 13 Nov 2014 17:25:35 +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)) (Client CN "troutmask.apl.washington.edu", Issuer "troutmask.apl.washington.edu" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DC1F5A90 for ; Thu, 13 Nov 2014 17:25:34 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost.apl.washington.edu [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id sADHPYpt018760 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 13 Nov 2014 09:25:34 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id sADHPXPZ018759 for freebsd-current@freebsd.org; Thu, 13 Nov 2014 09:25:33 -0800 (PST) (envelope-from sgk) Date: Thu, 13 Nov 2014 09:25:33 -0800 From: Steve Kargl To: freebsd-current@freebsd.org Subject: USB locks up system -- WAS Re: shutdown or acpi problem Message-ID: <20141113172533.GA18690@troutmask.apl.washington.edu> References: <20141112224212.GA14013@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20141112224212.GA14013@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.18-1 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: Thu, 13 Nov 2014 17:25:35 -0000 On Wed, Nov 12, 2014 at 02:42:13PM -0800, Steve Kargl wrote: > I have a kernel/world from r274273 sources, which is exhibiting a new > issue on my old laptop. Neither 'shutdown -p now' nor 'shutdown -r now' > work. I get to the end of shutdown and see for example > > All buffers synced > Uptime: 4h23m15s > > and then the laptop just sits there. It does not power off with > the -p option nor does it reboot with the -r. Has anyone else > seen this behavior? > The problem appears to be related to a recent change in the USB stack. If I have the following drive plugged into a usb port, the above behavior is observed on shutdown. ugen6.2: at usbus6 umass0: on usbus6 da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0: Fixed Direct Access SCSI-6 device da0: Serial Number 57584B314537324445595A31 da0: 40.000MB/s transfers da0: 1907697MB (3906963456 512 byte sectors: 255H 63S/T 243197C) da0: quirks=0x2 ses1 at umass-sim0 bus 0 scbus4 target 0 lun 1 ses1: Fixed Enclosure Services SCSI-6 device ses1: Serial Number 57584B314537324445595A31 ses1: 40.000MB/s transfers ses1: SCSI-3 ENC Device If this drive was never plugged into a usb port, 'shutdown -r now' and 'shutdown -p now' work as expected. If drive is plugged into a usb port, and I then unplug the drive the laptop is turned into a brick. In a vt(4) console, there is no keyboard and no output is displayed to the console. Logging into the laptop with ssh works. With the laptop in a brick state, issuing 'usbconfig' yields a wedged process with no output to the terminal and 'usbconfig' is unkillable. ^T yields load: 0.30 cmd: usbconfig 1068 [USB config SX lock] 441.15r 0.00u 0.00s 1884k. Unfortunately, a 'gdb -p 1068' yields a core dump for gdb. :( Logging into the laptop again with ssh works. Issuing the command 'camcontrol rescan all' yields Re-scan of bus 4 returned error 0xa Re-scan of bus 0 was successful Re-scan of bus 1 was successful Re-scan of bus 2 was successful Re-scan of bus 3 was successful dmesg follows my sig. -- 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 #0 r274456: Thu Nov 13 07:45:01 PST 2014 kargl@laptop-kargl.apl.washington.edu:/usr/obj/usr/src/sys/MOBILE i386 FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 VT: running with driver "vga". 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 VT-x: (disabled in BIOS) HLT,PAUSE TSC: P-state invariant, performance statistics real memory = 3221225472 (3072 MB) avail memory = 3136098304 (2990 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: entropy device infrastructure driver random: selecting highest priority adaptor kbd1 at kbdmux0 random: SOFT: yarrow init() random: selecting highest priority adaptor module_register_init: MOD_LOAD (vesa, 0xc0b3a4e0, 0) error 19 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-fast" frequency 3579545 Hz quality 900 acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1008-0x100b on acpi0 pcib0: port 0xcf8-0xcff on acpi0 pci0: on pcib0 vgapci0: port 0xeff8-0xefff mem 0xfea00000-0xfeafffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0 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 ahci0: port 0x6eb0-0x6eb7,0x6eb8-0x6ebb,0x6ec0-0x6ec7,0x6ec8-0x6ecb,0x6ee0-0x6eff mem 0xfe9fb800-0xfe9fbfff irq 17 at device 31.2 on pci0 ahci0: AHCI v1.10 with 3 3Gbps ports, Port Multiplier not supported ahcich0: at channel 0 on ahci0 ahcich2: at channel 2 on ahci0 ahciem0: on ahci0 ichsmb0: port 0x10c0-0x10df mem 0xfe9fb700-0xfe9fb7ff 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 pmtimer0 on isa0 orm0: at iomem 0xc0000-0xcefff,0xcf000-0xcffff pnpid ORM0000 on isa0 vga0: at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0 ppc0: parallel port not found. coretemp0: on cpu0 est0: on cpu0 coretemp1: on cpu1 est1: on cpu1 fuse-freebsd: version 0.4.4, FUSE ABI 7.8 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 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 ugen0.1: at usbus0 uhub0: on usbus0 ugen2.1: at usbus2 ugen1.1: at usbus1 uhub1: on usbus1 ugen5.1: at usbus5 ugen4.1: at usbus4 uhub2: on usbus4 ugen3.1: at usbus3 ugen6.1: at usbus6 uhub3: on usbus6 uhub4: on usbus2 uhub5: on usbus5 uhub6: on usbus3 ses0 at ahciem0 bus 0 scbus3 target 0 lun 0 ses0: SEMB S-E-S 2.00 device ses0: SEMB SES Device ada0 at ahcich0 bus 0 scbus1 target 0 lun 0 ada0: ATA-7 SATA 1.x device ada0: Serial Number WD-WXCZ07905963 ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 76319MB (156301488 512 byte sectors: 16H 63S/T 16383C) ada0: Previously was known as ad0 random: unblocking device. SMP: AP CPU #1 Launched! cd0 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 hwpmc: SOFT/16/64/0x67 TSC/1/64/0x20 IAP/2/40/0x3ff IAF/3/40/0x67 uhub2: 2 ports with 2 removable, self powered uhub0: 2 ports with 2 removable, self powered uhub1: 2 ports with 2 removable, self powered uhub6: 2 ports with 2 removable, self powered uhub5: 2 ports with 2 removable, self powered Root mount waiting for: usbus6 usbus2 Root mount waiting for: usbus6 usbus2 uhub4: 4 ports with 4 removable, self powered uhub3: 6 ports with 6 removable, self powered Root mount waiting for: usbus6 Trying to mount root from ufs:/dev/ada0s3a [rw]... WARNING: / was not properly dismounted WARNING: /: mount pending error: blocks 8 files 0 ugen4.2: at usbus4 ums0: on usbus4 ums0: 8 buttons and [XYZT] coordinates ID=0 uhid0: on usbus4 bge0: link state changed to UP agp0: on vgapci0 agp0: aperture size is 256M, detected 7676k stolen memory info: [drm] Initialized drm 1.1.0 20060810 drmn0: on vgapci0 info: [drm] MSI enabled 1 message(s) info: [drm] AGP at 0xe0000000 256MB iicbus0: on iicbb0 addr 0xec iic0: on iicbus0 iic1: on iicbus1 iicbus2: on iicbb1 addr 0xc8 iic2: on iicbus2 iic3: on iicbus3 iicbus4: on iicbb2 addr 0xc8 iic4: on iicbus4 iic5: on iicbus5 iicbus6: on iicbb3 addr 0xc8 iic6: on iicbus6 iic7: on iicbus7 iicbus8: on iicbb4 addr 0xc8 iic8: on iicbus8 iic9: on iicbus9 iicbus10: on iicbb5 addr 0xc8 iic10: on iicbus10 iic11: on iicbus11 iicbus12: on iicbb6 addr 0xc8 iic12: on iicbus12 iic13: on iicbus13 iicbus14: on iicbb7 addr 0xc8 iic14: on iicbus14 iic15: on iicbus15 info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010). info: [drm] Driver supports precise vblank timestamp query. composite sync not supported drmn0: taking over the fictitious range 0xe0000000-0xf0000000 info: [drm] initialized overlay support info: [drm] Connector LVDS-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.LVDS-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector VGA-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.VGA-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector DVI-D-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.DVI-D-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector SVIDEO-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.SVIDEO-1 info: [drm] - kern.vt.fb.default_mode composite sync not supported fbd0 on drmn0 VT: Replacing driver "vga" with new "fb". info: [drm] Initialized i915 1.6.0 20080730 composite sync not supported composite sync not supported ugen6.2: at usbus6 umass0: on usbus6 da0 at umass-sim0 bus 0 scbus4 target 0 lun 0 da0: Fixed Direct Access SCSI-6 device da0: Serial Number 57584B314537324445595A31 da0: 40.000MB/s transfers da0: 1907697MB (3906963456 512 byte sectors: 255H 63S/T 243197C) da0: quirks=0x2 ses1 at umass-sim0 bus 0 scbus4 target 0 lun 1 ses1: Fixed Enclosure Services SCSI-6 device ses1: Serial Number 57584B314537324445595A31 ses1: 40.000MB/s transfers ses1: SCSI-3 ENC Device