Menu

usbb2k_api zombies

Help
2007-08-11
2013-04-30
  • Chris Worley

    Chris Worley - 2007-08-11

    Kernel/distro 2.6.18.8-0.5/OpenSuSE 10.2
    usbb2k-api-mod-2.2/kb2kskype-0.3.4a

    Running usbb2k_api from init, inittab entry looks like:

      sk:35:respawn:/usr/bin/usbb2k_api

    (I comment-out the "deamonize" call before compiling so this will work.)

    After running for about 24 hours, usbb2k_api becomes unresponsive and unkillable.  (This is not due to the inittab "respawn" restarting it and looking as if it didn't die, as the pid doesn't change.)

    "Ps" reports it's in a "Dsl" state: Uninterruptible sleep.

    Resources in use include:

    # lsof | grep 5271
    ...
    usbb2k_ap  5271       root    0u      CHR        5,1                 3465 /dev/console
    usbb2k_ap  5271       root    1u      CHR        5,1                 3465 /dev/console
    usbb2k_ap  5271       root    2u      CHR        5,1                 3465 /dev/console
    usbb2k_ap  5271       root    3u     unix 0xf7197680                14745 /tmp/usbb2k.sock
    usbb2k_ap  5271       root    4u     unix 0xf592d900                14747 /tmp/usbb2k.sock
    usbb2k_ap  5271       root    5u     unix 0xf5615980                18028 socket
    usbb2k_ap  5271       root    6u      CHR    189,129                 7571 /dev/bus/usb/002/002

    Unplugging/replugging in the USB device doesn't help... reboot is all that does.  I can't keep rebooting my server, so I need to find a solution.

    Suggestions?

    Note that for the first few hours, everything runs as expected.

    Thanks,

    Chris

     
    • Simon_6162

      Simon_6162 - 2007-08-12

      My only thought is that you have a cron job or similar deleting the socket in /tmp
      Can you confirm the socket file stays in tmp after it crashes / locks up ?

       
    • Chris Worley

      Chris Worley - 2007-08-12

      This one?:

      # ls -l /tmp/usbb2k.sock
      srw-rw-rw- 1 root root 0 Aug  9 18:53 /tmp/usbb2k.sock

      Is there a way to stick something in the socket that might wake it up?

       
    • Chris Worley

      Chris Worley - 2007-08-14

      I do see some messages right as I loose communications:

      Aug 14 10:32:49 server usbb2k_api[5866]: RECV CMD:[DIALTONE OFF]
      Aug 14 10:32:49 server usbb2k_api[5866]: commande not def
      Aug 14 10:33:06 server usbb2k_api[5866]: RECV CMD:[SWITCH USB]
      Aug 14 10:33:06 server kernel: hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
      Aug 14 10:33:06 server kernel: usb 4-1: USB disconnect, address 2

      Note also, that I'm running the stock usbb2k_api, w/o my "Daemonize" change.

       
    • Chris Worley

      Chris Worley - 2007-08-16

      Any ideas would be appreciated...  I can't keep rebooting my server... I'm willing to debug if somebody can get me started.  Is anybody else using OpenSuSE?

      This morning's hang was preceded w/ these messages (I was trying not to touch the k2b app/GUI at all, to see if that helped, and only use the phone and Skype):

      Aug 16 08:48:10 server kernel: usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd usbb2k_api rqt 33 rq 9 len 16 ret -71
      Aug 16 08:48:10 server usbb2k_api[8580]: error send check_handset:-71 [804d408]
      Aug 16 08:48:10 server usbb2k_api[8580]: error: 0
      Aug 16 08:48:10 server usbb2k_api[8580]: handset Error
      Aug 16 08:48:10 server kernel: usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd usbb2k_api rqt 33 rq 9 len 16 ret -71
      Aug 16 08:48:10 server usbb2k_api[8580]: error send check_handset:-71 [804d408]
      Aug 16 08:48:10 server usbb2k_api[8580]: RECV CMD:[DIALTONE OFF]
      Aug 16 08:48:10 server usbb2k_api[8580]: commande not def
      Aug 16 08:48:10 server usbb2k_api[8580]: error: 0
      Aug 16 08:48:10 server usbb2k_api[8580]: handset Error
      Aug 16 08:48:10 server kernel: usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd usbb2k_api rqt 33 rq 9 len 16 ret -71
      Aug 16 08:48:10 server usbb2k_api[8580]: error send check_handset:-71 [804d408]
      Aug 16 08:48:10 server kernel: hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
      Aug 16 08:48:10 server kernel: usb 4-1: USB disconnect, address 2

       
    • Alatariel

      Alatariel - 2007-08-17

      me not being a programmer and defintely not a programmer of this code I just have two guesses

      1) something in your udev-setup? changing rules? some other equipment affecting yours?
      2) something in the init-setup?

      have you tried installing both programsuites (usbb2k and kb2kskype) as packages and doublechecked how that works? I have set the packages to start/stop at boot-time by using chkconfig-registering where applicable, not this inittab-variant ...
      But you might want to wait for the package version I am in the middle of building :)

      //Alatariel

       
    • Chris Worley

      Chris Worley - 2007-08-21

      I'm guessing this is a USB issue for SuSE 10.2.

      What should the udev and usb setup look like for this device?

      I built from tarball, as rpm's didn't exist for OpenSuSE 10.2.

       
    • Chris Worley

      Chris Worley - 2007-08-31

      Given no response to the previous, or any debugging ideas, I tried two things:

      1) Disconnect the POTS line
      2) Run the old version of usbb2k_api

      It seemed to hold rock-solid for 24 hours, then, in the middle of a call, it zombied.  The call just went silent, although Skype said the call was still in progress.  Upon hitting the hang-up PB, skype crashed. 

      /var/log/messages had some data points:

      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:360: frame 0 active: -84
      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:360: frame 0 active: -84
      Aug 31 09:15:19 xserver kernel: usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd usbb2k_api rqt 33 rq 9 len 16 ret -71
      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:360: frame 0 active: -84
      Aug 31 09:15:19 xserver last message repeated 63 times
      Aug 31 09:15:19 xserver kernel: usb 4-1: usbfs: USBDEVFS_CONTROL failed cmd usbb2k_api rqt 33 rq 9 len 16 ret -71
      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:360: frame 0 active: -84
      Aug 31 09:15:19 xserver last message repeated 25 times
      Aug 31 09:15:19 xserver kernel: hub 4-0:1.0: port 1 disabled by hub (EMI?), re-enabling...
      Aug 31 09:15:19 xserver kernel: usb 4-1: USB disconnect, address 2
      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:360: frame 0 active: -84
      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:668: cannot submit urb (err = -19)
      Aug 31 09:15:19 xserver kernel: ALSA sound/usb/usbaudio.c:668: cannot submit urb (err = -19)
      Aug 31 09:16:00 xserver usbb2k_api: Client disconnect

      It looks like when I hit the hang-up PB and Skype crashed at 9:16:00, usbb2k_api was alive enough to print a message.

      At this point though, it's a zombie again, with no way to restart it without a complete system reboot.

       
    • Simon_6162

      Simon_6162 - 2007-08-31

      Hi, sorry I've been very busy ove the last few weeks!

      That looks more like your usb device is disconnecting. What happens if nothing is running (kb2kskype and usbb2k_api) and you leave it a day, then use somthing like lsusb before and after and see if anything changes for the device.

      How would I find out the udev info your after ?

      Have you blacklisted the yealink module from loading (see the output of lsmod to see if it is)? You can do this in the modprobe.conf file somehow. I don't have the command to hand but its near the start of the forum post on the skype site.

      If you stop and start everythign after 12 hours does it still crash after 24 ? if not one very pour solution would be to add a script to your startup that closes kb2kskype after 12 hours and then restarts it. You can use the stamp file option (see help) to make sure you aren't in a call when doing this or wait till it is finished.

       
    • Chris Worley

      Chris Worley - 2007-09-06

      The problem seems to be the mobo's built-in USB hardware, I added a USB card, and the problem has gone away... 3 days now.

      >... then use somthing like lsusb before and after...

      I've seen nop changes in the output for lsusb... should I be giving it some probing arguments?

      >...Have you blacklisted the yealink module from loading...

      That's a tough one, and has been a problem in the past: On every Yast kernel upgrade, it installs a new Yealink driver, and the next time I reboot, it gets loaded.  I don't know how to blacklist.  For now, I just delete the yealink.ko every time it re-installs/upgrades it.  I'll look for the post in question.

      >...If you stop and start everythign after 12 hours does it still crash after 24 ?...

      Yes.  Once it hosed just as I was connecting.

      Anyway, the problem is fixed w/ different hardware.  The Intel HW had the issue, the NEC does not.  This is a kernel/SuSE issue, and not a usbb2k_api issue:

      # lspci
      ...
      00:1d.0 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #1 (rev 01)
      00:1d.1 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #2 (rev 01)
      00:1d.2 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #3 (rev 01)
      00:1d.3 USB Controller: Intel Corporation 82801G (ICH7 Family) USB UHCI #4 (rev 01)
      00:1d.7 USB Controller: Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller (rev 01)
      ...
      05:02.0 USB Controller: NEC Corporation USB (rev 43)
      05:02.1 USB Controller: NEC Corporation USB (rev 43)
      05:02.2 USB Controller: NEC Corporation USB 2.0 (rev 04)

       
    • Simon_6162

      Simon_6162 - 2007-09-06

      I'm glad the problem has gone away as I was running low on ideas.

      If you add the line below to /etc/modprobe.conf that should blacklist the module (this is for suse)
      alias yealink off

      I hope you can now enjoy the software, let me know if you have any other issues.

      Simon

       

Log in to post a comment.