bugfindutils - Bugs: bug #46670, Find terminates after searching an...

 
 

bug #46670: Find terminates after searching an auto mounted nfs directory

Submitter:  None
Submitted:  Sat 12 Dec 2015 02:46:51 AM UTC
   
 
Category:  find Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  jay
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  4.5.10
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 18 Dec 2015 09:54:24 PM UTC, comment #3: 

This does appear to be the same bug as reported in Gentoo, and it does appear to be fixed by 4.5.15.

I'm not 100% sure because some things have changed in my system since I first reported the bug.  Today, I've only been able trigger it sometimes with 4.4.2.  But I never triggered it with 4.5.15.

I think you should just mark it closed as being fixed 4.5.x.

Reed Cartwright

Anonymous
Fri 18 Dec 2015 05:12:46 PM UTC, comment #2: 

we had a similar report in Gentoo:
https://bugs.gentoo.org/337167

tl;dr: 4.4.x failed but 4.5.x worked

Mike Frysinger <vapier>
Fri 18 Dec 2015 02:03:13 PM UTC, comment #1: 

Thanks for the bug report.  The symptoms you're describing certainly sound like a bug.

Your bug report didn't indicate which version you found this in.  If the affected version is not 4.5.10 or later, could you download version 4.5.14 from http://alpha.gnu.org/pub/gnu/findutils and try to reproduce the problem.   When you build from source two find executables are created: "find" and "oldfind".  It would also be useful to know if the problem manifests the same way in both.

Supposing the problem is reproducible though, on the basis of the limited information we have so far, it's hard to discern what might be responsible.   There are a few ways to get more information.  The simplest is to use the -D option, like this:

find -D search,stat,rates / -uid 1000 -print
(I'm also curious to see if you get the same behaviour if you add -depth).

A system call trace via e.g. strace (or function call trace via ltrace) might also be helpful but they also create such large outputs that unsurprisingly it's not always easy to locate the spot where things went wrong.

Certainly, there are few places where the find executable directly calls exit (for --help, --version, -quit, in child processes).   So evidence - specifically a backrrace - from a debugger may help.   In case you're not familiar with using a debugger, here is an example:

$ gdb --quiet find
Reading symbols from find...(no debugging symbols found)...done.
(gdb) break _exit
Breakpoint 1 at 0x402770
(gdb) break exit
Breakpoint 2 at 0x402ea0
(gdb) run /storage -uid 1000 -print
Starting program: /usr/bin/find /storage -uid 1000 -print
/usr/bin/find: `/storage': No such file or directory

Breakpoint 2, __GI_exit (status=1) at exit.c:104
104 exit.c: No such file or directory.
(gdb) backtrace
#0  __GI_exit (status=1) at exit.c:104
#1  0x00007ffff7753b4c in __libc_start_main (main=0x402f70, argc=5, argv=0x7fffffffe8a8,
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe898)
    at libc-start.c:321
#2  0x000000000040316f in ?? ()
(gdb) quit
A debugging session is active.

Inferior 1 [process 3060] will be killed.

Quit anyway? (y or n) y
$

James Youngman <jay>
Group administrator
Sat 12 Dec 2015 02:46:51 AM UTC, original submission:  

On my system /storage is an autofs-mounted nfs directory.  If I don't exclude that directory, find will stop after it finishes searching /storage and will not search the rest of the hierarchary.

For instance the following command will not return anything after /storage

sudo find / -uid 1000 -print

However, if I exclude storage based on the following command, I do get more results.

sudo find / -path /storage -prune -o -user 1000 -print

My mount layouts are attached.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #35700:  mounts.txt added by None (10KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by vapier (Posted a comment)
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-12-18 jay StatusNone Fixed
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.5.10
    2015-12-18 jay Assigned toNone jay
    2015-12-12 None Attached File- Added mounts.txt, #35700

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code