This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: find reports an internal system loop on cygdrive

On Thu, 19 Jan 2006, Brian Keener wrote:

> Igor Peshansky wrote:
> > The real directory is causing find to recurse into the /cygdrive/*
> > hierarchy, and that, in turn, causes the internal loop error.  Note that
> > if you had a c:\bwinrcb file, it would be found with the real /cygdrive
> > directory, and not found without it (using your command).  Also note that
> > in the new versions of Cygwin (probably 1.5.19), /cygdrive will be listed
> > in "/" even if it's a virtual directory.
> >
> > Also, all of what you've described in your message is normal expected
> > behavior.
> Okay I think I get it now and just to test you I created a
> C:\bwinrcb.txt and then did the find without the -xdev and with only a
> virtual cygdrive and sure enough the find failed to find the
> C:\bwinrcb.txt file.
> Then I turned around a created a real cygdrive directory in
> /cygdrive/c/cygwin and tried the following:
> BrianK@atl-lt-5783 ~
> $ find / -depth -name "*winrc*"
> /cygdrive/c/bwinrcb.txt
> find: Filesystem loop detected; `/cygdrive/c/cygwin' has the same device number
> and inode as a directory which is 3 levels higher in the filesystem hierarchy.
> BrianK@atl-lt-5783 ~
> $ find / -xdev -depth -name "*winrc*"
> BrianK@atl-lt-5783 ~
> $
> As you can see in the first one it finds the bwinrcb.txt file but you
> get the internal loop warning.  If I then use the -xdev to prevent the
> message it of course doesn't find the file because I essentially told it
> now to look there.  While it makes sense it does sort of seem like a
> catch 22 and still a bit confusing - is the find actually finishing or
> is it aborting when it finds the loop and therefore will never search
> the entire path it might have access to.
> Thanks for the assistance from all and the additional info.

Well, that's easy enough to test as well: just create a
"c:\cygwin\bwinrcb.txt" and "c:\q\qwinrcq.txt", make sure that when you do
a 'find /cygdrive/c -name "*winrc"', you get them in the following order:
["c:\bwinrcb.txt", "c:\cygwin\bwinrcb.txt", "c:\q\qwinrcq.txt"], and then
run the command that prints the message and see if you get the
"c:\q\qwinrcq.txt" in the output.

However, I'll save you the trouble by noting that, according to the
findutils sources, the message is just a warning and doesn't stop further
traversal (though it does act like -prune -- the offending directory is
not traversed again).
      |\      _,,,---,,_ |
ZZZzz /,`.-'`'    -.  ;-;;,_		Igor Peshansky, Ph.D. (name changed!)
     |,4-  ) )-,_. ,\ (  `'-'		old name: Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Las! je suis sot... -Mais non, tu ne l'es pas, puisque tu t'en rends compte."
"But no -- you are no fool; you call yourself a fool, there's proof enough in
that!" -- Rostand, "Cyrano de Bergerac"

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]