Can't fsck broken partition from live CD

Bug #697641 reported by Jeroen T. Vermeulen
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu
Fix Released
Undecided
Unassigned

Bug Description

Sometimes my ext4 root filesystem corrupts itself (bug 675416), and I can't boot far enough for the routine, automated fsck run. Normally I fix that with a manual fsck from a live-CD boot. This time, using a Maverick live CD, that didn't work. It failed with EBUSY, giving output along the lines of "device or resource busy" and "partition mounted or locked by other process?"

The partition was not mounted when I tried this, and not shown in /proc/mounts either, so simply unmounting it didn't help. I tried umount -a to be sure, but that didn't do it either. Based on the version number and an strace run this is also *not* the double-exclusive-lock-while-figuring-out-block-size bug that fsck used to hit in the Debian Lenny timeframe.

According to lsof, there were 3 file handles open on the partition's /dev entry. If I recall correctly, the process owning these file handles was called jbd2/sda3-8 (and its parent pid was 2). Discussions I found while searching suggest that there may have been a hanging "mount" command, but I didn't think of grep'ing "ps" output at the time.

The solution suggested online was to boot off a Slax live CD and run fsck from there. That worked for me. The last one or two times this happened I happened to use a Fedora live CD and before that, CDs from older Ubuntu versions. The attempt with the Maverick CD is the only time I was unable to recover in that way.

For a time I thought it must have been a hardware problem, but a dusty little OS X partition on the same machine (MacBook Pro, June 2009) booted successfully, and an overnight checkup in the shop revealed no hardware problems. My system is running again, which also means I'm no longer able to reproduce the problem at will.

Revision history for this message
Ian! D. Allen (idallen) wrote :

fsck.ext4 has a bug where it tries to double-open the partition.
See: 711799 e2fsprogs wrongly identifies ext4 as mounted

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

An strace and version-number check at the time suggested that this was not the double-O_EXCL bug.

Revision history for this message
Fabio Marconi (fabiomarconi) wrote :

Hello Jeroen
Is this issue reproducible in the latest release ?
Thanks
Fabio
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in ubuntu:
status: New → Incomplete
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

I think this started working again in 11.04.

Changed in ubuntu:
status: Incomplete → Fix Released
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.