USB stack dies when I disconnect my mobile phone's USB cable

Bug #31219 reported by Carlos Perelló Marín
12
Affects Status Importance Assigned to Milestone
linux-source-2.6.15 (Ubuntu)
Invalid
Medium
Ben Collins

Bug Description

Hi, I have a Samsung ZV10 with an USB cable. I use it as a modem to Internet and every time I disconnect it, I get this error that 'disables' completely the USB stack until I reboot the computer:

Feb 10 18:49:48 localhost kernel: [4297906.957000] usb 2-2: USB disconnect, address 4
Feb 10 18:49:48 localhost kernel: [4297906.957000] ------------[ cut here ]------------
Feb 10 18:49:48 localhost kernel: [4297906.957000] kernel BUG at kernel/workqueue.c:109!
Feb 10 18:49:48 localhost kernel: [4297906.957000] invalid operand: 0000 [#1]
Feb 10 18:49:48 localhost kernel: [4297906.957000] PREEMPT SMP
Feb 10 18:49:48 localhost kernel: [4297906.957000] Modules linked in: ppp_async ppp_generic slhc rfcomm l2cap speedstep_centrino cpufreq_userspace cpufreq_stats freq_table cpufreq_powersave cpufreq_ondemand cpufreq_conservative ipv6 i915 drm video tc1100_wmi sony_acpi pcc_acpi ibm_acpi hotkey dev_acpi container button acpi_sbs battery ac i2c_acpi_ec i2c_core dm_mod md_mod
parport_pc lp parport af_packet pcmcia tsdev yenta_socket rsrc_nonstatic pcmcia_core cdc_acm visor usbserial ipw2200 hci_usb
irtty_sir bluetooth sdhci mmc_core sir_dev nsc_ircc ieee80211 irda ieee80211_crypt snd_intel8x0 snd_ac97_codec snd_ac97_bus snd_pcm_oss snd_mixer_oss crc_ccitt snd_pcm snd_timer snd sg tg3 rtc pcspkr psmouse intel_agp agpgart soundcore shpchp pci_hotplug serio_raw snd_page_alloc evdev ext3 jbd sd_mod generic ata_piix ahci libata scsi_mod ehci_hcd uhci_hcd usbcore thermal processor fan capability commoncap vga16fb cfbcopyarea vgastate cfbimgblt cfbfillrect fbcon tileblit font bitblit softcursor
Feb 10 18:49:48 localhost kernel: [4297906.957000] CPU: 0
Feb 10 18:49:48 localhost kernel: [4297906.957000] EIP: 0060:[queue_work+118/144] Not tainted VLI
Feb 10 18:49:48 localhost kernel: [4297906.957000] EFLAGS: 00210297 (2.6.15-15-686)
Feb 10 18:49:48 localhost kernel: [4297906.957000] EIP is at queue_work+0x76/0x90
Feb 10 18:49:48 localhost kernel: [4297906.957000] eax: 8ea84964 ebx: 5ffcdee0 ecx: 00000000 edx: 8ea84960
Feb 10 18:49:48 localhost kernel: [4297906.957000] esi: 00000000 edi: 5f90da00 ebp: 5fc6c614 esp: 9e0d7e5c
Feb 10 18:49:48 localhost kernel: [4297906.957000] ds: 007b es: 007b ss: 0068
Feb 10 18:49:48 localhost kernel: [4297906.957000] Process khubd (pid: 1553, threadinfo=9e0d6000 task=9e085030)
Feb 10 18:49:48 localhost kernel: [4297906.957000] Stack: 40303df0 401f4dcf 00000000 5f90da00 a036d5d6 8ea84000 9e182c00 00000081
Feb 10 18:49:48 localhost kernel: [4297906.957000] 5fc6c600 a03576e0 a0357700 5fc6c614 a00c0142 5fc6c600 5fc6c600 5fc6c614
Feb 10 18:49:48 localhost kernel: [4297906.957000] 5fc6c69c 5fc6c614 4025bdbb 5fc6c614 403285a2 5fc6c614 9e182c70 00000001
Feb 10 18:49:48 localhost kernel: [4297906.957000] Call Trace:
Feb 10 18:49:48 localhost kernel: [4297906.957000] [klist_release+0/112] klist_release+0x0/0x70
Feb 10 18:49:48 localhost kernel: [4297906.957000] [kobject_put+31/48] kobject_put+0x1f/0x30
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1609835990/-1078119424] usb_serial_disconnect+0x56/0xd0 [usbserial]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607029058/-1078119424] usb_unbind_interface+0x42/0x90 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [__device_release_driver+107/160] __device_release_driver+0x6b/0xa0
Feb 10 18:49:48 localhost kernel: [4297906.957000] [device_release_driver+29/48] device_release_driver+0x1d/0x30
Feb 10 18:49:48 localhost kernel: [4297906.957000] [bus_remove_device+107/144] bus_remove_device+0x6b/0x90
Feb 10 18:49:48 localhost kernel: [4297906.957000] [device_del+70/144] device_del+0x46/0x90
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607065350/-1078119424] usb_disable_device+0xc6/0x140 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607040594/-1078119424] usb_disconnect+0xa2/0x140 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607045570/-1078119424] hub_port_connect_change+0x62/0x410 [usbcore]Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607034390/-1078119424] clear_port_feature+0x56/0x60 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607047323/-1078119424] hub_events+0x32b/0x4c0 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [autoremove_wake_function+0/96] autoremove_wake_function+0x0/0x60
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607047728/-1078119424] hub_thread+0x0/0xe0 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [pg0+1607047749/-1078119424] hub_thread+0x15/0xe0 [usbcore]
Feb 10 18:49:48 localhost kernel: [4297906.957000] [autoremove_wake_function+0/96] autoremove_wake_function+0x0/0x60
Feb 10 18:49:48 localhost kernel: [4297906.957000] [kthread+200/208] kthread+0xc8/0xd0
Feb 10 18:49:48 localhost kernel: [4297906.957000] [kthread+0/208] kthread+0x0/0xd0
Feb 10 18:49:48 localhost kernel: [4297906.957000] [kernel_thread_helper+5/16] kernel_thread_helper+0x5/0x10
Feb 10 18:49:48 localhost kernel: [4297906.957000] Code: 0d 74 d4 3f 40 3b 42 04 75 21 8b 03 be 01 00 00 00 f7 d0 8b 04 88 89 54 24 04 89 04 24 e8 23 ff ff ff eb b2 e8 0c ea 1c 00 eb bc <0f> 0b 6d 00 e9 89 31 40 89 f6 eb d3 8d b4 26 00 00 00 00 8d bc
Feb 10 18:49:48 localhost kernel: [4297906.957000] <6>note: khubd[1553] exited with preempt_count 1

Revision history for this message
Carlos Perelló Marín (carlos) wrote : Error log from dmesg

Attached the error as the comment field makes it too difficult to understand.

Matt Zimmerman (mdz)
Changed in linux-source-2.6.15:
assignee: nobody → ben-collins
Revision history for this message
Matt Thrailkill (matt-modestolan) wrote :

I get this problem also, on kernel 2.6.15-20-k7 ANY TIME I unplug a usb device. Its 100% reproducible on my system -- it happens every single time without fail. I'm using an smp Athlon system (K7, not K8)

Revision history for this message
Matt Thrailkill (matt-modestolan) wrote :

Actually my old comment is wrong, this only happens when I unplug my phone. I emailed my dmesg to a Redhat kernel dev I know, and this is what he said:

> Here is a copy of what is in /var/log/syslog when I unplug my phone from
> my laptop w/ the latest ubuntu kernel.

> Jun 26 01:55:04 localhost kernel: [17180317.156000] kernel BUG at kernel/workqueue.c:109!
> Jun 26 01:55:04 localhost kernel: [17180317.156000] invalid operand: 0000 [#1]
> Jun 26 01:55:04 localhost kernel: [17180317.156000] PREEMPT SMP
> Jun 26 01:55:04 localhost kernel: [17180317.156000] EFLAGS: 00010202 (2.6.15-25-686)
> Jun 26 01:55:04 localhost kernel: [17180317.156000] [pg0+434898390/1069184000] usb_serial_disconnect+0x56/0xd0 [usbserial]

It's only going to be fixed months from now, I'm afraid. My patch is
only going to be complete in 2.6.18 pre, and when Ubuntu picks it is
anyone's guess.

-- Pete

He also said this:

> Here is a copy of what is in /var/log/syslog when I unplug my phone from
> my laptop w/ the latest ubuntu kernel.

I knew about it before. Here's what Linus accepted already:

http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=2f8ad9a1b91bc6856860a2fea8b07e0c82c0ad0a

Unfortunately, it's not complete, there's a follow-up patch queued:

http://ftp.kernel.org/pub/linux/kernel/people/gregkh/gregkh-2.6/gregkh-04-usb/usb-fix-usb-serial-leaks-oopses-on-disconnect.patch

BTW, it's not cdc-acm. Note that usb_serial_disconnect was in the
traceback.

-- Pete

2.6.18-rc1 came out recently, I hope someone can backport the fix (if it exists) from there into the current Ubuntu kernels. Otherwise, every time I unplug my phone I have to reboot to dial out with it or connect any other usb device again.

Revision history for this message
Basilio Kublik (sourcercito) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. You reported this bug a while ago and there hasn't been any activity in it recently. We were wondering is this still an issue for you? Thanks in advance.

Changed in linux-source-2.6.15:
status: New → Incomplete
Revision history for this message
Basilio Kublik (sourcercito) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in linux-source-2.6.15:
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.