USB locks up system -- WAS Re: shutdown or acpi problem

From: Steve Kargl <sgk_at_troutmask.apl.washington.edu>
Date: Thu, 13 Nov 2014 09:25:33 -0800
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: <Western Digital> at usbus6
umass0: <MSC Bulk-Only Transport> on usbus6
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <WD My Passport 0748 1019> 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<NO_6_BYTE>
ses1 at umass-sim0 bus 0 scbus4 target 0 lun 1
ses1: <WD SES Device 1019> 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_at_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  _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>
  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: <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: entropy device infrastructure driver
random: selecting highest priority adaptor <Dummy>
kbd1 at kbdmux0
random: SOFT: yarrow init()
random: selecting highest priority adaptor <Yarrow>
module_register_init: MOD_LOAD (vesa, 0xc0b3a4e0, 0) error 19
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-fast" frequency 3579545 Hz quality 900
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 0xeff8-0xefff mem 0xfea00000-0xfeafffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
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
ahci0: <Intel ICH8M AHCI SATA controller> 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: <AHCI channel> at channel 0 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
ichsmb0: <Intel 82801H (ICH8) SMBus controller> port 0x10c0-0x10df mem 0xfe9fb700-0xfe9fb7ff 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
pmtimer0 on isa0
orm0: <ISA Option ROMs> at iomem 0xc0000-0xcefff,0xcf000-0xcffff pnpid ORM0000 on isa0
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
coretemp1: <CPU On-Die Thermal Sensors> on cpu1
est1: <Enhanced SpeedStep Frequency Control> on cpu1
fuse-freebsd: version 0.4.4, FUSE ABI 7.8
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
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: <Intel> at usbus0
uhub0: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus0
ugen2.1: <Intel> at usbus2
ugen1.1: <Intel> at usbus1
uhub1: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus1
ugen5.1: <Intel> at usbus5
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
ugen6.1: <Intel> at usbus6
uhub3: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus6
uhub4: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
uhub5: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus5
uhub6: <Intel UHCI root HUB, class 9/0, rev 1.00/1.00, addr 1> on usbus3
ses0 at ahciem0 bus 0 scbus3 target 0 lun 0
ses0: <AHCI SGPIO Enclosure 1.00 0001> SEMB S-E-S 2.00 device
ses0: SEMB SES Device
ada0 at ahcich0 bus 0 scbus1 target 0 lun 0
ada0: <WDC WD800BEVS-75RST0 04.01G04> 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: <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
hwpmc: SOFT/16/64/0x67<INT,USR,SYS,REA,WRI> TSC/1/64/0x20<REA> IAP/2/40/0x3ff<INT,USR,SYS,EDG,THR,REA,WRI,INV,QUA,PRC> IAF/3/40/0x67<INT,USR,SYS,REA,WRI>
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: <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
bge0: link state changed to UP
agp0: <Intel GM965 SVGA controller> on vgapci0
agp0: aperture size is 256M, detected 7676k stolen memory
info: [drm] Initialized drm 1.1.0 20060810
drmn0: <Intel i965GM> on vgapci0
info: [drm] MSI enabled 1 message(s)
info: [drm] AGP at 0xe0000000 256MB
iicbus0: <Philips I2C bus> on iicbb0 addr 0xec
iic0: <I2C generic I/O> on iicbus0
iic1: <I2C generic I/O> on iicbus1
iicbus2: <Philips I2C bus> on iicbb1 addr 0xc8
iic2: <I2C generic I/O> on iicbus2
iic3: <I2C generic I/O> on iicbus3
iicbus4: <Philips I2C bus> on iicbb2 addr 0xc8
iic4: <I2C generic I/O> on iicbus4
iic5: <I2C generic I/O> on iicbus5
iicbus6: <Philips I2C bus> on iicbb3 addr 0xc8
iic6: <I2C generic I/O> on iicbus6
iic7: <I2C generic I/O> on iicbus7
iicbus8: <Philips I2C bus> on iicbb4 addr 0xc8
iic8: <I2C generic I/O> on iicbus8
iic9: <I2C generic I/O> on iicbus9
iicbus10: <Philips I2C bus> on iicbb5 addr 0xc8
iic10: <I2C generic I/O> on iicbus10
iic11: <I2C generic I/O> on iicbus11
iicbus12: <Philips I2C bus> on iicbb6 addr 0xc8
iic12: <I2C generic I/O> on iicbus12
iic13: <I2C generic I/O> on iicbus13
iicbus14: <Philips I2C bus> on iicbb7 addr 0xc8
iic14: <I2C generic I/O> on iicbus14
iic15: <I2C generic I/O> 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: <Western Digital> at usbus6
umass0: <MSC Bulk-Only Transport> on usbus6
da0 at umass-sim0 bus 0 scbus4 target 0 lun 0
da0: <WD My Passport 0748 1019> 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<NO_6_BYTE>
ses1 at umass-sim0 bus 0 scbus4 target 0 lun 1
ses1: <WD SES Device 1019> Fixed Enclosure Services SCSI-6 device 
ses1: Serial Number 57584B314537324445595A31
ses1: 40.000MB/s transfers
ses1: SCSI-3 ENC Device
Received on Thu Nov 13 2014 - 16:25:35 UTC

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