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: findutils-4.5.4-1 problem (updatedb crashing)


marian wrote:
This problem has already been reported on 7/22/2009 9:37 PM, but I think to have found the reason for it.
assertion "ent->fts_info == FTS_NSOK || state.type != 0" failed: file "/usr/src/findutils-4.5.4-1/src/findutils-4.5.4/find/ftsfind.c", line 475, function: consider_visiting.
I have downloaded the sources tarball for findutils-4.5.4-1 and checked line 475 of ftsfind.c. The block of code line 475 is part of, follows:


 /* Cope with the usual cases. */
 if (ent->fts_info == FTS_NSOK
     || ent->fts_info == FTS_NS /* e.g. symlink loop */) (THIS IS LINE 475)

--- The comment indicates a possible reason though.

Maybe something in your file system is generating an infinite loop?
Can you run 'find . ' on the filesystems you are indexing and does it 'finish'/run to completion? Send the output to a file...maybe run it using 2 separate Bash windows, in 1 window. Let's say you are only indexing
'/' in your updatedb script, so in the first bash window, run:
find / >/tmp/allfiles.txt 2>/tmp/allfiles_err.txt&
tail -f /tmp/allfiles_err.txt


In the 2nd window, then run:
tail -f /tmp/allfiles.txt

See if it really can find all the files on your disk and not get into
some sort of infinite loop -- you might be able to notice the loop in
window #2 as it 'speeds by' if you start seeing the pathname growing longer
and longer and it seems to have repeated elements in it.

An easy way to cause this is using 'linkd'.


I know 'grep'(and fgrep/egrep) will detect infinte loops and die gracefully,
but pcregrep doesn't and will keep building out the pathname until the
pathname gets too long and it fails. Maybe find doesn't handle something
gracefully? Just a WAG (Wild-Ass-Guess)....based on the comment.


Does your updatedb have the option to follow symlinks enabled? (find with "-L" would follow such links) -- that might generate the same
type of infinite loop.


Hope that's helpful...
linda

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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