Bug 488343 - ext4: EXT4-fs error (device sdc1): ext4_add_entry: bad entry in directory #12: rec_len % 4 != 0
ext4: EXT4-fs error (device sdc1): ext4_add_entry: bad entry in directory #12...
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
x86_64 Linux
low Severity high
: ---
: ---
Assigned To: Eric Sandeen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2009-03-03 14:50 EST by Sergey
Modified: 2010-02-01 18:12 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-05-20 22:00:53 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sergey 2009-03-03 14:50:10 EST
Description of problem:

I cant copy file hierarchy from ext3 to ext4

Version-Release number of selected component (if applicable):
Fedora 10 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 15:02:24 EST
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.

Comment 2 Eric Sandeen 2009-03-06 23:47:48 EST
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 18:51:52 EDT
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...

Comment 4 Sergey 2009-03-09 19:10:12 EDT
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-09 22:52:56 EDT
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.

Comment 6 Sergey 2009-03-16 07:39:01 EDT
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
Comment 7 Dennis Kioko 2010-02-01 18:12:44 EST
I was able to reproduce this on Fedora 12 Kernel . 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.

Note You need to log in before you can comment on or make changes to this bug.