using resize2fs on an ext4 filesystem will corrupt it

Bug #692704 reported by Kees Cook on 2010-12-20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
linux (Ubuntu)

Bug Description

In a large fs that I resized, on reboot, it was terribly corrupted. fsck took hours, with lots of reports of things like:

File ... (inode #44403251, mod time Wed Dec 31 16:00:40 1969)
  has 1 multiply-claimed block(s), shared with 4 file(s):
 <filesystem metadata>
 ... (inode #45340665, mod time Wed Feb 18 09:04:29 2032)
 ... (inode #45147750, mod time Sat Jun 1 22:47:44 1985)
 ... (inode #45141106, mod time Sat Sep 5 05:31:28 1992)
Clone multiply-claimed blocks? yes

I was able to reproduce generating an unclean fs in a minimal test case. In Maverick and Lucid, the final fsck returns clean. In Natty, the final fsck reports things like this:

Pass 5: Checking group summary information
Block bitmap differences: +(2621440--2621951) +(2654210--2655360) +(2686976--2687487) +(2719744--2720255) +(2752512--2753023) +(2785280--2785791) +(2818048--2818559) +(2850816--2851327) +(2883584--2884095) +(2916352--2916863) +(2949120--2949631) +(2981888--2982399) +(3014656--3015167) +(3047424--3047935) +(3080192--3080703) +(3112960--3113471) +(3145728--3146239) +(3178496--3179007) +(3211264--3211775) +(3244032--3244543) +(3276800--3277311) +(3309568--3310079) +(3342336--3342847) +(3375104--3375615) +(3407872--3408383) +(3440640--3441151) +(3473408--3473919) +(3506176--3506687) +(3538944--3539455) +(3571712--3572223) +(3604480--3604991) +(3637248--3637759) +(3670016--3670527) +(3702784--3703295) +(3735552--3736063) +(3768320--3768831) +(3801088--3801599) +(3833856--3834367) +(3866624--3867135) +(3899392--3899903)
Fix? no

Free blocks count wrong for group #80 (32254, counted=32766).
Fix? no

Reproducer attached.

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: linux-image-2.6.37-10-generic 2.6.37-10.24
Regression: Yes
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.37-10.24-generic 2.6.37-rc6
Uname: Linux 2.6.37-10-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.23.
 shm_open() failed: Permission denied
 **** List of PLAYBACK Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: ALC268 Analog [ALC268 Analog]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
Architecture: amd64
 /dev/snd/controlC0: kees 4631 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
 Card hw:0 'Intel'/'HDA Intel at 0xe0420000 irq 43'
   Mixer name : 'Realtek ALC268'
   Components : 'HDA:10ec0268,80860000,00100003'
   Controls : 17
   Simple ctrls : 11
Date: Mon Dec 20 11:11:36 2010
 PATH=(custom, user)
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-2.6.37-10-generic root=/dev/mapper/systemvg-root2lv ro vt.handoff=7 quiet splash
RelatedPackageVersions: linux-firmware 1.42

SourcePackage: linux
WpaSupplicantLog: 09/22/2008
dmi.bios.vendor: Intel Corp.
dmi.bios.version: JOQ3510J.86A.0954.2008.0922.2331
dmi.board.asset.tag: Base Board Asset Tag DQ35JO
dmi.board.vendor: Intel Corporation
dmi.board.version: AAD82085-800
dmi.chassis.type: 3
dmi.modalias: dmi:bvnIntelCorp.:bvrJOQ3510J.86A.0954.2008.0922.2331:bd09/22/2008:svn:pn:pvr:rvnIntelCorporation:rnDQ35JO:rvrAAD82085-800:cvn:ct3:cvr:

Kees Cook (kees) wrote :
Kees Cook (kees) wrote :
tags: added: regression-release
removed: regression-update
Kees Cook (kees) wrote :

Note that this is a kernel problem, not a e2fsprogs problem since running this test in a Maverick chroot (running under a Natty kernel) results in the same broken behavior.

Brian Murray (brian-murray) wrote :

I'm setting this to Triaged as it has been recreated upstream and is being worked on.

Changed in linux (Ubuntu):
status: New → Triaged
Changed in linux (Ubuntu Natty):
importance: Undecided → Critical
Kees Cook (kees) wrote :

This was fixed in the -12 natty kernel.

Changed in linux (Ubuntu Natty):
status: Triaged → Fix Released
Changed in linux:
status: Unknown → Fix Released
Changed in linux:
importance: Unknown → High
Changed in linux:
status: Fix Released → Incomplete
Changed in linux:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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