>Synopsis: When copying data between USB disks the system randomly panics:
>ehci_device_clear_toggle: queue active
>Category: kernel
>Environment:
System : OpenBSD 5.4
Details : OpenBSD 5.4-beta (GENERIC) #21: Tue Jul 9 11:45:27 MDT
2013
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC
Architecture: OpenBSD.i386
Machine : i386
>Description:
The following panic occurs at random intervals on an alix2d3
while rsyncing data from an ffs on sd0 (umass0) to an msdos
partition on sd1 (umass1). rsync is called via hotplugd
when attaching umass1. It does not occur when only accessing
one USB disk.
umass1 at uhub0 port 1 configuration 1 interface 0 "PI-362 USB 2.0 Drive" rev
2.00/0.00 addr 5
umass1: using SCSI over Bulk-Only
scsibus3 at umass1: 2 targets, initiator 0
sd1 at scsibus3 targ 1 lun 0: <Hitachi, HTS545050B9A300, > SCSI2 0/direct fixed
serial.152d2329010061300591
sd1: 476940MB, 512 bytes/sector, 976773168 sectors
panic: ehci_device_clear_toggle: queue active
Stopped at Debugger+0x4: popl %ebp
RUN AT LEAST 'trace' AND 'ps' AND INCLUDE OUTPUT WHEN REPORTING THIS PANIC!
DO NOT EVEN BOTHER REPORTING THIS WITHOUT INCLUDING THAT INFORMATION!
ddb> trace
Debugger(d0962f20,f3765e70,d0935794,f3765e70,d1331b02) at Debugger+0x4
panic(d0935794,f3771d20,f3765ea4,d0826e02,d1331c00) at panic+0x5d
ehci_device_clear_toggle(d1331c00,0,f3765ea4,d03ad4bf,d11ad000) at ehci_device_
clear_toggle+0x29
umass_clear_endpoint_stall(d1336600,1,d132c500,a,d132c300) at umass_clear_endpo
int_stall+0x22
usb_transfer_complete(d132c300,d132c300,d0203009,f3765ef4,d119f3a0) at usb_tran
sfer_complete+0x22a
ehci_softintr(d11ad000,3,d11a0480,0,d0201fee) at ehci_softintr+0x37
softintr_dispatch(1) at softintr_dispatch+0x5a
Xsoftnet() at Xsoftnet+0x12
--- interrupt ---
cpu_idle_cycle(d0b73880) at cpu_idle_cycle+0xf
Bad frame pointer: 0xd0c3be58
ddb> ps
PID PPID PGRP UID S FLAGS WAIT COMMAND
20411 13832 13832 1000 3 0x80 piperd cat
15082 13832 13832 1000 3 0x80 kqread tail
13832 9917 13832 1000 3 0x88 pause sh
9917 29570 9917 1000 3 0x88 pause ksh
29570 28310 28310 1000 3 0x80 select sshd
28310 2045 28310 0 3 0x80 poll sshd
7357 11513 30246 0 3 0 bqwait rsync
11513 2731 30246 0 3 0x80 select rsync
2731 12697 30246 0 3 0x80 select rsync
12697 30246 30246 0 3 0x88 pause sh
30246 20799 30246 0 3 0x88 pause sh
4571 13817 13817 0 3 0x80 poll smbd
9093 32128 32128 0 3 0x80 piperd nmbd
6463 1 6463 0 3 0x80 ttyin getty
31836 1 31836 0 3 0x80 select cron
1149 1 1149 0 3 0x80 htplev hotplugd
22884 4973 4973 95 3 0x80 kqread smtpd
7355 4973 4973 95 3 0x80 kqread smtpd
2309 4973 4973 95 3 0x80 kqread smtpd
30386 4973 4973 95 3 0x80 kqread smtpd
15756 4973 4973 95 3 0x80 kqread smtpd
8343 4973 4973 95 3 0x80 kqread smtpd
17817 4973 4973 95 3 0x80 kqread smtpd
6834 4973 4973 95 3 0x80 kqread smtpd
5281 18061 18061 617 3 0x80 netcon tinyproxy
9657 18061 18061 617 3 0x80 netcon tinyproxy
3830 14303 21546 510 3 0x4100080 netio pdnsd
32722 14303 21546 510 3 0x4100080 netcon pdnsd
3285 14303 21546 510 3 0x4100080 netcon pdnsd
20446 14303 21546 510 3 0x4100080 poll pdnsd
8799 10745 10745 511 3 0x80 nanosleep perl
8005 799 8005 562 3 0x80 piperd dumblog
18061 11088 18061 617 3 0x80 nanosleep tinyproxy
18866 16772 18866 562 3 0x80 piperd dumblog
9386 17043 9386 562 3 0x80 piperd dumblog
15435 28981 15435 562 3 0x80 piperd dumblog
30038 4067 30038 562 3 0x80 piperd dumblog
13817 19444 13817 0 3 0x80 poll smbd
6919 14031 6919 562 3 0x80 piperd dumblog
32128 7690 32128 0 3 0x80 poll nmbd
17235 32278 17235 562 3 0x80 piperd dumblog
4973 29730 4973 0 3 0x80 kqread smtpd
799 10910 12203 0 3 0x80 select supervise
11088 10910 12203 0 3 0x80 select supervise
10745 23868 10745 511 3 0x88 pause ksh
28981 10910 12203 0 3 0x80 select supervise
29730 10910 12203 0 3 0x80 select supervise
17043 10910 12203 0 3 0x80 select supervise
24066 10910 12203 0 3 0x80 select supervise
32278 10910 12203 0 3 0x80 select supervise
7690 10910 12203 0 3 0x80 select supervise
1015 11805 1015 562 3 0x80 piperd dumblog
16772 10910 12203 0 3 0x80 select supervise
20799 10910 12203 0 3 0x80 select supervise
14031 10910 12203 0 3 0x80 select supervise
19444 10910 12203 0 3 0x80 select supervise
4067 10910 12203 0 3 0x80 select supervise
23868 10910 12203 0 3 0x80 select supervise
6245 23718 6245 562 3 0x80 piperd dumblog
21546 14303 21546 510 3 0x80 sigwait pdnsd
11294 19701 11294 562 3 0x80 piperd dumblog
11805 10910 12203 0 3 0x80 select supervise
26780 10910 12203 0 3 0x80 select supervise
23718 10910 12203 0 3 0x80 select supervise
14303 10910 12203 0 3 0x80 select supervise
19701 10910 12203 0 3 0x80 select supervise
29735 10910 12203 0 3 0x80 select supervise
10910 1 12203 0 3 0x80 nanosleep svscan
20908 1 20908 99 3 0x80 poll sndiod
22995 1 22995 71 3 0x80 kqread ftp-proxy
1999 1 1999 0 3 0x80 poll ftpd
28503 1 28503 77 3 0x80 poll dhcpd
2045 1 2045 0 3 0x80 select sshd
7394 186 17690 83 3 0x80 poll ntpd
186 17690 17690 83 3 0x80 poll ntpd
17690 1 17690 0 3 0x80 poll ntpd
20902 4712 4712 74 3 0x80 bpf pflogd
4712 1 4712 0 3 0x80 netio pflogd
2068 14041 14041 73 3 0x80 poll syslogd
14041 1 14041 0 3 0x80 netio syslogd
14982 1 14982 77 3 0x80 poll dhclient
13295 1 13295 0 3 0x80 poll dhclient
4844 1 4844 0 3 0x80 mfsidl mount_mfs
6845 1 6845 0 3 0x80 mfsidl mount_mfs
13 0 0 0 3 0x100200 aiodoned aiodoned
12 0 0 0 3 0x100200 bqwait update
11 0 0 0 3 0x100200 cleaner cleaner
10 0 0 0 3 0x100200 reaper reaper
9 0 0 0 3 0x100200 pgdaemon pagedaemon
8 0 0 0 3 0x100200 bored crypto
7 0 0 0 3 0x100200 pftm pfpurge
6 0 0 0 3 0x100200 usbtsk usbtask
5 0 0 0 3 0x100200 usbatsk usbatsk
4 0 0 0 3 0x100200 bored syswq
* 3 0 0 0 7 0x40100200 idle0
2 0 0 0 3 0x100200 kmalloc kmthread
1 0 1 0 3 0x80 wait init
0 -1 0 0 3 0x200 scheduler swapper
ddb> boot crash
dumping to dev 1, offset 15
dump 62 61 60 59 58 57 56 55 54 53 52 51 50 49 48 47 46 45 44 43 42 41 40 39 38
37 36 35 34 33 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12
11 10 9 8 7 6 5 4 3 2 1 0 area improper
rebooting...
>How-To-Repeat:
Copy data between usb disks. The system will panic after
some time. Most of the time, 1GB is enough for it to panic.
>Fix:
Fix unknown. The panic() was introduced in rev 1.59 of ehci.c.
dmesg:
OpenBSD 5.4-beta (GENERIC) #21: Tue Jul 9 11:45:27 MDT 2013
[email protected]:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Geode(TM) Integrated Processor by AMD PCS ("AuthenticAMD" 586-class) 499
MHz
cpu0: FPU,DE,PSE,TSC,MSR,CX8,SEP,PGE,CMOV,CFLUSH,MMX,MMXX,3DNOW2,3DNOW
real mem = 267976704 (255MB)
avail mem = 252145664 (240MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 11/05/08, BIOS32 rev. 0 @ 0xfd088
pcibios0 at bios0: rev 2.1 @ 0xf0000/0x10000
pcibios0: pcibios_get_intr_routing - function not supported
pcibios0: PCI IRQ Routing information unavailable.
pcibios0: PCI bus #0 is the last bus
bios0: ROM list: 0xe0000/0xa800
cpu0 at mainbus0: (uniprocessor)
pci0 at mainbus0 bus 0: configuration mode 1 (bios)
pchb0 at pci0 dev 1 function 0 "AMD Geode LX" rev 0x33
glxsb0 at pci0 dev 1 function 2 "AMD Geode LX Crypto" rev 0x00: RNG AES
vr0 at pci0 dev 9 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 10, address
00:0d:b9:20:f6:18
ukphy0 at vr0 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063,
model 0x0034
vr1 at pci0 dev 10 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 11, address
00:0d:b9:20:f6:19
ukphy1 at vr1 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063,
model 0x0034
vr2 at pci0 dev 11 function 0 "VIA VT6105M RhineIII" rev 0x96: irq 15, address
00:0d:b9:20:f6:1a
ukphy2 at vr2 phy 1: Generic IEEE 802.3u media interface, rev. 3: OUI 0x004063,
model 0x0034
glxpcib0 at pci0 dev 15 function 0 "AMD CS5536 ISA" rev 0x03: rev 3, 32-bit
3579545Hz timer, watchdog, gpio, i2c
gpio0 at glxpcib0: 32 pins
iic0 at glxpcib0
maxtmp0 at iic0 addr 0x4c: lm86
pciide0 at pci0 dev 15 function 2 "AMD CS5536 IDE" rev 0x01: DMA, channel 0
wired to compatibility, channel 1 wired to compatibility
wd0 at pciide0 channel 0 drive 0: <SanDisk SDCFH-2048>
wd0: 4-sector PIO, LBA, 1953MB, 4001760 sectors
wd0(pciide0:0:0): using PIO mode 4, DMA mode 2
pciide0: channel 1 ignored (disabled)
ohci0 at pci0 dev 15 function 4 "AMD CS5536 USB" rev 0x02: irq 12, version 1.0,
legacy support
ehci0 at pci0 dev 15 function 5 "AMD CS5536 USB" rev 0x02: irq 12
usb0 at ehci0: USB revision 2.0
uhub0 at usb0 "AMD EHCI root hub" rev 2.00/1.00 addr 1
isa0 at glxpcib0
isadma0 at isa0
com0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
com0: console
com1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
pcppi0 at isa0 port 0x61
spkr0 at pcppi0
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
usb1 at ohci0: USB revision 1.0
uhub1 at usb1 "AMD OHCI root hub" rev 1.00/1.00 addr 1
mtrr: K6-family MTRR support (2 registers)
nvram: invalid checksum
uhub2 at uhub0 port 2 "Terminus Technology USB 2.0 Hub [MTT]" rev 2.00/1.00
addr 2
uhub3 at uhub2 port 4 "Terminus Technology USB 2.0 Hub [MTT]" rev 2.00/1.00
addr 3
umass0 at uhub3 port 2 configuration 1 interface 0 "JMicron TrekStor DS pocket
g.u" rev 2.00/0.00 addr 4
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, initiator 0
sd0 at scsibus0 targ 1 lun 0: <TrekStor, DS pocket g.u, > SCSI2 0/direct fixed
serial.1e6800172010062208E0
sd0: 476940MB, 512 bytes/sector, 976773168 sectors
vscsi0 at root
scsibus1 at vscsi0: 256 targets
softraid0 at root
scsibus2 at softraid0: 256 targets
root on wd0a (6793316552eb7bb5.a) swap on wd0b dump on wd0b
clock: unknown CMOS layout
usbdevs:
Controller /dev/usb0:
addr 1: high speed, self powered, config 1, EHCI root hub(0x0000), AMD(0x1022),
rev 1.00
port 1 powered
port 2 addr 2: high speed, self powered, config 1, USB 2.0 Hub [MTT](0x0201),
Terminus Technology(0x1a40), rev 1.00
port 1 powered
port 2 powered
port 3 powered
port 4 addr 3: high speed, self powered, config 1, USB 2.0 Hub [MTT](0x0101),
Terminus Technology(0x1a40), rev 1.00
port 1 powered
port 2 addr 4: high speed, power 2 mA, config 1, TrekStor DS pocket
g.u(0x0017), JMicron(0x1e68), rev 0.00, iSerialNumber 2010062208E0
port 3 powered
port 4 powered
port 5 powered
port 6 powered
port 7 powered
port 3 powered
port 4 powered
Controller /dev/usb1:
addr 1: full speed, self powered, config 1, OHCI root hub(0x0000), AMD(0x1022),
rev 1.00
port 1 powered
port 2 powered
port 3 powered
port 4 powered