Subject: Total system lockup unmounting/ejecting USB sd0 - todays sources.
To: NetBSD current-users <current-users@netbsd.org>
From: Chris Tribo <ctribo@dtcc.edu>
List: current-users
Date: 04/19/2005 16:20:21
Finished writing the files to a USB2 flash drive, typed eject sd0, it=20
wrote for a few seconds and then the whole system locked up. Nothing on=20=

Xconsole, the keyboard and mouse are inoperative. Can't be pinged.=20
ddbonpanic=3D0 but it didn't do a dump, Seems to be repeatable, unable =
to=20
get into DB, and even if I could, it's a USB keyboard which won't work.

DEBUG
DIAGNOSTIC
USBDEBUG
EHCI_DEBUG
UHCI_DEBUG

are defined.

Hard powered the system off
Rebooted,
was able to log in after the fsck, plugged in my usb chain again,=20
nothing, unplugged all usb devices and plugged them back in, nothing.=20
no console keyboard anymore, and no USB ports are listening.

dmesg reports that the IRQs were mapped

Apr 19 11:54:15 atlantis /netbsd: ioapic0: pa 0xfec00000, virtual wire=20=

mode, version 20, 24 pins
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 2 attached to isa0 irq 0=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 1 attached to isa0 irq 1=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 3 attached to isa0 irq 3=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 4 attached to isa0 irq 4=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 5 attached to isa0 irq 5=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 6 attached to isa0 irq 6=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 7 attached to isa0 irq 7=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 8 attached to isa0 irq 8=20=

(type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 9 attached to isa0 irq 9=20=

(type 0<type=3D0> flags d<pol=3D1=3DAct Hi,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 10 attached to isa0 irq=20=

10 (type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 11 attached to isa0 irq=20=

11 (type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 12 attached to isa0 irq=20=

12 (type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 13 attached to isa0 irq=20=

13 (type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 14 attached to isa0 irq=20=

14 (type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 15 attached to isa0 irq=20=

15 (type 0<type=3D0> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: local apic: pin 1 attached to NMI=20
(type 1<type=3D1=3DNMI> flags 0<pol=3D0,trig=3D0>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci0=20
device 1 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci0=20
device 2 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci0=20
device 31 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci0=20
device 31 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 20 attached to pci0=20
device 31 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 23 attached to pci0=20
device 30 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 21 attached to pci0=20
device 29 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 22 attached to pci0=20
device 29 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci0=20
device 29 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 23 attached to pci0=20
device 29 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci0=20
device 28 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci0=20
device 28 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct =
Lo,trig=3D3=3DLevel>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci4=20
device 7 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci4=20
device 0 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci4=20
device 0 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci4=20
device 0 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci4=20
device 0 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci4=20
device 1 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci4=20
device 1 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci4=20
device 1 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci4=20
device 1 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci4=20
device 2 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci4=20
device 2 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci4=20
device 2 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci4=20
device 2 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci4=20
device 3 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci4=20
device 3 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci4=20
device 3 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci4=20
device 3 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci2=20
device 0 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci2=20
device 0 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci2=20
device 0 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci2=20
device 0 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci3=20
device 0 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci3=20
device 0 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci3=20
device 0 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci3=20
device 0 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 16 attached to pci1=20
device 0 INT_A (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 17 attached to pci1=20
device 0 INT_B (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 18 attached to pci1=20
device 0 INT_C (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: ioapic0: pin 19 attached to pci1=20
device 0 INT_D (type 0<type=3D0> flags f<pol=3D3=3DAct Lo,trig=3D3=3DLevel=
>)
Apr 19 11:54:15 atlantis /netbsd: uhci0: interrupting at ioapic0 pin 21=20=

(irq 9)
Apr 19 11:54:15 atlantis /netbsd: uhci1: interrupting at ioapic0 pin 22=20=

(irq 5)
Apr 19 11:54:15 atlantis /netbsd: uhci2: interrupting at ioapic0 pin 18=20=

(irq 3)
Apr 19 11:54:15 atlantis /netbsd: uhci3: interrupting at ioapic0 pin 23=20=

(irq 10)
Apr 19 11:54:15 atlantis /netbsd: ehci0: interrupting at ioapic0 pin 21=20=

(irq 9)

but vmstat -i indicates that only the IRQ for pin 22 has been=20
established, since it's uhci and not ehci, the device handoff from USB2=20=

is probably not happening, hence none of my USB ports are doing=20
anything. I'm at a total loss to explain why this is happening, and it=20=

happens on non-acpi/mp straight old pic with tons of interrupt sharing=20=

kernels as well.=10=10

interrupt                                     total     rate
cpu0 softclock                                83901      101
cpu0 softnet                                   1574        1
cpu0 softserial                                   1        0
cpu0 timer                                    84077      101
ioapic0 pin 6                                     1        0
ioapic0 pin 16                                 1637        1
ioapic0 pin 22                                  401        0
ioapic0 pin 14                                   35        0
ioapic0 pin 20                                56407       68
Total                                        228034      276

Diagnostics indicate no problems with USB, PIC, APIC, nor any other=20
part of the system. Everything works fine in windows xp as well.