Kernel crashes (hangs system) upon physical removal of mounted ext3/4 drives
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Linux |
Fix Released
|
Medium
|
|||
linux (Ubuntu) |
Fix Released
|
Medium
|
Unassigned |
Bug Description
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/
/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:/
Comment https:/
ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image (not installed)
Regression: Yes
Reproducible: Yes
ProcVersionSign
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/
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
Card hw:0 'I82801AAICH'
Mixer name : 'SigmaTel STAC9700,83,84'
Components : 'AC97a:83847600'
Controls : 34
Simple ctrls : 24
Date: Sun Mar 13 11:37:57 2011
HibernationDevice: RESUME=
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=
RelatedPackageV
linux-
linux-
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:bvninnotekG
dmi.product.name: VirtualBox
dmi.product.
dmi.sys.vendor: innotek GmbH
summary: |
- Kernel crashes (hangs system) upon physical removal of mounted USB drive + Kernel crashes (hangs system) upon physical removal of mounted ext3/4 + drives |
description: | updated |
Changed in linux (Ubuntu): | |
status: | New → Confirmed |
tags: | added: patch |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
Changed in linux: | |
importance: | Unknown → Medium |
status: | Unknown → Confirmed |
Changed in linux: | |
status: | Confirmed → Fix Released |
Following on from the bugzilla report, the attached patch (against the 3.1 kernel, but at the very least the the patch to fs/ext4/super.c works against 3.0.4) fixes the problems for ext4 drives.