Activity log for bug #734139

Date Who What changed Old value New value Message
2011-03-13 03:57:07 Rocko bug added bug
2011-04-06 23:02:13 Rocko summary Kernel crashes (hangs system) upon physical removal of mounted USB drive Kernel crashes (hangs system) upon physical removal of mounted ext3/4 drives
2011-04-06 23:03:34 Rocko description For me, kernels after 2.6.35 have a problem where removing one or more USB drives occasionally hangs the system. Initially I thought the problem was introduced in 2.6.37 but I have also reproduced this in 2.6.36. The test cases most likely to reproduce this seem to be: 1. Suspend with drives mounted via a USB hub, then remove the USB hub cable, and resume. 2. Running Ubuntu in VirtualBox, remove and replace an external USB drive using the USB menu on the status bar (ie near the bottom right), leaving enough time for Ubuntu to mount the drive before removing it (and of course not unmounting the drive first). It seems that the crash is more likely to occur if there are multiple drives attached (I typically have 4-5 drives attached via a 7-in-1 USB hub). Initially I found this bug in Maverick using either Ubuntu mainline or kernels I built myself, but I have now reproduced the hang in Natty with the second test case (ie with Natty running in a VM). Getting a syslog is problematic because the hang is serious enough to stop all I/O, so nothing is written to the official /var/log/syslog file. The only way I have got a log is to suspend from a tty console with: echo 8 > /proc/sys/kernel/printk /etc/acpi/sleep.sh force and to take a photo of the resulting log that appears. Often the log is incomplete. I have seen this happen on a second PC, and have run RAM tests on my main PC to try and rule out hardware issues. In my testing I haven't ever managed to reproduce the crash if I unmount the USB drives before removing them. I have reported upstream at: https://bugzilla.kernel.org/show_bug.cgi?id=25832 and what logs I have managed to capture are attached there. It seems that the crash occurs due to an unhandled page fault in an interrupt. Comment https://bugzilla.kernel.org/show_bug.cgi?id=25832#c30 shows a means of simulating a USB removal without physically removing the drive, which provides a third test case. ProblemType: Bug DistroRelease: Ubuntu 11.04 Package: linux-image (not installed) Regression: Yes Reproducible: Yes ProcVersionSignature: Ubuntu 2.6.38-6.34-generic 2.6.38-rc7 Uname: Linux 2.6.38-6-generic i686 AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23. AplayDevices: **** List of PLAYBACK Hardware Devices **** card 0: I82801AAICH [Intel 82801AA-ICH], device 0: Intel ICH [Intel 82801AA-ICH] Subdevices: 1/1 Subdevice #0: subdevice #0 Architecture: i386 AudioDevicesInUse: USER PID ACCESS COMMAND /dev/snd/controlC0: rocko 1437 F.... pulseaudio CRDA: Error: [Errno 2] No such file or directory Card0.Amixer.info: Card hw:0 'I82801AAICH'/'Intel 82801AA-ICH with STAC9700,83,84 at irq 5' Mixer name : 'SigmaTel STAC9700,83,84' Components : 'AC97a:83847600' Controls : 34 Simple ctrls : 24 Date: Sun Mar 13 11:37:57 2011 HibernationDevice: RESUME=UUID=5c2c0283-459c-4809-a8d1-5e0bb43f21f8 InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100602.2) IwConfig: lo no wireless extensions. eth3 no wireless extensions. Lsusb: Bus 002 Device 002: ID 80ee:0021 Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub MachineType: innotek GmbH VirtualBox ProcEnviron: LANGUAGE=en_AU:en LANG=en_AU.UTF-8 SHELL=/bin/bash ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-6-generic root=UUID=c7586c69-5914-406e-ab3d-a671796fed2d ro quiet splash vt.handoff=7 RelatedPackageVersions: linux-restricted-modules-2.6.38-6-generic N/A linux-backports-modules-2.6.38-6-generic N/A linux-firmware 1.48 RfKill: SourcePackage: linux UpgradeStatus: Upgraded to natty on 2011-03-09 (3 days ago) dmi.bios.date: 12/01/2006 dmi.bios.vendor: innotek GmbH dmi.bios.version: VirtualBox dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2: dmi.product.name: VirtualBox dmi.product.version: 1.2 dmi.sys.vendor: innotek GmbH For me, kernels after 2.6.35 have a problem where removing one or more ext3 or ext4 drives occasionally hangs the system. Initially I thought the problem was introduced in 2.6.37 but I have also reproduced this in 2.6.36. The test cases most likely to reproduce this seem to be: 1. Suspend with drives mounted via a USB hub, then remove the USB hub cable, and resume. 2. Running Ubuntu in VirtualBox, remove and replace an external USB drive using the USB menu on the status bar (ie near the bottom right), leaving enough time for Ubuntu to mount the drive before removing it (and of course not unmounting the drive first). 3. Remove and insert (multiple times) an SD card formatted with an ext4 file system. It seems that the crash is more likely to occur if there are multiple drives attached (I typically have 4-5 drives attached via a 7-in-1 USB hub). Initially I found this bug in Maverick using either Ubuntu mainline or kernels I built myself, but I have now reproduced the hang in Natty with the second test case (ie with Natty running in a VM). Getting a syslog is problematic because the hang is serious enough to stop all I/O, so nothing is written to the official /var/log/syslog file. The only way I have got a log is to suspend from a tty console with: echo 8 > /proc/sys/kernel/printk /etc/acpi/sleep.sh force and to take a photo of the resulting log that appears. Often the log is incomplete. I have seen this happen on a second PC, and have run RAM tests on my main PC to try and rule out hardware issues. In my testing I haven't ever managed to reproduce the crash if I unmount the USB drives before removing them. I have reported upstream at: https://bugzilla.kernel.org/show_bug.cgi?id=25832 and what logs I have managed to capture are attached there. It seems that the crash occurs due to an unhandled page fault in an interrupt. Comment https://bugzilla.kernel.org/show_bug.cgi?id=25832#c30 shows a means of simulating a USB removal without physically removing the drive, which provides a third test case. ProblemType: Bug DistroRelease: Ubuntu 11.04 Package: linux-image (not installed) Regression: Yes Reproducible: Yes ProcVersionSignature: Ubuntu 2.6.38-6.34-generic 2.6.38-rc7 Uname: Linux 2.6.38-6-generic i686 AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23. AplayDevices:  **** List of PLAYBACK Hardware Devices ****  card 0: I82801AAICH [Intel 82801AA-ICH], device 0: Intel ICH [Intel 82801AA-ICH]    Subdevices: 1/1    Subdevice #0: subdevice #0 Architecture: i386 AudioDevicesInUse:  USER PID ACCESS COMMAND  /dev/snd/controlC0: rocko 1437 F.... pulseaudio CRDA: Error: [Errno 2] No such file or directory Card0.Amixer.info:  Card hw:0 'I82801AAICH'/'Intel 82801AA-ICH with STAC9700,83,84 at irq 5'    Mixer name : 'SigmaTel STAC9700,83,84'    Components : 'AC97a:83847600'    Controls : 34    Simple ctrls : 24 Date: Sun Mar 13 11:37:57 2011 HibernationDevice: RESUME=UUID=5c2c0283-459c-4809-a8d1-5e0bb43f21f8 InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Alpha i386 (20100602.2) IwConfig:  lo no wireless extensions.  eth3 no wireless extensions. Lsusb:  Bus 002 Device 002: ID 80ee:0021  Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub MachineType: innotek GmbH VirtualBox ProcEnviron:  LANGUAGE=en_AU:en  LANG=en_AU.UTF-8  SHELL=/bin/bash ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.38-6-generic root=UUID=c7586c69-5914-406e-ab3d-a671796fed2d ro quiet splash vt.handoff=7 RelatedPackageVersions:  linux-restricted-modules-2.6.38-6-generic N/A  linux-backports-modules-2.6.38-6-generic N/A  linux-firmware 1.48 RfKill: SourcePackage: linux UpgradeStatus: Upgraded to natty on 2011-03-09 (3 days ago) dmi.bios.date: 12/01/2006 dmi.bios.vendor: innotek GmbH dmi.bios.version: VirtualBox dmi.modalias: dmi:bvninnotekGmbH:bvrVirtualBox:bd12/01/2006:svninnotekGmbH:pnVirtualBox:pvr1.2: dmi.product.name: VirtualBox dmi.product.version: 1.2 dmi.sys.vendor: innotek GmbH
2011-04-07 01:13:39 Brad Figg linux (Ubuntu): status New Confirmed
2011-09-22 23:01:58 Rocko attachment added patch against kernel 3.1-rc7 to fix kernel panic on removal of ext4 drive https://bugs.launchpad.net/ubuntu/+source/linux/+bug/734139/+attachment/2443390/+files/usb-removal-crash-fix.diff
2011-09-22 23:22:00 Rocko attachment added patch against kernel 3.0.4 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/734139/+attachment/2443492/+files/usbfix3.diff
2012-03-24 04:38:25 penalvch bug watch added http://bugzilla.kernel.org/show_bug.cgi?id=25832
2012-03-24 04:38:25 penalvch bug task added linux
2012-03-24 04:41:34 penalvch tags apport-bug i386 kernel-uncat natty needs-upstream-testing regression-release apport-bug i386 kernel-uncat natty needs-upstream-testing patch regression-release
2012-03-24 08:13:33 Ubuntu Foundations Team Bug Bot bug added subscriber Joseph Salisbury
2012-03-26 21:03:45 Joseph Salisbury linux (Ubuntu): importance Undecided Medium
2012-03-27 09:14:05 Bug Watch Updater linux: status Unknown Confirmed
2012-03-27 09:14:05 Bug Watch Updater linux: importance Unknown Medium
2012-04-02 20:55:47 Brad Figg linux (Ubuntu): status Confirmed Fix Released
2012-07-03 00:38:27 Bug Watch Updater linux: status Confirmed Fix Released