lkml.org 
[lkml]   [2006]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectext2_readdir failure
While using 2.6.15.6, I've seen ext2_readdir() fail from time to time
with the 'zero length directory entry' error, when there are several
processes are actively creat(2)ing and unlink(2)ing files from a
directory.

The test program tarball is available from
http://masoud.ir/ext2test.tgz (opened tarball at
http://masoud.ir/ext2test/) and consists of a creator (which creates
files with random names and random lengths in a tight loop as fast as
it can) and an eraser (which tries to remove all of the files in that
directory) and the usual /bin/rm, which tries to remove the directory
(and all files within) where eraser and creator are playing in.
It also happens with 2.6.12, 2.6.16-rc5 and 2.6.15-rc6-gc33d4568. This
problem does *not* happen in 2.4.32 kernel.
----
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
rm: cannot remove directory `data': Directory not empty
EXT2-fs error (device hdc1): ext2_readdir: zero-length directory entry
Something bad happened.: Input/output error
----
The machine in question is a dual p3 machine (866MHz) with 384 megs
of ram and IDE harddrives. I've tried the same test programs over ext3
and reiserfs for comparison, and it doesn't happen. I have tried the
test program on several other harddrives (different size, cable,
controller) and on different machines (Dual Opteron) and architectures
(amd64), and I am still seeing the bug, which means that ext2fs is
buggy.
on next reboot, e2fsck checks the filesystem and finds no errors, even
though it has been marked 'contains errors'.

To test, go into an area and untar the test tarball, make and run ./cmd.sh.
cheers,
Masoud Sharbiani
PS: Please CC me, as I am not on the list.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-13 23:07    [W:0.053 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site