bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #12044] find still hangs on dead NFS filesystems on Solaris


From: James Youngman
Subject: [bugs #12044] find still hangs on dead NFS filesystems on Solaris
Date: Mon, 28 Feb 2005 09:34:05 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)

Follow-up Comment #11, bugs #12044 (project findutils):

To recap what remains of our original discussion, we still have one candidate
left: -

To chdir() to a subdir, you
- stat("."); save dot_fd;
- st = lstat(file); if ISDIR {
chdir(file);
check stat(".") matches st inode and filesystem.
if not, fchdir(dot_fd) and retry.

Keep track of retry count. Retry at least once, but perhaps
only once.

This is substantially the same as the current implementation, except for the
fact that the "retry" takes the place of our existing check of the list of
mounted filesystems.  This looks like a promising approach.  

If the chdir() check actually failed because someone is trying to exploit the
very race condition that the check exists to detect, then the second cycle of
stat-chdir-stat (i.e. the first retry) will then notice that "foo" is now a
symbolic link.  This seems to me to be the right thing.

I have a small lingering concern that there may be tests in the predicate
list (-prune for example) which would have been true for the old "foo" but
now will be false for the new "foo".  Similarly the other way around; some
tests that were false may now be true.  Will it be necessary to re-do all the
predicates  on the command line which don't have side effects?

    _______________________________________________________

This item URL is:

  <http://savannah.gnu.org/bugs/?func=detailitem&item_id=12044>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]