Bug 113432

Summary: [ucom] WARNING: attempt to net_add_domain(netgraph) after domainfinalize()
Product: Base System Reporter: Nikolay Pavlov <quetzal>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me    
Priority: Normal    
Version: 7.0-CURRENT   
Hardware: Any   
OS: Any   

Description Nikolay Pavlov 2007-06-06 22:20:08 UTC
If i am trying to detach my USB CDMA USB modem while mpd4
session is running i see this message from kernel:

Jun  6 17:02:44 orion root: Unknown USB device: vendor 0x16d8 product 0x5533 bus uhub1
Jun  6 17:02:44 orion kernel: ucom0: <CMOTECH CO., LTD. CMOTECH CDMA Technologies, class 2/0, rev 2.00/0.00, addr 2> on uhub1
Jun  6 17:02:44 orion kernel: ucom0: CMOTECH CO., LTD. CMOTECH CDMA Technologies, rev 2.00/0.00, addr 2, iclass 2/2
Jun  6 17:02:44 orion kernel: ucom0: data interface 1, has CM over data, has break
Jun  6 17:02:44 orion kernel: ucom0: status change notification available

I am detaching modem at that point...

Jun  6 17:03:04 orion kernel: WARNING: attempt to net_add_domain(netgraph) after domainfinalize()
Jun  6 17:03:09 orion kernel: Sleeping on "usbdly" with the following non-sleepable locks held:
Jun  6 17:03:09 orion kernel: exclusive sleep mutex ng_tty node+queue r = 0 (0xc712b6a0) locked @ /usr/src/sys/modules/netgraph/tty/../../../netgraph/ng_tt
y.c:207
Jun  6 17:03:09 orion kernel: KDB: stack backtrace:
Jun  6 17:03:09 orion kernel: db_trace_self_wrapper(c0a2f828,e69179d8,c07798cd,c0a2fbeb,e69179ec,...) at db_trace_self_wrapper+0x26
Jun  6 17:03:09 orion kernel: kdb_backtrace(c0a2fbeb,e69179ec,4,1,0,...) at kdb_backtrace+0x29
Jun  6 17:03:09 orion kernel: witness_warn(5,0,c0a2d773,c0a21ac6,0,...) at witness_warn+0x1cd
Jun  6 17:03:09 orion kernel: _sleep(c0b36e14,0,0,c0a21ac6,3,...) at _sleep+0x5f
Jun  6 17:03:09 orion kernel: pause(c0a21ac6,3,e6917a7c,c06b7ae3,c4002000,...) at pause+0x47
Jun  6 17:03:09 orion kernel: usb_delay_ms(c4002000,2,c4e23e98,c0adc224,c7109c62,...) at usb_delay_ms+0x5e
Jun  6 17:03:09 orion kernel: uhci_abort_xfer(e6917a98,c06c831e,c68efc00,c4a08700,c4008800,...) at uhci_abort_xfer+0x163
Jun  6 17:03:09 orion kernel: uhci_device_bulk_abort(c68efc00,c4a08700,c4008800,e6917aa4,c0d0adc3,...) at uhci_device_bulk_abort+0x10
Jun  6 17:03:09 orion kernel: usbd_abort_pipe(c694dc80,e6917ab8,c0d0b56f,c4008800,3,...) at usbd_abort_pipe+0x1e
Jun  6 17:03:09 orion kernel: ucomstopread(c4008800,3,2,e6917ad4,c0788436,...) at ucomstopread+0x23
Jun  6 17:03:09 orion kernel: ucomstop(c4008800,3,c712b680,0,c712b6a0,...) at ucomstop+0x5f
Jun  6 17:03:09 orion kernel: ttyflush(c4008800,3,c7142095,c71420bd,1,...) at ttyflush+0x46
Jun  6 17:03:09 orion kernel: ngt_open(c5a36100,c4008800,368,367,c0b3d494,...) at ngt_open+0x16b
Jun  6 17:03:09 orion kernel: ttioctl(c4008800,8004741b,c6732000,7,c4e23e00,...) at ttioctl+0xdf8
Jun  6 17:03:09 orion kernel: ttyioctl(c5a36100,8004741b,c6732000,7,c4e23e00,...) at ttyioctl+0x11a
Jun  6 17:03:09 orion kernel: giant_ioctl(c5a36100,8004741b,c6732000,7,c4e23e00,...) at giant_ioctl+0x56
Jun  6 17:03:09 orion kernel: devfs_ioctl_f(c560e870,8004741b,c6732000,c6512c00,c4e23e00,...) at devfs_ioctl_f+0xc9
Jun  6 17:03:09 orion kernel: kern_ioctl(c4e23e00,9,8004741b,c6732000,917d38,...) at kern_ioctl+0x243
Jun  6 17:03:09 orion kernel: ioctl(c4e23e00,e6917cfc,c,c4e23e00,c0ad6430,...) at ioctl+0x134
Jun  6 17:03:09 orion kernel: syscall(e6917d38) at syscall+0x293
Jun  6 17:03:09 orion kernel: Xint0x80_syscall() at Xint0x80_syscall+0x20
Jun  6 17:03:09 orion kernel: --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x283f974f, esp = 0xbf8fd94c, ebp = 0xbf8fdc78 ---
Jun  6 17:03:09 orion kernel: lock order reversal: (Giant after non-sleepable)
Jun  6 17:03:09 orion kernel: 1st 0xc712b6a0 ng_tty node+queue (ng_tty node+queue) @ /usr/src/sys/modules/netgraph/tty/../../../netgraph/ng_tty.c:207
Jun  6 17:03:09 orion kernel: 2nd 0xc0b368c8 Giant (Giant) @ /usr/src/sys/kern/kern_synch.c:235
Jun  6 17:03:09 orion kernel: KDB: stack backtrace:
Jun  6 17:03:09 orion kernel: db_trace_self_wrapper(c0a2f828,e69179b0,c077a74e,c0a31cce,c0b368c8,...) at db_trace_self_wrapper+0x26
Jun  6 17:03:09 orion kernel: kdb_backtrace(c0a31cce,c0b368c8,c0a44c78,c0a44c78,c0a2d728,...) at kdb_backtrace+0x29
Jun  6 17:03:09 orion kernel: witness_checkorder(c0b368c8,9,c0a2d728,eb,c0a30425,...) at witness_checkorder+0x6de
Jun  6 17:03:09 orion kernel: _mtx_lock_flags(c0b368c8,0,c0a2d728,eb,0,...) at _mtx_lock_flags+0xbc
Jun  6 17:03:09 orion kernel: _sleep(c0b36e14,0,0,c0a21ac6,3,...) at _sleep+0x3e9
Jun  6 17:03:09 orion kernel: pause(c0a21ac6,3,e6917a7c,c06b7ae3,c4002000,...) at pause+0x47
Jun  6 17:03:09 orion kernel: usb_delay_ms(c4002000,2,c4e23e98,c0adc224,c7109c62,...) at usb_delay_ms+0x5e
Jun  6 17:03:09 orion kernel: uhci_abort_xfer(e6917a98,c06c831e,c68efc00,c4a08700,c4008800,...) at uhci_abort_xfer+0x163
Jun  6 17:03:09 orion kernel: uhci_device_bulk_abort(c68efc00,c4a08700,c4008800,e6917aa4,c0d0adc3,...) at uhci_device_bulk_abort+0x10
Jun  6 17:03:09 orion kernel: usbd_abort_pipe(c694dc80,e6917ab8,c0d0b56f,c4008800,3,...) at usbd_abort_pipe+0x1e
Jun  6 17:03:09 orion kernel: ucomstopread(c4008800,3,2,e6917ad4,c0788436,...) at ucomstopread+0x23
Jun  6 17:03:09 orion kernel: ucomstop(c4008800,3,c712b680,0,c712b6a0,...) at ucomstop+0x5f
Jun  6 17:03:09 orion kernel: ttyflush(c4008800,3,c7142095,c71420bd,1,...) at ttyflush+0x46
Jun  6 17:03:09 orion kernel: ngt_open(c5a36100,c4008800,368,367,c0b3d494,...) at ngt_open+0x16b
Jun  6 17:03:09 orion kernel: ttioctl(c4008800,8004741b,c6732000,7,c4e23e00,...) at ttioctl+0xdf8
Jun  6 17:03:09 orion kernel: ttyioctl(c5a36100,8004741b,c6732000,7,c4e23e00,...) at ttyioctl+0x11a
Jun  6 17:03:09 orion kernel: giant_ioctl(c5a36100,8004741b,c6732000,7,c4e23e00,...) at giant_ioctl+0x56
Jun  6 17:03:09 orion kernel: devfs_ioctl_f(c560e870,8004741b,c6732000,c6512c00,c4e23e00,...) at devfs_ioctl_f+0xc9
Jun  6 17:03:09 orion kernel: kern_ioctl(c4e23e00,9,8004741b,c6732000,917d38,...) at kern_ioctl+0x243
Jun  6 17:03:09 orion kernel: ioctl(c4e23e00,e6917cfc,c,c4e23e00,c0ad6430,...) at ioctl+0x134
Jun  6 17:03:09 orion kernel: syscall(e6917d38) at syscall+0x293
Jun  6 17:03:09 orion kernel: Xint0x80_syscall() at Xint0x80_syscall+0x20
Jun  6 17:03:09 orion kernel: --- syscall (54, FreeBSD ELF32, ioctl), eip = 0x283f974f, esp = 0xbf8fd94c, ebp = 0xbf8fdc78 ---
Jun  6 17:03:41 orion kernel: bfe0: link state changed to DOWN
Jun  6 17:04:02 orion kernel: ucom0: ucomreadcb: IOERROR
Jun  6 17:04:02 orion kernel: ucom0: at uhub1 port 1 (addr 2) disconnected
Jun  6 17:04:03 orion kernel: ucom0: detached

How-To-Repeat: Try to install mpd4 from ports connect it to your ISP via USB Hayes
compatable modem and detach modem while mpd session is running. I think
all usb modems is affected by this issue.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2007-06-08 17:29:18 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-usb

This sounds as though it may be a problem in USB.
Comment 2 Emil Cazamir 2008-08-16 21:30:05 UTC
Hello!

I received a similar message when I tried to use ethernet interface renaming, at the time when starting pppoed on a renamed interface. I believe that the problem is somewhere at the netgraph level, in conjunction with ng_pppoe.

How to repeat:
use lines similar to the following, into a system running FreeBSD 7.0:
/etc/rc.conf:
ifconfig_em1_name="lan0"
pppoed_enable="YES"
pppoed_interface="lan0"
-- other /etc/rc.conf parameters --

and check the messages at the time when pppoed starts.

Best regards,
Emil Cazamir
FreeBSD user since 4.3-RELEASE


      
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2009-08-31 12:55:54 UTC
Responsible Changed
From-To: freebsd-usb->freebsd-net

I believe this is more likely to be a problem at the netgraph 
level rather than USB.
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:46 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