Skip to contentSkip to conversation

Kernel oops when shutting down program using usb device

DISCUSSION Philip Balister 4 participants 5 messages Jul 16, 2008 – Jul 17, 2008

lore
Share & tools
lore
#0 lore raw

The program streams data from the USRP (Universal Software Radio Peripheral) and calculates a transfer rate. It looks like the test completes and the program ooops as it is exiting.

Let me know if I can collect anything else. I am not much of a usb guy :(

Philip

root@beagleboard:~/gnuradio-3.1.2/usrp/host/apps# ./test_usrp_standard_rx -D 200rx_overrun
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
xfered 1.34e+08 bytes in 116 seconds.  1.159e+06 bytes/sec.  cpu time = 1.633
noverruns = 1
------------[ cut here ]------------
WARNING: at lib/kref.c:43 kref_get+0x28/0x44()
Modules linked in: ipv6 pegasus
[<c0037b88>] (dump_stack+0x0/0x14) from [<c0053c44>] (warn_on_slowpath+0x4c/0x68)
[<c0053bf8>] (warn_on_slowpath+0x0/0x68) from [<c0176064>] (kref_get+0x28/0x44)
 r6:c7cbd1c0 r5:c700a880 r4:c700a880
[<c017603c>] (kref_get+0x0/0x44) from [<c01eac18>] (usb_get_urb+0x18/0x20)
 r5:c700a880 r4:c700a880
[<c01eac00>] (usb_get_urb+0x0/0x20) from [<c01e9fa0>] (usb_hcd_flush_endpoint+0xa0/0xcc)
 r5:c700a880 r4:c7cbd1b8
[<c01e9f00>] (usb_hcd_flush_endpoint+0x0/0xcc) from [<c01eb1a0>] (usb_disable_endpoint+0x5c/0x6c)
 r7:c7c9e000 r6:c7cbd548 r5:c7c9e000 r4:c7cbd1c0
[<c01eb144>] (usb_disable_endpoint+0x0/0x6c) from [<c01eb2dc>] (usb_disable_interface+0x34/0x4c)
 r5:00000028 r4:00000001
[<c01eb2a8>] (usb_disable_interface+0x0/0x4c) from [<c01edec0>] (usb_unbind_interface+0x44/0xa0)
 r7:00000000 r6:c041a884 r5:c7fc6200 r4:c7fc6220
[<c01ede7c>] (usb_unbind_interface+0x0/0xa0) from [<c01b99e4>] (__device_release_driver+0x78/0x98)
 r9:c718c000 r8:c7c9e108 r7:00000001 r6:c7fc6200 r5:c041a884
r4:c7fc6220
[<c01b996c>] (__device_release_driver+0x0/0x98) from [<c01b9ab8>] (device_release_driver+0x24/0x30)
 r5:c7fc62c8 r4:c7fc6220
[<c01b9a94>] (device_release_driver+0x0/0x30) from [<c01eda20>] (usb_driver_release_interface+0x54/0x90)
 r5:c7c9e060 r4:c7f91180
[<c01ed9cc>] (usb_driver_release_interface+0x0/0x90) from [<c01f0e74>] (releaseintf+0x58/0x64)
 r7:00000001 r6:c7fc6200 r5:00000002 r4:c7f91180
[<c01f0e1c>] (releaseintf+0x0/0x64) from [<c01f1024>] (usbdev_release+0x80/0xec)
 r7:00000001 r6:c7c9e000 r5:00000002 r4:c7f91180
[<c01f0fa4>] (usbdev_release+0x0/0xec) from [<c00a1efc>] (__fput+0xb8/0x170)
 r9:c718c000 r8:c78ec080 r7:00000006 r6:c700ab80 r5:c707d3d0
r4:00000008
[<c00a1e44>] (__fput+0x0/0x170) from [<c00a2270>] (fput+0x30/0x34)
[<c00a2240>] (fput+0x0/0x34) from [<c009ee78>] (filp_close+0x74/0x80)
[<c009ee04>] (filp_close+0x0/0x80) from [<c00a0390>] (sys_close+0x84/0xb8)
 r7:00000006 r6:00000000 r5:c700ab80 r4:c7fefb40
[<c00a030c>] (sys_close+0x0/0xb8) from [<c0033b00>] (ret_fast_syscall+0x0/0x2c)
 r5:40050250 r4:00012668
---[ end trace fa9f194ff0bebebb ]---
#1 lore raw
Quoted 17 lines · Philip Balister

The program streams data from the USRP (Universal Software Radio Peripheral) and calculates a transfer rate. It looks like the test completes and the program ooops as it is exiting.

Let me know if I can collect anything else. I am not much of a usb guy :(

Philip

root@beagleboard:~/gnuradio-3.1.2/usrp/host/apps# ./test_usrp_standard_rx -D 200rx_overrun
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
xfered 1.34e+08 bytes in 116 seconds. 1.159e+06 bytes/sec. cpu time = 1.633
noverruns = 1

Quoted 2 lines
------------[ cut here ]------------
WARNING: at lib/kref.c:43 kref_get+0x28/0x44()

This is just a warning, not an oops. Nevertheless, it should not happen.

What version of the kernel were you running? On what hardware and using which USB host controller driver? Is the problem reproducible?

Alan Stern

#2 lore raw
Quoted 18 lines · Alan Stern
Quoted 6 lines · Philip Balister

The program streams data from the USRP (Universal Software Radio Peripheral) and calculates a transfer rate. It looks like the test completes and the program ooops as it is exiting.

Let me know if I can collect anything else. I am not much of a usb guy :(

Philip

Quoted 9 lines
root@beagleboard:~/gnuradio-3.1.2/usrp/host/apps# ./test_usrp_standard_rx -D 200rx_overrun
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
xfered 1.34e+08 bytes in 116 seconds.  1.159e+06 bytes/sec.  cpu time = 1.633
noverruns = 1
------------[ cut here ]------------
WARNING: at lib/kref.c:43 kref_get+0x28/0x44()
Quoted 4 lines

This is just a warning, not an oops. Nevertheless, it should not happen.

What version of the kernel were you running? On what hardware and using which USB host controller driver? Is the problem reproducible?

Doh, silly me for leaving out details ....

Beagle Board, OMAP3 based. Kernel is a fairly recent git + some patches. I can backtrack to an exact collection if necessary.

I ran the test program several times and the system hangs when the program ends. I do not think I get the warning message every time though, the system does hang every time.

Philip

#3 lore raw
Quoted 29 lines · Philip Balister
Quoted 22 lines · Alan Stern
Quoted 8 lines · Philip Balister

The program streams data from the USRP (Universal Software Radio Peripheral) and calculates a transfer rate. It looks like the test completes and the program ooops as it is exiting.

Let me know if I can collect anything else. I am not much of a usb guy :(

Philip

Quoted 11 lines
root@beagleboard:~/gnuradio-3.1.2/usrp/host/apps#  
./test_usrp_standard_rx -D 200rx_overrun
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
eth0: set allmulti
xfered 1.34e+08 bytes in 116 seconds.  1.159e+06 bytes/sec.  cpu time 
= 1.633
noverruns = 1
------------[ cut here ]------------
WARNING: at lib/kref.c:43 kref_get+0x28/0x44()
Quoted 5 lines

This is just a warning, not an oops. Nevertheless, it should not happen.

What version of the kernel were you running? On what hardware and using which USB host controller driver? Is the problem reproducible?

Quoted 8 lines

Doh, silly me for leaving out details ....

Beagle Board, OMAP3 based. Kernel is a fairly recent git + some patches. I can backtrack to an exact collection if necessary.

I ran the test program several times and the system hangs when the program ends. I do not think I get the warning message every time though, the system does hang every time.

Hmm... so it's musb. Please, recompile your kernel with CONFIG_USB_MUSB_LOGLEVEL set to 3 and enable also CONFIG_USB_DEBUG and CONFIG_USB_GADGET_DEBUG.

Set sysrq-trigger to 8 (echo 8 > /proc/sysrq-trigger) and musb debug messages will be written to you current console.

Send that output in next mail :-) I'll try to look at it tomorrow with my beagle. Which gadget driver are you using ? Get me the output of uname -r. Which test program is that ? Tell me how to reproduce the WARNING if I don't have your test program.

Signature · 1 line
balbi
#4 lore raw

TI USB 3410 chipset download firmware

Hi

Quoted 19 lines

I am developing driver based on TI 3410 chipset. After downloading firmware using host, the USB bus system needs to be reset. The reset works fine but I cannot use the my target device because interrupt_in_urb is null. I am using usb serial driver on top of ti driver. I can see ttyUSB0 created. After I remove the plug from my host and reconnect the system, the device works to be fine. Can you please let me know what could be going on. Should I close the serial device after downloading firmware. Why hotplug works after removing from system. I have done ti_usb_3410_5052.hotplug at /etc/hotplug.d. Can I execute hotplug from command line and see what is going on. If you have come across similar problem, please let me know. What steps of reinitialisation needs to be done after downloading firmware, in terms of data structures like interrupt_in, endpoints etc or I can probe the device once again.
Thanks
Amruth p.v