Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 2 May 2003 19:42:28 +0100
From:      Michael McGoldrick <michael@mcgoldrick.org>
To:        current@freebsd.org
Subject:   Panic while running with USB debugging on
Message-ID:  <20030502184227.GA854@uriel.mcgoldrick.org>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Not really sure if the two are related. However, I haven't had the same panic
while running WITHOUT USB debugging on and the panic was in USB...
Background: I recently bought a USB Bluetooth adaptor and have been trying to
get it working under FreeBSD using Maksim's latest BT snapshot. Briefly, I
enabled USB_DEBUG and sysctled hw.usb.ugen.debug to 100 (OK, I should find out
what a realistic value for this is...) then twitched my USB mouse, resulting
in the following panic. Unfortunately, I know nothing about the USB stack, so
this is mostly flailing in the dark.

uriel# gdb -k /usr/obj/usr/src/sys/URIEL/kernel.debug vmcore.9 
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
panic: ohci_add_done: addr 0x005b15c0 not found

panic messages:
---
panic: ohci_add_done: addr 0x005b15c0 not found


syncing disks, buffers remaining... 1407 1407 1407 1407 1407 1407 1407 1407
1407
 1407 1407 1407 1407 1407 1407 1407 1407 1407 1407 1407 
giving up on 1246 buffers
Uptime: 19m15s
Dumping 127 MB
ata1: resetting devices ..
done
 16[CTRL-C to abort]  32[CTRL-C to abort]  48 64 80 96 112
---
Reading symbols from
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/linu
x/linux.ko.debug...done.
Loaded symbols for
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/linux/
linux.ko.debug
Reading symbols from
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/acpi
/acpi.ko.debug...done.
Loaded symbols for
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/acpi/a
cpi.ko.debug
Reading symbols from
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/linp
rocfs/linprocfs.ko.debug...done.
Loaded symbols for
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/linpro
cfs/linprocfs.ko.debug
Reading symbols from
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/ipfw
/ipfw.ko.debug...done.
Loaded symbols for
/usr/obj/usr/src/sys/URIEL/modules/usr/src/sys/modules/ipfw/i
pfw.ko.debug
Reading symbols from /boot/kernel/logo_saver.ko...done.
Loaded symbols for /boot/kernel/logo_saver.ko
Reading symbols from /boot/kernel/ng_ubt.ko...done.
Loaded symbols for /boot/kernel/ng_ubt.ko
Reading symbols from /boot/kernel/netgraph.ko...done.
Loaded symbols for /boot/kernel/netgraph.ko
Reading symbols from /boot/kernel/ng_bluetooth.ko...done.
Loaded symbols for /boot/kernel/ng_bluetooth.ko
Reading symbols from /boot/kernel/ng_hci.ko...done.
Loaded symbols for /boot/kernel/ng_hci.ko
Reading symbols from /boot/kernel/ng_l2cap.ko...done.
Loaded symbols for /boot/kernel/ng_l2cap.ko
---Type <return> to continue, or q <return> to quit---
Reading symbols from /boot/kernel/ng_btsocket.ko...done.
Loaded symbols for /boot/kernel/ng_btsocket.ko
Reading symbols from /boot/kernel/ng_socket.ko...done.
Loaded symbols for /boot/kernel/ng_socket.ko
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:238
238             dumping++;
(kgdb) bt
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:238
#1  0xc023aada in boot (howto=256) at /usr/src/sys/kern/kern_shutdown.c:370
#2  0xc023ae2b in panic () at /usr/src/sys/kern/kern_shutdown.c:543
#3  0xc01cfd97 in ohci_add_done (sc=0xc2322000, done=5969344)
    at /usr/src/sys/dev/usb/ohci.c:1305
#4  0xc01cfb09 in ohci_intr1 (sc=0xc2322000)
    at /usr/src/sys/dev/usb/ohci.c:1200
#5  0xc01cf91e in ohci_intr (p=0xc2322000) at /usr/src/sys/dev/usb/ohci.c:1130
#6  0xc0227522 in ithread_loop (arg=0xc2335800)
    at /usr/src/sys/kern/kern_intr.c:537
#7  0xc0226510 in fork_exit (callout=0xc2322000, arg=0x0, frame=0x0)
    at /usr/src/sys/kern/kern_fork.c:793
(kgdb) up 3
#3  0xc01cfd97 in ohci_add_done (sc=0xc2322000, done=5969344)
    at /usr/src/sys/dev/usb/ohci.c:1305
1305                    panic("ohci_add_done: addr 0x%08lx not found\n",
(u_long
)done);
(kgdb) print sc
$1 = (struct ohci_softc *) 0xc2322000
(kgdb) print *sc
$2 = {sc_bus = {bdev = 0xc2335780, methods = 0xc04156a0, pipe_size = 80, 
    root_hub = 0xc2335880, devices = {0x0, 0xc2335880, 0xc24d7b80, 0xc2347100, 
      0x0 <repeats 124 times>}, needs_explore = 0 '\0', use_polling = 0 '\0', 
    usbctl = 0xc233a640, stats = {uds_requests = {95, 0, 2, 1410}}, 
    intr_context = 1, no_intrs = 1454, usbrev = 2}, iot = 1, ioh = 3458580480, 
  sc_size = 0, ih = 0xc2345780, io_res = 0xc23458c0, irq_res = 0xc2345840, 
  sc_hccadma = 0xc2354500 " {k", sc_hcca = 0xc2354500, sc_eds = {0xc2323f80, 
    0xc2323f60, 0xc2323f40, 0xc2323f20, 0xc2323f00, 0xc2323ee0, 0xc2323ec0, 
    0xc2323ea0, 0xc2323e80, 0xc2323e60, 0xc2323e40, 0xc2323e20, 0xc2323e00, 
    0xc2323de0, 0xc2323dc0, 0xc2323da0, 0xc2323d80, 0xc2323d60, 0xc2323d40, 
    0xc2323d20, 0xc2323d00, 0xc2323ce0, 0xc2323cc0, 0xc2323ca0, 0xc2323c80, 
    0xc2323c60, 0xc2323c40, 0xc2323c20, 0xc2323c00, 0xc2323be0, 0xc2323bc0, 
    0xc2323ba0, 0xc2323b80, 0xc2323b60, 0xc2323b40, 0xc2323b20, 0xc2323b00, 
    0xc2323ae0, 0xc2323ac0, 0xc2323aa0, 0xc2323a80, 0xc2323a60, 0xc2323a40, 
    0xc2323a20, 0xc2323a00, 0xc23239e0, 0xc23239c0, 0xc23239a0, 0xc2323980, 
    0xc2323960, 0xc2323940, 0xc2323920, 0xc2323900, 0xc23238e0, 0xc23238c0, 
    0xc23238a0, 0xc2323880, 0xc2323860, 0xc2323840, 0xc2323820, 0xc2323800, 
    0xc23237e0, 0xc23237c0}, sc_bws = {1 <repeats 28 times>, 2, 2, 2, 2}, 
  sc_eintrs = 91, sc_isoc_head = 0xc2323fa0, sc_ctrl_head = 0xc2323fe0, 
  sc_bulk_head = 0xc2323fc0, sc_hash_tds = {{
      lh_first = 0x0} <repeats 98 times>, {lh_first = 0xc103d620}, {
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0xc103d650}, {
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0xc103d680}, {
---Type <return> to continue, or q <return> to quit---
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0xc103d6b0}, {
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0xc103d6e0}, {
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0xc103d710}, {
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0xc103d740}, {
      lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0x0}, {lh_first = 0x0}, {
      lh_first = 0x0}, {lh_first = 0xc103d7a0}, {lh_first = 0x0}, {
      lh_first = 0x0}, {lh_first = 0xc103d7d0}, {lh_first = 0x0}, {
      lh_first = 0x0}}, sc_hash_itds = {{lh_first = 0x0} <repeats 128 times>}, 
  sc_noport = 2, sc_addr = 1 '\001', sc_conf = 1 '\001', 
  sc_freeeds = 0xc23236e0, sc_freetds = 0xc103d770, sc_freeitds = 0x0, 
  sc_free_xfers = {stqh_first = 0xc2817780, stqh_last = 0xc28177c4}, 
  sc_intrxfer = 0xc2335980, sc_sidone = 0x0, sc_sdone = 0x0, 
  sc_vendor = "AcerLabs\0\0\0\0\0\0\0", sc_id_vendor = 0, sc_control = 0, 
  sc_intre = 0, sc_overrun_cnt = 0, sc_overrun_ntc = {tv_sec = 0, 
    tv_usec = 0}, sc_tmo_rhsc = {c_links = {sle = {sle_next = 0xc04532b0}, 
      tqe = {tqe_next = 0xc04532b0, tqe_prev = 0xc4a39c50}}, c_time = 34470, 
    c_arg = 0xc2322000, c_func = 0, c_flags = 2}, sc_child = 0x0, 
  sc_dying = 0 '\0'}
(kgdb) print *done
---Can't read userspace from dump, or kernel process---

(kgdb) up 1
#4  0xc01cfb09 in ohci_intr1 (sc=0xc2322000)
    at /usr/src/sys/dev/usb/ohci.c:1200
1200                    ohci_add_done(sc, done &~ OHCI_DONE_INTRS);
(kgdb) print done
$3 = 5969728
(kgdb) print *done
---Can't read userspace from dump, or kernel process---

(kgdb) down 1
#3  0xc01cfd97 in ohci_add_done (sc=0xc2322000, done=5969344)
    at /usr/src/sys/dev/usb/ohci.c:1305
1305                    panic("ohci_add_done: addr 0x%08lx not found\n",
(u_long
)done);
(kgdb) l
1300                            done = le32toh(sitd->itd.itd_nextitd);
1301                            sidone = sitd;
1302                            DPRINTFN(5,("add ITD %p\n", sitd));
1303                            continue;
1304                    }
1305                    panic("ohci_add_done: addr 0x%08lx not found\n",
(u_long
)done);
1306            }
1307
1308            /* sdone & sidone now hold the done lists. */
1309            /* Put them on the already processed lists. */

Dmesg attached. (I think the errors at the bottom are down to a dodgy ACPI
timecounter.)
Apologies for the verbosity of this message.
Sources as of: May  1 18:02:41 BST 2003
from cvsup2


-- 
Michael McGoldrick: mmcgoldrick@linuxdriven.net 

[-- Attachment #2 --]
Copyright (c) 1992-2003 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 5.0-CURRENT #39: Fri May  2 11:09:35 BST 2003
    root@uriel.mcgoldrick.org:/usr/obj/usr/src/sys/URIEL
Preloaded elf kernel "/boot/kernel/kernel" at 0xc057d000.
Preloaded userconfig_script "/boot/kernel.conf" at 0xc057d1cc.
Preloaded elf module "/boot/kernel/linux.ko" at 0xc057d21c.
Preloaded elf module "/boot/kernel/acpi.ko" at 0xc057d2c8.
Timecounter "i8254"  frequency 1193182 Hz
Timecounter "TSC"  frequency 546619481 Hz
CPU: Intel Pentium III (546.62-MHz 686-class CPU)
  Origin = "GenuineIntel"  Id = 0x681  Stepping = 1
  Features=0x383f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
real memory  = 134152192 (127 MB)
avail memory = 124145664 (118 MB)
Pentium Pro MTRR support enabled
npx0: <math processor> on motherboard
npx0: INT 16 interface
acpi0: <Acer   M1615   > on motherboard
    ACPI-0603: *** Error: GPE0 block (GPE 0 to 15) overlaps the GPE1 block (GPE 10 to 25) - Ignoring GPE1
pcibios: BIOS version 2.10
Using $PIR table, 8 entries at 0xc00f7900
acpi_bus_number: root bus has no _BBN, assuming 0
acpi0: power button is handled as a fixed feature programming model.
Timecounter "ACPI-safe"  frequency 3579545 Hz
acpi_bus_number: root bus has no _BBN, assuming 0
acpi_timer0: <32-bit timer at 3.579545MHz> port 0xf008-0xf00b on acpi0
acpi_cpu0: <CPU> port 0x530-0x537 on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
agp0: <Ali Generic host to PCI bridge> mem 0xe0000000-0xe3ffffff at device 0.0 on pci0
pcib1: <PCIBIOS PCI-PCI bridge> at device 1.0 on pci0
pci1: <PCI bus> on pcib1
pci1: <display, VGA> at device 0.0 (no driver attached)
ohci0: <AcerLabs M5237 (Aladdin-V) USB controller> mem 0x90800000-0x90800fff irq 11 at device 2.0 on pci0
usb0: OHCI version 1.0, legacy support
usb0: <AcerLabs M5237 (Aladdin-V) USB controller> on ohci0
usb0: USB revision 1.0
uhub0: AcerLabs OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub0: 2 ports with 2 removable, self powered
ugen0: Broadcom product 0x2033, rev 1.01/0.a0, addr 2
ums0: Microsoft Microsoft Wheel Mouse Optical\M-., rev 1.10/1.21, addr 3, iclass 3/1
ums0: 3 buttons and Z dir.
isab0: <PCI-ISA bridge> at device 7.0 on pci0
isa0: <ISA bus> on isab0
csa0: <CS4280/CS4614/CS4622/CS4624/CS4630> mem 0x90500000-0x905fffff,0x90400000-0x90400fff irq 5 at device 11.0 on pci0
csa: card is Unknown/invalid SSID (CS4614)
pcm0: <CS461x PCM Audio> on csa0
pcm0: <Cirrus Logic CS4297 AC97 Codec>
atapci0: <AcerLabs Aladdin UDMA33 controller> port 0x8400-0x840f at device 15.0 on pci0
ata0: at 0x1f0 irq 14 on atapci0
ata1: at 0x170 irq 15 on atapci0
rl0: <RealTek 8139 10/100BaseTX> port 0x8000-0x80ff mem 0x82100000-0x821000ff irq 10 at device 19.0 on pci0
rl0: Realtek 8139B detected. Warning, this may be unstable in autoselect mode
rl0: Ethernet address: 00:60:67:76:6e:bf
miibus0: <MII bus> on rl0
rlphy0: <RealTek internal media interface> on miibus0
rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
atkbdc0: <Keyboard controller (i8042)> port 0x64,0x60 irq 1 on acpi0
atkbd0: <AT Keyboard> flags 0x1 irq 1 on atkbdc0
kbd0 at atkbd0
fdc0: <Enhanced floppy controller (i82077, NE72065 or clone)> port 0x3f7,0x3f0-0x3f5 irq 6 drq 2 on acpi0
fdc0: FIFO enabled, 8 bytes threshold
fd0: <1440-KB 3.5" drive> on fdc0 drive 0
ppc0 port 0x378-0x37f irq 7 on acpi0
ppc0: Generic chipset (EPP/NIBBLE) in COMPATIBLE mode
ppbus0: <Parallel port bus> on ppc0
plip0: <PLIP network interface> on ppbus0
lpt0: <Printer> on ppbus0
lpt0: Interrupt-driven port
ppi0: <Parallel I/O> on ppbus0
sio0 port 0x3f8-0x3ff irq 4 on acpi0
sio0: type 16550A
sio1 port 0x2f8-0x2ff irq 3 on acpi0
sio1: type 16550A
sc0: <System console> at flags 0x100 on isa0
sc0: VGA <16 virtual consoles, flags=0x300>
vga0: <Generic ISA VGA> at port 0x3c0-0x3df iomem 0xa0000-0xbffff on isa0
Timecounters tick every 10.000 msec
ad0: 9768MB <ST310212A> [19846/16/63] at ata0-master UDMA33
ad2: 39266MB <IBM-DTLA-305040> [79780/16/63] at ata1-master UDMA33
acd0: CD-RW <SAMSUNG COMBO SM-304B> at ata0-slave PIO4
Mounting root from ufs:/dev/ad2s2a
WARNING: / was not properly dismounted
WARNING: /usr was not properly dismounted
/usr: mount pending error: blocks 140 files 44
/usr: superblock summary recomputed
warning: KLD '/boot/kernel/linprocfs.ko' is newer than the linker.hints file
warning: KLD '/boot/kernel/ipfw.ko' is newer than the linker.hints file
ipfw2 initialized, divert disabled, rule-based forwarding enabled, default to deny, logging disabled

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030502184227.GA854>