Re: kern/59747: usb dead after resume

From: Lukas Ertl <l.ertl_at_univie.ac.at>
Date: Sat, 6 Dec 2003 02:05:25 +0100 (CET)
>
> >Category:       kern
> >Responsible:    freebsd-bugs
> >Synopsis:       usb dead after resume
> >Arrival-Date:   Fri Nov 28 03:10:21 PST 2003

This is probably related: I'm now able to trigger a reproducable panic
when having USB support compiled as a module and going through these
steps:

*) boot up
*) suspend/resume
*) kldload usb

After a few seconds, I drop into ddb, at usb_softschedintr+0xf.

This is the backtrace from kgdb:

Script started on Fri Dec  5 23:55:04 2003
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 messages:
---
Fatal trap 12: page fault while in kernel mode
fault virtual address	= 0x4
fault code		= supervisor read, page not present
instruction pointer	= 0x8:0xc639025f
stack pointer	        = 0x10:0xd77bbcbc
frame pointer	        = 0x10:0xd77bbcc0
code segment		= base 0x0, limit 0xfffff, type 0x1b
			= DPL 0, pres 1, def32 1, gran 1
processor eflags	= interrupt enabled, resume, IOPL = 0
current process		= 22 (irq11: cbb0 cbb1+++)
Dumping 511 MB
 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 352 368 384 400 416 432 448 464 480 496
---
Reading symbols from /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/acpi/acpi.ko.debug...done.
Loaded symbols for /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/acpi/acpi.ko.debug
Reading symbols from /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/linux/linux.ko.debug...done.
Loaded symbols for /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/linux/linux.ko.debug
Reading symbols from /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/usb/usb.ko.debug...done.
Loaded symbols for /usr/obj/usr/src/sys/KORBEN/modules/usr/src/sys/modules/usb/usb.ko.debug
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
240		dumping++;
(kgdb) l *usb_schedsoftintr+0xf
0xc639025f is in usb_schedsoftintr (/usr/src/sys/dev/usb/usb.c:840).
835				callout_reset(&bus->softi, 0, bus->methods->soft_intr,
836				    bus);
837	#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
838		}
839	#else
840	       bus->methods->soft_intr(bus);
841	#endif /* USB_USE_SOFTINTR */
842	}
843
844	#if defined(__NetBSD__) || defined(__OpenBSD__)
(kgdb) where
#0  doadump () at /usr/src/sys/kern/kern_shutdown.c:240
#1  0xc044bf95 in db_fncall (dummy1=0, dummy2=0, dummy3=0,
    dummy4=0xd77bbac4 " AtÀ\f") at /usr/src/sys/ddb/db_command.c:548
#2  0xc044bce2 in db_command (last_cmdp=0xc0743840, cmd_table=0x0,
    aux_cmd_tablep=0xc06f9f70, aux_cmd_tablep_end=0xc06f9f74)
    at /usr/src/sys/ddb/db_command.c:346
#3  0xc044be25 in db_command_loop () at /usr/src/sys/ddb/db_command.c:472
#4  0xc044ee45 in db_trap (type=12, code=0) at /usr/src/sys/ddb/db_trap.c:73
#5  0xc0694bac in kdb_trap (type=12, code=0, regs=0xd77bbc7c)
    at /usr/src/sys/i386/i386/db_interface.c:171
#6  0xc06a5b66 in trap_fatal (frame=0xd77bbc7c, eva=0)
    at /usr/src/sys/i386/i386/trap.c:816
#7  0xc06a5832 in trap_pfault (frame=0xd77bbc7c, usermode=0, eva=4)
    at /usr/src/sys/i386/i386/trap.c:735
#8  0xc06a538d in trap (frame=
      {tf_fs = -1043267560, tf_es = -1043202032, tf_ds = 16, tf_edi = 31, tf_esi = -988827648, tf_ebp = -679756608, tf_isp = -679756632, tf_ebx = 63, tf_edx = 0, tf_ecx = -1056882688, tf_eax = -988827648, tf_trapno = 12, tf_err = 0, tf_eip = -969342369, tf_cs = 8, tf_eflags = 66194, tf_esp = -988827648, tf_ss = -679756580}) at /usr/src/sys/i386/i386/trap.c:420
#9  0xc0696558 in calltrap () at {standard input}:94
#10 0xc6395a32 in uhci_intr1 (sc=0xc50fb000)
    at /usr/src/sys/dev/usb/uhci.c:1257
#11 0xc639587a in uhci_intr (arg=0xc50fb000)
    at /usr/src/sys/dev/usb/uhci.c:1172
#12 0xc0526448 in ithread_loop (arg=0xc1d1a800)
    at /usr/src/sys/kern/kern_intr.c:544
#13 0xc05250c0 in fork_exit (callout=0xc0526270 <ithread_loop>, arg=0x0,
    frame=0x0) at /usr/src/sys/kern/kern_fork.c:793
(kgdb) fr 10
#10 0xc6395a32 in uhci_intr1 (sc=0xc50fb000)
    at /usr/src/sys/dev/usb/uhci.c:1257
1257		usb_schedsoftintr(&sc->sc_bus);
(kgdb) p sc
$1 = (uhci_softc_t *) 0xc50fb000
(kgdb) p sc->sc_bus
$2 = {bdev = 0xc4d1eb00, methods = 0x0, pipe_size = 0, root_hub = 0x0,
  devices = {0x0 <repeats 128 times>}, needs_explore = 0 '\0',
  use_polling = 0 '\0', usbctl = 0x0, stats = {uds_requests = {0, 0, 0, 0}},
  intr_context = 0, no_intrs = 1, usbrev = 2, dmatag = 0x0}
(kgdb) p *sc
$3 = {sc_bus = {bdev = 0xc4d1eb00, methods = 0x0, pipe_size = 0,
    root_hub = 0x0, devices = {0x0 <repeats 128 times>},
    needs_explore = 0 '\0', use_polling = 0 '\0', usbctl = 0x0, stats = {
      uds_requests = {0, 0, 0, 0}}, intr_context = 0, no_intrs = 1,
    usbrev = 2, dmatag = 0x0}, iot = 0, ioh = 6176, sc_size = 0,
  ih = 0xc4d72680, io_res = 0xc4e8ff40, irq_res = 0xc4d169c0,
  sc_pframes = 0x0, sc_dma = {block = 0x0, offs = 0, len = 0}, sc_vframes = {{
      htd = 0x0, etd = 0x0, hqh = 0x0, eqh = 0x0,
      bandwidth = 0} <repeats 128 times>}, sc_lctl_start = 0x0,
  sc_lctl_end = 0x0, sc_hctl_start = 0x0, sc_hctl_end = 0x0,
  sc_bulk_start = 0x0, sc_bulk_end = 0x0, sc_last_qh = 0x0, sc_loops = 0,
  sc_freetds = 0x0, sc_freeqhs = 0x0, sc_free_xfers = {stqh_first = 0x0,
    stqh_last = 0x0}, sc_addr = 0 '\0', sc_conf = 0 '\0',
  sc_saved_sof = 0 '\0', sc_saved_frnum = 0, sc_isreset = 0 '\0',
  sc_suspend = 0 '\0', sc_dying = 1 '\001', sc_intrhead = {lh_first = 0x0},
  sc_ival = 0, sc_intr_xfer = 0x0, sc_poll_handle = {c_links = {sle = {
        sle_next = 0x0}, tqe = {tqe_next = 0x0, tqe_prev = 0x0}}, c_time = 0,
    c_arg = 0x0, c_func = 0, c_flags = 0},
  sc_vendor = "Intel\0\0\0\0\0\0\0\0\0\0", sc_id_vendor = 0, sc_child = 0x0}
(kgdb) quit

Script done on Fri Dec  5 23:56:06 2003

-- 
Lukas Ertl                             eMail: l.ertl_at_univie.ac.at
UNIX Systemadministrator               Tel.:  (+43 1) 4277-14073
Vienna University Computer Center      Fax.:  (+43 1) 4277-9140
University of Vienna                   http://mailbox.univie.ac.at/~le/
Received on Fri Dec 05 2003 - 16:05:58 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:32 UTC