Bug 488343

Summary: ext4: EXT4-fs error (device sdc1): ext4_add_entry: bad entry in directory #12: rec_len % 4 != 0
Product: [Fedora] Fedora Reporter: Sergey <sergey_bogomolov>
Component: kernelAssignee: Eric Sandeen <esandeen>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: low    
Version: 10CC: dmbuvi+bugzilla, kernel-maint, quintela, sergey_bogomolov
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-05-21 02:00:53 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Sergey 2009-03-03 19:50:10 UTC
Description of problem:

I cant copy file hierarchy from ext3 to ext4

Version-Release number of selected component (if applicable):
Fedora 10 x86_64
kernel 2.6.27.15-170.2.24.fc10.x86_64

Steps to Reproduce:
1. mke2fs -j -L HDTV1500H -m 0 -T largefile4 -t ext4 -v /dev/sdc1
2. mount /HDTV1500H
3. mkdir /HDTV1500H/films
4. cp -avi /HDTV500/films/* /HDTV1500H/films/

Actual results:

`/HDTV500/films/11 друзей Оушена.Oceans Eleven.2001.HDTV.MPEG2.1920x1080.RUS.mkv' -> `/HDTV1500H/films/11 друзей Оушена.Oceans Eleven.2001.HDTV.MPEG2.1920x1080.RUS.mkv'
`/HDTV500/films/13-й воин.13th Warriror.1999.HDTV.MPEG2.1920x1080.rus_eng.mkv' -> `/HDTV1500H/films/13-й воин.13th Warriror.1999.HDTV.MPEG2.1920x1080.rus_eng.mkv'
`/HDTV500/films/Американский психопат.American Psycho.2000.BluRay-rip.1080p.MPG2.Rus.Eng.ts' -> `/HDTV1500H/films/Американский психопат.American Psycho.2000.BluRay-rip.1080p.MPG2.Rus.Eng.ts'
`/HDTV500/films/Аполлон 13.Apollo 13.1995.HDTV.x264.1280x720.rus_eng.mkv' -> `/HDTV1500H/films/Аполлон 13.Apollo 13.1995.HDTV.x264.1280x720.rus_eng.mkv'
`/HDTV500/films/Армагеддон.Armageddon.1998.HDTV.1280x720.XviD.avi' -> `/HDTV1500H/films/Армагеддон.Armageddon.1998.HDTV.1280x720.XviD.avi'
`/HDTV500/films/Большое путешествие.The Wild.2006.мультфильм.HDTV.x264.1920x1040.RUS.mkv' -> `/HDTV1500H/films/Большое путешествие.The Wild.2006.мультфильм.HDTV.x264.1920x1040.RUS.mkv'
`/HDTV500/films/Большой Лебовски.The Big Lebowski.1998.HDDVD.Remux.1920x1080.VC-1.Goblin.Eng.mkv' -> `/HDTV1500H/films/Большой Лебовски.The Big Lebowski.1998.HDDVD.Remux.1920x1080.VC-1.Goblin.Eng.mkv'
cp: cannot create regular file `/HDTV1500H/films/Большой Лебовски.The Big Lebowski.1998.HDDVD.Remux.1920x1080.VC-1.Goblin.Eng.mkv': Input/output error

syslog: EXT4-fs error (device sdc1): ext4_add_entry: bad entry in directory #12: rec_len % 4 != 0 - offset=0, inode=2027203910, rec_len=36069, name_len=145

Expected results:
copies of all from /HDTV500/films to /HDTV1500H/films

Additional info:

fsck.ext4 -v -C 0 /dev/sdc1
e2fsck 1.41.4 (27-Jan-2009)
Superblock has an invalid journal (inode 8).
Clear<y>? yes

*** ext3 journal has been deleted - filesystem is now ext2 only ***

Resize inode not valid.  Recreate<y>? yes

HDTV1500H contains a file system with errors, check forced.
fsck.ext4: Illegal doubly indirect block found while reading bad blocks inode
This doesn't bode well, but we'll try to go on...
Pass 1: Checking inodes, blocks, and sizes
Bad block inode has illegal block(s).  Clear<y>? yes

Illegal block #0 (666912423) in bad block inode.  CLEARED.

Comment 1 Eric Sandeen 2009-03-04 20:02:24 UTC
Would you be willing to provide an "e2image -r" image of the source filesystem, either as an attachment or in private?  That way I can probably reproduce and narrow down the problem.

If so, a dumpe2fs -h of the target filesystem after you've mkfs'd it would help too.

Thanks,
-Eric

Comment 2 Eric Sandeen 2009-03-07 04:47:48 UTC
Ok, I got the e2image; unfortunately so far I cannot reproduce it.  however, my target filesystem is a bit smaller, I'll try again with one of the proper size and same geometry.

Comment 3 Eric Sandeen 2009-03-09 22:51:52 UTC
I've had no luck reproducing this.  Did you see it more than once?

My best guess at this point is perhaps some memory corruption...

ext4_add_entry: bad entry in directory
#12: rec_len % 4 != 0 - offset=0, inode=2027203910, rec_len=36069, name_len=145

looks like a real mess; your inode nr should probably not be that high, the record length cannot(?) be that long, and I don't think any of your names are that long either...

-Eric

Comment 4 Sergey 2009-03-09 23:10:12 UTC
No, i tried only once :(

Needed to return one of old disk in the same day.
I'll try copy files from 500GB to other 500GB disk this week.

Comment 5 Eric Sandeen 2009-03-10 02:52:56 UTC
If you do hit it, you might try it again on a -debug kernel variant, if it is memory corruption it might get caught sooner, or with more info.

thanks,
-Eric

Comment 6 Sergey 2009-03-16 11:39:01 UTC
No, I cant reproduce it. I tried 2 times without any problem
in the same configuration (files from 500GB disk to 1500GB disk with active 
ktorrents/aMule), only kernel upgraded to 2.6.27.19-170.2.35.fc10.x86_64.

Comment 7 Dennis Kioko 2010-02-01 23:12:44 UTC
I was able to reproduce this on Fedora 12 Kernel 2.6.31.6-166.fc12.i686.PAE . I added a 256 MB DDR SDRAM module to my system and on rebooting, got the above error twice. Removing the RAM module resulted in normal booting. 

The RAM module was a defective one hence the issue was due to corrupt memory.