[bug #27757] findutils and Time Machine, two great tastes that don't go great together

View: New views
6 Messages — Rating Filter:   Alert me  

[bug #27757] findutils and Time Machine, two great tastes that don't go great together

by Petr Hluzin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


URL:
  <http://savannah.gnu.org/bugs/?27757>

                 Summary: findutils and Time Machine, two great tastes that
don't go great together
                 Project: findutils
            Submitted by: nessus
            Submitted on: Mon 19 Oct 2009 07:53:33 PM GMT
                Category: updatedb
                Severity: 3 - Normal
              Item Group: Wrong result
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name:
        Originator Email:
             Open/Closed: Open
         Discussion Lock: Any
                 Release: None
           Fixed Release: None

    _______________________________________________________

Details:

I complained about this problem to fink-users, but I was told that this is an
"upstream bug" and that I should report the bug here instead.

The findutils package adds an anacron job that runs a "find" over all your
filesystems in the wee hours of the morning in order to build the database for
"locate". Unfortunately, if you have installed findutils on Mac OS X and
happen to have a Time Machine disk mounted, it seems that the "find" job run
by anacron will likely crash your Mac.

I believe the reason for this is that Time Machine makes use of an
interesting HFS+ capability wherein you can make hard links to directories.
I'm guessing that Time Machine's extensive use of this feature causes "find"
to rampantly eat up some sort of system resource, which, when exhausted,
causes the system to crash.

Fink reports that version of findutils that I have installed is "4.2.20-7".

|>ouglas





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27757>

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




[bug #27757] findutils and Time Machine, two great tastes that don't go great together

by Petr Hluzin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27757 (project findutils):

                  Status:                    None => Need Info              

    _______________________________________________________

Follow-up Comment #1:

Findutils 4.2.20 was released on 2005-03-17.   A number of bugs have been
fixed since then and certainly the code has changed almost beyond recognition
in the ensuing four and a half years.

Please reproduce the bug on a recent version of findutils (for example 4.5.5,
available from ftp://alpha.gnu.org).

If the problem is reproducible though, I will need more information than
"this program will crash your Mac" to work on the problem - since I don't have
a Mac.  I'm going to leave the bug unassigned for now in case one of the other
contributors happens to have a Mac.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27757>

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




[bug #27757] findutils and Time Machine, two great tastes that don't go great together

by Petr Hluzin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Update of bug #27757 (project findutils):

                  Status:               Need Info => Wont Fix              
             Open/Closed:                    Open => Closed                

    _______________________________________________________

Follow-up Comment #2:

Nobody indicated they could investigate this and you didn't respond on the
question of whether this problem exists in recent releases of findutils, so
I'm going to mark the bug as obsolete.  Please reopen if you can reproduce the
bug on findutils 4.5.x.   Thanks.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27757>

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




[bug #27757] findutils and Time Machine, two great tastes that don't go great together

by Petr Hluzin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #3, bug #27757 (project findutils):

When I have a chance, I'll try to build findutils on my Mac and see if the
problem still exists. Unfortunately, I'm extremely busy at a new job at the
moment.

I can't imagine, however, that if nothing were done specifically to avoid
Time Machine filesystems, that the problem could have gone away on its own.
Running 'find' nightly on a filesystem that allows hard links to directories
can never be a good thing. Not unless find has somehow been modified to be
smart about such things. But hard links to directories have never been allowed
in a Posix-compliant filesystem, have they?

Also, one typically wouldn't want to have the contents of a Time Machine
filesystem cluttering up one's "locate" results anyway, even if it could be
made to work.

Re the request for more information: I'm not sure what additional info you
require. It's not easy to gather more information; I don't recall if there was
even a comprehensible panic message in the log file. Instead of working from
log files, I used the scientific method. I was able to deduce the cause of the
problem due to the fact that the Mac would reliably crash every night in the
wee hours of the morning, when the "locate" database was being updated. I
hypothesized that "find" would use up an infinite amount of system resources
if it were asked to infinitely recurse on a filesystem that allows directory
loops. I turned off my Time Machine disk drive and the problem went away. I
turned it back on  and the problem came back. I then went into the anacron
config file that ran the nightly "locate" db find, and commented out the
offending line. The problem went away.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27757>

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




[bug #27757] findutils and Time Machine, two great tastes that don't go great together

by Petr Hluzin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #4, bug #27757 (project findutils):

POSIX explicitly allows but does not require hard links to directories, and
leaves it up to the implementation whether they will allow this behavior (and
even on systems where it is allowed, POSIX also allows restricting the
creation of directory hard-links to privileged users).  POSIX also requires
that find detect any file system cycles (whether by directory hard links on
systems where they are supported, or when using find -L on cyclical symlinks
which can occur on all POSIX systems) rather than going into an infinite
loop.

Newer findutils uses gnulib's enhanced fts() API, which is supposed to detect
file system loops (due to directory hard links), and avoid infinite loops.
Your original test of findutils 4.2.20 used a hand-rolled iterator rather than
fts(), so it may indeed be a bug that has been fixed in the meantime.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27757>

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




[bug #27757] findutils and Time Machine, two great tastes that don't go great together

by Petr Hluzin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Follow-up Comment #5, bug #27757 (project findutils):

Thanks for the educational info!

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?27757>

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