Philippe Malinge:
> The coreutils we used is 5.97 included in RHEL 5. It seems not to be an
> old distribution (and exotic).
Ths host you executed rm is RHEL 4 Update, isn't it?
With my test, I found that rm in coreutils-5.2.1 has a problem, but rm
in coreutils-5.97. And your strace doesn't seem to be 5.97.
Also there was an entry in the ChangeLog, and I think the cause is the
combination of aufs + nfs + old rm.
2005-05-13 Jim Meyering <[EMAIL PROTECTED]>
* NEWS: `rm -r' now removes all of the files it should, even on
systems with a buggy readdir affecting file systems inaccessible
at configure time.
In some unusual circumstances `rm -r' would fail to remove --
or even consider -- all entries in a directory with more than 254
(SunOS) or 338 (Darwin) entries. This could cause trouble even on
other types of systems when using an affected file system via e.g.,
NFS. The underlying cause was a bug in readdir on those systems.
Coreutils-5.2.1 and earlier used a configure-time test designed
to detect precisely those problem systems, but it would detect
the problem and enable remove.c's work-around code only when its
configure-time test was run on a losing file system. Obviously,
it couldn't detect a problem if the offending file system wasn't
tested or even mounted at coreutils configure time. Now, rm itself
performs a minimal-cost run-time test to detect the problem.
* src/remove.c (CONSECUTIVE_READDIR_UNLINK_THRESHOLD): Define.
(remove_cwd_entries): When readdir returns NULL for a directory from
which we've removed more than CONSECUTIVE_READDIR_UNLINK_THRESHOLD
entries, call rewinddir and then resume the readdir/unlink loop.
(UNLINK_CAN_UNLINK_DIRS): Rename from ROOT_CAN_UNLINK_DIRS.
I guess your problem is gone if you change just one part of this
combination.
Junjiro Okajima
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/