lucid ext4 make_indexed_dir: invalid rec_len for '..' in inode

Bug #527644 reported by Martin Pool
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
e2fsprogs (Ubuntu)
New
Undecided
Unassigned
linux (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I upgraded /backup on my lucid amd64 desktop machine to ext4 yesterday according to http://kernelnewbies.org/Ext4

It passed the fsck and was working ok, but while making a backup today I got an IO error and this message in dmesg:

Feb 25 17:45:37 grace kernel: [37152.894557] EXT4-fs error (device dm-4): make_indexed_dir: invalid rec_len for '..' in inode 2933963

I unmounted it and ran fsck, which shows many messages like

grace% sudo nice fsck -Cfv /dev/vg_main/backup
fsck from util-linux-ng 2.17
e2fsck 1.41.10 (10-Feb-2009)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
First entry '%45ncoding%41dapter.py-20060113032051-4d7e1d8c1e38b4a1.kndx' (inode=1458904) in directory inode 131130 (/grace/mbp/bzr/20070706/.bzr/repository/knits/31) should be '.'
Fix<y>? yes

Setting filetype for entry '.' in /grace/mbp/bzr/20070706/.bzr/repository/knits/31 (131130) to 2.
Missing '..' in directory inode 131130.
Fix<y>? yes

Setting filetype for entry '..' in /grace/mbp/bzr/20070706/.bzr/repository/knits/31 (131130) to 2.
Entry '..' in /grace/mbp/bzr/20070706/.bzr/repository/knits/31 (131130) is duplicate '..' entry.
Fix<y>? yes

Entry '.' in /grace/mbp/bzr/20070706/.bzr/repository/knits/31 (131130) is a link to '.' Clear<y>? yes

First entry '%52%45%41%44%4d%45-20050309040720-8f368abf9f346b9d.kndx' (inode=132214) in directory inode 131139 (/grace/mbp/bzr/20070706/.bzr/repository/knits/3a) should be '.'
Fix<y>? yes

Setting filetype for entry '.' in /grace/mbp/bzr/20070706/.bzr/repository/knits/3a (131139) to 2.
Missing '..' in directory inode 131139.
Fix<y>? yes

... and on and on.

ProblemType: Bug
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
AplayDevices:
 **** List of PLAYBACK Hardware Devices ****
 card 1: U0x41e0x30d3 [USB Device 0x41e:0x30d3], device 0: USB Audio [USB Audio]
   Subdevices: 0/1
   Subdevice #0: subdevice #0
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 1: U0x41e0x30d3 [USB Device 0x41e:0x30d3], device 0: USB Audio [USB Audio]
   Subdevices: 1/1
   Subdevice #0: subdevice #0
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: mbp 3010 F.... pulseaudio
 /dev/snd/pcmC1D0p: mbp 3010 F...m pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card1.Amixer.info:
 Card hw:1 'U0x41e0x30d3'/'USB Device 0x41e:0x30d3 at usb-0000:00:1d.7-5.1.4, full speed'
   Mixer name : 'USB Mixer'
   Components : 'USB041e:30d3'
   Controls : 7
   Simple ctrls : 3
Date: Thu Feb 25 20:34:52 2010
DistroRelease: Ubuntu 10.04
EcryptfsInUse: Yes
Frequency: Once a day.
HibernationDevice: RESUME=/dev/mapper/vg_main-swap
IwConfig:
 lo no wireless extensions.

 eth0 no wireless extensions.
MachineType: Gigabyte Technology Co., Ltd. 965P-DS3
NonfreeKernelModules: nvidia
Package: linux-image-2.6.32-14-generic 2.6.32-14.20
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.32-14-generic root=/dev/mapper/vg_main-lucid_64 ro clock=hpet quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_AU.utf8
 SHELL=/bin/zsh
ProcVersionSignature: Ubuntu 2.6.32-14.20-generic
Regression: Yes
RelatedPackageVersions: linux-firmware 1.30
Reproducible: No
RfKill:

SourcePackage: linux
TestedUpstream: No
Uname: Linux 2.6.32-14-generic x86_64
WpaSupplicantLog:

dmi.bios.date: 01/12/2007
dmi.bios.vendor: Award Software International, Inc.
dmi.bios.version: F10
dmi.board.name: 965P-DS3
dmi.board.vendor: Gigabyte Technology Co., Ltd.
dmi.chassis.type: 3
dmi.chassis.vendor: Gigabyte Technology Co., Ltd.
dmi.modalias: dmi:bvnAwardSoftwareInternational,Inc.:bvrF10:bd01/12/2007:svnGigabyteTechnologyCo.,Ltd.:pn965P-DS3:pvr:rvnGigabyteTechnologyCo.,Ltd.:rn965P-DS3:rvr:cvnGigabyteTechnologyCo.,Ltd.:ct3:cvr:
dmi.product.name: 965P-DS3
dmi.sys.vendor: Gigabyte Technology Co., Ltd.

Revision history for this message
Martin Pool (mbp) wrote :
Revision history for this message
Martin Pool (mbp) wrote :

So the exact commands from my .bash_history were

df -h
vi /etc/fstab
df -h
tune2fs -l /dev/mapper/vg_main-backup |less
mount
cd /
umount /backup
df -h /backup
umount /backup
umount /backup
tune2fs -O extents,uninit_bg,dir_index /dev/vg_main/backup
fsck -pDf /dev/vg_main/backup
fsck -Df /dev/vg_main/backup
fsck -CDf /dev/vg_main/backup
man fsck
man e2fsck
mount
vi /etc/fstab
mount
tune2fs -l /dev/mapper/vg_main-lucid_64 |less
reboot

description: updated
Revision history for this message
Martin Pool (mbp) wrote :

apw says it's worth mentioning that I probably had dir_index already turned on on this filesystem. I'm not specifically sure, but it is set on other filesystems on this machine that I haven't touched recently.

These files haven't been modified for years, certainly not since

This filesystem is on an lvm lv on top of md raid1. I'm pretty sure it has successfully passed its time or mount-based fscks fairly recently before the upgrade.

The tune2fs for this filesystem is as attached.

Revision history for this message
Martin Pool (mbp) wrote :

Unfortunately fsck on /home shows similar problems.

I wonder if the directories were damaged by running fsck with -D on them?

Revision history for this message
Martin Pool (mbp) wrote :

I just ran fsck -Cfvn on /home and the last bit of the output is an shown. All the errors seem to be about either .. or the first directory entry so perhaps the bug is there?

Revision history for this message
Martin Pool (mbp) wrote :

Other typical errors:

First entry '%gconf.xml' (inode=8700977) in directory inode 8704403 (.../view) should be '.'
Fix? no

Invalid inode number for '.' in directory inode 8704403.
Fix? no

Second entry '.' (inode=8704403) in directory inode 8704403 should be '..'
Fix? no

Entry '..' in .../view (8704403) is duplicate '..' entry.
Fix? no

Entry '..' in .../view (8704403) is duplicate '..' entry.
Fix? no

First entry '%gconf.xml' (inode=8699989) in directory inode 8704405 (.../eplugin) should be '.'
Fix? no

Invalid inode number for '.' in directory inode 8704405.
Fix? no

Second entry '.' (inode=8704405) in directory inode 8704405 should be '..'
Fix? no

Entry '..' in .../eplugin (8704405) is duplicate '..' entry.
Fix? no

Entry '..' in .../eplugin (8704405) is duplicate '..' entry.
Fix? no

Entry '..' in .../eplugin (8704405) is a link to directory .../shell/.. (27328573).
Clear? no

Revision history for this message
Martin Pool (mbp) wrote :

I thought I would try turning off dir_index as that seemed possibly most related to these errors. I get, unsurprisingly, many warnings about

  inode ... has INDEX_FL flag set on filesystem without htree support

but the other errors about inodes are still there.

Revision history for this message
Theodore Ts'o (tytso) wrote :

This is a known e2fsprogs bug. It will be fixed in e2fsprogs 1.41.11, which will be out soon.

Changed in linux (Ubuntu):
status: New → Invalid
Revision history for this message
Martin Pool (mbp) wrote :

Thanks, Ted. Will the updated version be able to recover these filesystems, or should I plan to restore from backups? I've not yet committed the changes that current fsck wants to make.

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.