Bug 116561 - [umodem] [panic] RELENG_6 umodem panic "trying to sleep while sleeping is prohibited"
Summary: [umodem] [panic] RELENG_6 umodem panic "trying to sleep while sleeping is pro...
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: Unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2007-09-22 22:20 UTC by Dmitry Pryanishnikov
Modified: 2022-10-17 12:17 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Pryanishnikov 2007-09-22 22:20:01 UTC
I'm using USB modem C-motech CCU-550 under RELENG_6 with the simple patch:

--- sys/dev/usb/usbdevs.orig    Fri May  4 00:35:48 2007
+++ sys/dev/usb/usbdevs Wed May 23 22:47:27 2007
@@ -773,6 +773,7 @@
 
 /* CMOTECH products */
 product CMOTECH CNU510         0x5141  CMOTECH CDMA Technologies USB modem
+product CMOTECH CCU550         0x5533  CDMA 2000 1xRTT/1xEVDO USB modem
 product CMOTECH CNU550         0x5543  CDMA 2000 1xRTT/1xEVDO USB modem
 
 /* Compaq products */
--- sys/dev/usb/usb_quirks.c.orig       Fri May  4 00:35:48 2007
+++ sys/dev/usb/usb_quirks.c    Wed May 23 22:48:18 2007
@@ -82,6 +82,8 @@
  { USB_VENDOR_LOGITECH, USB_PRODUCT_LOGITECH_UN53B, ANY, { UQ_NO_STRINGS }},
  { USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CNU510,
         ANY, { UQ_ASSUME_CM_OVER_DATA }},
+ { USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CCU550,
+        ANY, { UQ_ASSUME_CM_OVER_DATA }},
  { USB_VENDOR_CMOTECH, USB_PRODUCT_CMOTECH_CNU550,
         ANY, { UQ_ASSUME_CM_OVER_DATA }},
  { USB_VENDOR_CURITEL, USB_PRODUCT_CURITEL_HX550C,


Modems works, but I'm getting seldom irregular panics like this:

#11 0xc049d313 in panic (fmt=0xc05f4cc3 "trying to sleep while sleeping is prohibited") at /usr/RELENG_6/src/sys/kern/kern_shutdown.c:549
        td = (struct thread *) 0xc2125300
        bootopt = 256
        newpanic = 1
        ap = 0xcbb7facc "\001"
        buf = "trying to sleep while sleeping is prohibited", '\0' <repeats 211 times>
#12 0xc04ba7c0 in sleepq_add (wchan=0xc21fd900, lock=0x0, wmesg=0x12 <Address 0x12 out of bounds>, flags=0) at /usr/RELENG_6/src/sys/kern/subr_sleepqueue.c:278
        sc = (struct sleepqueue_chain *) 0xc064a9a8
        sq = (struct sleepqueue *) 0xc1015000
        td = (struct thread *) 0xc2125300
#13 0xc04a2b04 in msleep (ident=0xc21fd900, mtx=0x0, priority=76, wmesg=0xc07943eb "usbsyn", timo=0) at /usr/RELENG_6/src/sys/kern/kern_synch.c:191
        _giantcnt = 1
        Giant__wf = 0x200 <Address 0x200 out of bounds>
        Giant__wl = -1038100187
        td = (struct thread *) 0xc2125300
        p = (struct proc *) 0x1
        catch = 0
        rval = 0
        flags = 0
        mtx__wf = 0xc21fd970 ""
        mtx__wl = 0
#14 0xc07862b5 in usbd_transfer (xfer=0xc21fd900) at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/usbdi.c:344
        pipe = 0xc2385300
        err = USBD_IN_PROGRESS
        size = 0
#15 0xc0786aeb in usbd_do_request_flags_pipe (dev=0xc2385380, pipe=0x12, req=0xcbb7fbbc, data=0x0, flags=0, actlen=0x0, timeout=5000)
    at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/usbdi.c:982
        xfer = 0xc21fd900
        err = USBD_NORMAL_COMPLETION
#16 0xc0786bd0 in usbd_do_request_flags (dev=0x12, req=0xcbb7fbbc, data=0x0, flags=0, actlen=0x0, timo=5000)
    at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/usbdi.c:953
No locals.
#17 0xc0786bee in usbd_do_request (dev=0xc2385380, req=0xcbb7fbbc, data=0x0) at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/usbdi.c:945
No locals.
#18 0xc07c1031 in umodem_set_line_state (sc=0x0) at /usr/RELENG_6/src/sys/modules/umodem/../../dev/usb/umodem.c:703
        req = {bmRequestType = 33 '!', bRequest = 34 '"', wValue = "\001", wIndex = "\000", wLength = "\000"}
        ls = 18
#19 0xc07c10bb in umodem_set (addr=0xc23a6d00, portno=-1, reg=18, onoff=0) at /usr/RELENG_6/src/sys/modules/umodem/../../dev/usb/umodem.c:686
No locals.
#20 0xc07c4cef in ucommodem (tp=0x12, sigon=0, sigoff=-1056878592) at /usr/RELENG_6/src/sys/modules/ucom/../../dev/usb/ucom.c:427
        sc = (struct ucom_softc *) 0xc23a6d00
        mcr = 18
        msr = 18
        onoff = 18
#21 0xc07c5074 in ucomstart (tp=0xc23a9000) at /usr/RELENG_6/src/sys/modules/ucom/../../dev/usb/ucom.c:552
        sc = (struct ucom_softc *) 0xc23a6d00
        cbp = (struct cblock *) 0x12
        err = USBD_INTERRUPTED
        data = (
    u_char *) 0xc1015000 "Copyright (c) 1992-2007 The FreeBSD Project.\nCopyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994\n\tThe Regents of the University of California. All rights reserved.\nFreeBSD is a re"...
        cnt = -1036349440
#22 0xc04ccfe6 in ttstart (tp=0x12) at /usr/RELENG_6/src/sys/kern/tty.c:1615
No locals.
#23 0xc04ccf82 in ttyblock (tp=0xc23a9000) at /usr/RELENG_6/src/sys/kern/tty.c:1568
No locals.
#24 0xc07c53ee in ucomreadcb (xfer=0xc2b55700, p=0xc23a6d00, status=3417832504) at /usr/RELENG_6/src/sys/modules/ucom/../../dev/usb/ucom.c:773
        tp = (struct tty *) 0xc23a9000
        err = USBD_INTERRUPTED
        cc = 64
        cp = (u_char *) 0xc2216e00 "6\035&#9571;&#1094;c&#1070;\nd\200&#1049;26W\\\220\024*&#1092;&#9569;&#1087;\004&#9554;&#1077;GN\f\201\200s\233\225&#1051;&#1074;&#9561;\003U&#9552;&#1063;\004&#1085;\006"
        lostcc = -877134792
#25 0xc0786a34 in usb_transfer_complete (xfer=0xc2b55700) at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/usbdi.c:863
        pipe = 0xc2b86b80
        dmap = (usb_dma_t *) 0xc2b5573c
        sync = 0
        erred = 0
        repeat = 0
        polling = 0
#26 0xc0789430 in uhci_idone (ii=0x12) at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/uhci.c:1499
        xfer = 0xc2b55700
        upipe = (struct uhci_pipe *) 0xc2b86b80
        std = (uhci_soft_td_t *) 0x0
        status = 0
        nstatus = 18
        actlen = 64
#27 0xc0789584 in uhci_softintr (v=0xc21dd000) at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/uhci.c:1374
        ii = (uhci_intr_info_t *) 0xc2b55770
        nextii = (uhci_intr_info_t *) 0xc2b02e70
#28 0xc078927b in uhci_intr1 (sc=0xc21dd000) at /usr/RELENG_6/src/sys/modules/usb/../../dev/usb/uhci.c:1274
        status = 1
        ack = 1
#29 0xc0489da2 in ithread_execute_handlers (p=0xc21d4000, ie=0xc2164280) at /usr/RELENG_6/src/sys/kern/kern_intr.c:682
        ih = (struct intr_handler *) 0xc220a000
        ihn = (struct intr_handler *) 0xc2237100
#30 0xc0489ed2 in ithread_loop (arg=0xc2202b30) at /usr/RELENG_6/src/sys/kern/kern_intr.c:765
        intr_event = (struct intr_thread *) 0xc2202b30
        ie = (struct intr_event *) 0xc2164280
        td = (struct thread *) 0xc2125300
        p = (struct proc *) 0xc21d4000
        __func__ = "ithread_loop"
#31 0xc0489010 in fork_exit (callout=0xc0489e6c <ithread_loop>, arg=0xc2202b30, frame=0xcbb7fd38) at /usr/RELENG_6/src/sys/kern/kern_fork.c:821
        p = (struct proc *) 0xc21d4000
        td = (struct thread *) 0x0
#32 0xc05b46cc in fork_trampoline () at /usr/RELENG_6/src/sys/i386/i386/exception.s:208
No locals.

How-To-Repeat: Alas, repeatability of the bug is very poor. I'm using the modem on the notebook
w/o serial port, and most panics happen during the X.org session, so computer
just instantly reboots (and I can't use serial console). Luckily, several times
this happened in text console, so I've managed to get a crash dump. I'm ready
to provide further analysis data based on it. I've compared /sys/dev/usb
contents of RELENG_6 source tree as of 4 May 2007 with current state, and I
can't see changes that could improve things.
Comment 1 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:24 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 2 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:17:07 UTC
Keyword: 

    crash

– in lieu of summary line prefix: 

    [panic]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>