Kernel oops when unplugging USB devices

Bug #966151 reported by Alan Pope 🍺🐧🐱 🦄
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Linux
Incomplete
Medium
linux (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

I have a keyboard and USB wifi dongle attached to a USB hub which is attached via a cable to my PC.
I noticed the keyboard stopped responding so reached for the USB hub and unplugged it.
Instantly got a kernel oops screen.

 [ 9881.300460] usb 1-1.1.4: USB disconnect, device number 6
[ 9881.300462] usb 1-1.1.4.3: USB disconnect, device number 7
[ 9881.302713] usb 1-1.1.4: clear tt 1 (0070) error -71
[ 9881.558614] usb 1-1.1.4.4: USB disconnect, device number 8
[ 9881.797709] BUG: unable to handle kernel NULL pointer dereference at 00000000000000a8
[ 9881.797750] IP: [<ffffffffa02766e4>] r8712_read32+0x14/0x20 [r8712u]
[ 9881.797785] PGD 0
[ 9881.797796] Oops: 0000 [#1] SMP
[ 9881.797814] CPU 5
[ 9881.797824] Modules linked in: ip6table_filter ip6_tables ebtable_nat ebtables xt_state ipt_REJECT xt_CHECKSUM iptable_mangle xt_tcpudp iptable_filter pci_stub vboxpci(O) ipt_MASQUERADE vboxnetadp(O) iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables vboxnetflt(O) x_tables vboxdrv(O) bridge stp snd_hda_codec_hdmi snd_hda_codec_realtek rfcomm bnep bluetooth binfmt_misc snd_hda_intel snd_hda_codec snd_ctxfi uvcvideo videodev v4l2_compat_ioctl32 i915 snd_usb_audio snd_hwdep snd_usbmidi_lib snd_seq_midi r8712u(C) snd_pcm joydev drm_kms_helper snd_rawmidi snd_seq_midi_event snd_seq snd_timer snd_seq_device drm snd lp i2c_algo_bit soundcore ppdev snd_page_alloc video shpchp parport_pc parport mei(C) psmouse mac_hid serio_raw r8169 usbhid hid btrfs zlib_deflate libcrc32c [last unloaded: kvm]
[ 9881.798213]
[ 9881.798223] Pid: 1225, comm: wlan1 Tainted: G C O 3.2.0-20-generic #32-Ubuntu MSI MS-7680/H61M-E23 (MS-7680)
[ 9881.798268] RIP: 0010:[<ffffffffa02766e4>] [<ffffffffa02766e4>] r8712_read32+0x14/0x20 [r8712u]
[ 9881.798308] RSP: 0018:ffff88022f659e10 EFLAGS: 00010246
[ 9881.798330] RAX: 0000000000000000 RBX: ffff880219ab38a0 RCX: 0000000000000005
[ 9881.798359] RDX: 0000000000000000 RSI: 0000000010250370 RDI: 0000000000000048
[ 9881.798387] RBP: ffff88022f659e10 R08: ffff88022f658000 R09: 000000000000035a
[ 9881.798415] R10: 0000000000000000 R11: 0000000000000001 R12: ffff8802308b8780
[ 9881.798443] R13: 000000000000001d R14: ffff8802308b8dd8 R15: ffff8802315fee00
[ 9881.798472] FS: 0000000000000000(0000) GS:ffff88023fb40000(0000) knlGS:0000000000000000
[ 9881.798504] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 9881.798527] CR2: 00000000000000a8 CR3: 0000000001c05000 CR4: 00000000000406e0
[ 9881.798554] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 9881.798582] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 9881.798611] Process wlan1 (pid: 1225, threadinfo ffff88022f658000, task ffff88023085dbc0)
[ 9881.798643] Stack:
[ 9881.798652] ffff88022f659e40 ffffffffa026f5b8 ffff88022f659e50 ffff880036e20dc0
[ 9881.798689] ffff8802308b8780 ffff8802308b8e08 ffff88022f659e80 ffffffffa026f659
[ 9881.798726] 0000000000000286 ffff8802308b8e18 ffff88022f659e80 ffff8802308b8780
[ 9881.798763] Call Trace:
[ 9881.798781] [<ffffffffa026f5b8>] r871x_internal_cmd_hdl+0x98/0xe0 [r8712u]
[ 9881.798811] [<ffffffffa026f659>] cmd_hdl_filter+0x59/0x120 [r8712u]
[ 9881.798841] [<ffffffffa026f899>] r8712_cmd_thread+0xb9/0x250 [r8712u]
[ 9881.798870] [<ffffffffa026f7e0>] ? r8712_fw_cmd_data+0x50/0x50 [r8712u]
[ 9881.798898] [<ffffffff8108a45c>] kthread+0x8c/0xa0
[ 9881.798922] [<ffffffff81666674>] kernel_thread_helper+0x4/0x10
[ 9881.798947] [<ffffffff8108a3d0>] ? flush_kthread_worker+0xa0/0xa0
[ 9881.798973] [<ffffffff81666670>] ? gs_change+0x13/0x13
[ 9881.798993] Code: 48 8b 87 40 07 00 00 48 8d 78 48 ff 90 a0 00 00 00 5d c3 0f 1f 40 00 55 48 89 e5 66 66 66 66 90 48 8b 87 40 07 00 00 48 8d 78 48 <ff> 90 a8 00 00 00 5d c3 0f 1f 40 00 55 48 89 e5 66 66 66 66 90
[ 9881.799134] RIP [<ffffffffa02766e4>] r8712_read32+0x14/0x20 [r8712u]
[ 9881.799157] RSP <ffff88022f659e10>
[ 9881.799167] CR2: 00000000000000a8
[ 9881.864461] ---[ end trace c202cdf2a0fe8bfd ]---

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: linux-image-3.2.0-20-generic 3.2.0-20.32
ProcVersionSignature: Ubuntu 3.2.0-20.32-generic 3.2.12
Uname: Linux 3.2.0-20-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.24.
AplayDevices: aplay: device_list:252: no soundcards found...
ApportVersion: 1.95-0ubuntu1
Architecture: amd64
ArecordDevices: arecord: device_list:252: no soundcards found...
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Tue Mar 27 12:38:40 2012
HibernationDevice: RESUME=UUID=9b3ebbe4-b26e-41d8-935f-7a88c47ea356
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Alpha amd64 (20120102)
MachineType: MSI MS-7680
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-3.2.0-20-generic root=UUID=3d53ca44-6af4-422d-b1b0-adf30c679a2f ro quiet splash vt.handoff=7
RfKill:

SourcePackage: linux
StagingDrivers: r8712u mei
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 05/23/2011
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: V10.8
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: H61M-E23 (MS-7680)
dmi.board.vendor: MSI
dmi.board.version: 2.0
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: MSI
dmi.chassis.version: 2.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrV10.8:bd05/23/2011:svnMSI:pnMS-7680:pvr2.0:rvnMSI:rnH61M-E23(MS-7680):rvr2.0:cvnMSI:ct3:cvr2.0:
dmi.product.name: MS-7680
dmi.product.version: 2.0
dmi.sys.vendor: MSI

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux (Ubuntu):
status: New → Confirmed
Changed in linux (Ubuntu):
importance: Undecided → Medium
tags: added: kernel-da-key r8712-read32
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Hi Alan,

Does this oops happen every time you unplug the USB device? If so, can you boot with the latest mainline kernel[0] to see if the issue still happens?

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.3-rc7-precise/

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

It's reproducible, yes.

I just did it again, and pastebinned the dmesg via ssh. http://paste.ubuntu.com/902195/

Will try the newer kernel on it. Thanks.

Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

Same thing happens wit the kernel you linked to. 3.3.0-030300rc7-generic #201203101735

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

This issue appears to be an upstream bug, since you tested the latest upstream kernel. Would it be possible for you to open an upstream bug report at bugzilla.kernel.org [1]?

If you are comfortable with opening a bug upstream, It would be great if you can report back the upstream bug number in this bug report. That will allow us to link this bug to the upstream report.

One additional question. Do you happen to know if this happened in earlier releases such as Oneiric? It would be good to know if this is a regression or if the bug has been there all along.

[1] https://wiki.ubuntu.com/Bugs/Upstream/kernel

tags: added: kernel-bug-exists-upstream
Revision history for this message
Brad Figg (brad-figg) wrote : Test with newer development kernel (3.2.0-20.33)

Thank you for taking the time to file a bug report on this issue.

However, given the number of bugs that the Kernel Team receives during any development cycle it is impossible for us to review them all. Therefore, we occasionally resort to using automated bots to request further testing. This is such a request.

We have noted that there is a newer version of the development kernel than the one you last tested when this issue was found. Please test again with the newer kernel and indicate in the bug if this issue still exists or not.

You can update to the latest development kernel by simply running the following commands in a terminal window:

    sudo apt-get update
    sudo apt-get dist-upgrade

If the bug still exists, change the bug status from Incomplete to Confirmed. If the bug no longer exists, change the bug status from Incomplete to Fix Released.

If you want this bot to quit automatically requesting kernel tests, add a tag named: bot-stop-nagging.

 Thank you for your help, we really do appreciate it.

Changed in linux (Ubuntu):
status: Confirmed → Incomplete
tags: added: kernel-request-3.2.0-20.33
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
Achim (ach1m)
Changed in linux (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Achim (ach1m) wrote :

I am using kernel 3.4.0-030400-generic and the problem is still present.

My monitor has an integrated usb-hub if I push the power button of my monitor the usb-hub also gets switched of.
Then the kernel »Oopses«. Please see attached dmesg.txt.

I have to reboot to get my usb-devices recognized from the kernel again.
I hope this information was helpful.

Changed in linux:
importance: Unknown → Medium
status: Unknown → Confirmed
Changed in linux:
status: Confirmed → Incomplete
Revision history for this message
penalvch (penalvch) wrote :

Alan Pope ㋛, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p linux <replace-with-bug-number>

Also, could you please test the latest upstream kernel available following https://wiki.ubuntu.com/KernelMainlineBuilds ? It will allow additional upstream developers to examine the issue. Please do not test the daily folder, but the one all the way at the bottom. Once you've tested the upstream kernel, please comment on which kernel version specifically you tested. If this bug is fixed in the mainline kernel, please add the following tags:
kernel-fixed-upstream
kernel-fixed-upstream-VERSION-NUMBER

where VERSION-NUMBER is the version number of the kernel you tested. For example:
kernel-fixed-upstream-v3.11-rc5

This can be done by clicking on the yellow circle with a black pencil icon next to the word Tags located at the bottom of the bug description. As well, please remove the tag:
needs-upstream-testing

If the mainline kernel does not fix this bug, please add the following tags:
kernel-bug-exists-upstream
kernel-bug-exists-upstream-VERSION-NUMBER

As well, please remove the tag:
needs-upstream-testing

Once testing of the upstream kernel is complete, please mark this bug's Status as Confirmed. Please let us know your results. Thank you for your understanding.

tags: added: bios-outdated-v12.3 bot-stop-nagging needs-upstream-testing
removed: kernel-request-3.2.0-20.33
Revision history for this message
Alan Pope 🍺🐧🐱 🦄 (popey) wrote :

I no longer have the machine in question immediately accessible unfortunately. Perhaps someone else has a machine with the same problem?

Revision history for this message
penalvch (penalvch) wrote :

Alan Pope ㋛, this bug report is being closed due to your last comment https://bugs.launchpad.net/ubuntu/+source/linux/+bug/966151/comments/11 regarding you no longer have the hardware immediately accessible. You are welcome to reopen this report if it becomes immediately accessible. For future reference you can manage the status of your own bugs by clicking on the current status in the yellow line and then choosing a new status in the revealed drop down box. You can learn more about bug statuses at https://wiki.ubuntu.com/Bugs/Status. Thank you again for taking the time to report this bug and helping to make Ubuntu better. Please submit any future bugs you may find.

Changed in linux (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.