Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 337167 - sys-apps/findutils-4.4.2 - find finds only a single instance of a -name 'foo*' / does not decend into /etc/ or /usr when using autofs
Summary: sys-apps/findutils-4.4.2 - find finds only a single instance of a -name 'foo*...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL: https://savannah.gnu.org/bugs/index.p...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-13 21:38 UTC by jan vereecke
Modified: 2015-12-29 05:32 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jan vereecke 2010-09-13 21:38:40 UTC
running 'find' as emerged from the stable version 4.4.2 from the root directory (e.g. find / -type d ) doesn't descend in all directories (/usr and /etc are not entered). See the url for the topic discussing this. The current unstable version 4.5.9 runs the test cases correctly. 

Please stabilize a newer version than 4.4.2 and run the test case find / -type d | egrep '^/usr'
Comment 1 SpanKY gentoo-dev 2010-09-14 14:28:15 UTC
post all relevant information in the bug report.  referring to external forum postings is not ok.
Comment 2 jan vereecke 2010-09-14 18:50:32 UTC
Venus /mnt/PC-INFO/TODO # ls -l /usr/local/bin/planwakeup*
-rwxr-xr-- 1 root 1002 3134 sep 30 2009 /usr/local/bin/planwakeup.sh
Venus /mnt/PC-INFO/TODO # find / -name 'planwakeup*'
/mnt/PC-INFO/bin/planwakeup.sh 

As you can see, find does not find the file /usr/local/bin/planwakeup.sh, although it finds a simmilar named file in another directory


Then I did some more testing:

find /usr/local/bin/ -name 'planwake*'
/usr/local/bin/planwakeup.sh

find /usr/local/ -name 'planwake*'
/usr/local/bin/planwakeup.sh

find /usr/ -name 'planwake*'
/usr/local/bin/planwakeup.sh

find / -name 'planwake*'
/mnt/PC-INFO/bin/planwakeup.sh 

So the first three commands manage to find the file, whereas the last one doesn't (It still finds another instance of the file). 

none of the directories in the path /usr/local/bin/ is a symlink

There is further strangeness:

Quote:
find / -type d
lists many directories, but does not enter /usr !

Quote:
find / -type d -maxdepth 2
does enter /usr

Quote:
find / -name 'planwake*'
does not find the file

Quote:
find / -maxdepth 4 -name 'planwake*'
/etc/acpi/fast-shutdown.d/planwakeup
/usr/local/bin/planwakeup.sh


Look how it now also finds an instance of the filename in /etc ! Further testing also shows that without the maxdepth option the /etc directory is also skipped. 

The issue was solved by emerging a newer version of findutils
echo '=sys-apps/findutils-4.5.9' > /etc/portage/package.keywords/findutils && emerge -uatv findutils 

now find always correctly locates the file.

As a test, I re-emerged 
rm /etc/portage/package.keywords/findutils && emerge -uatv findutils 
(this emerges sys-apps/findutils-4.4.2), and the problem (not finding files in /usr) reappeared. My conclusion is that this is a bug in r4.4.2 that has been solved by (latest) 4.5.9
Comment 3 SpanKY gentoo-dev 2010-09-15 02:04:22 UTC
we arent stabilizing a 4.5.x version.  it has many worse known issues and it is purely an "alpha" release series.

if there's a specific change that can be added to 4.4.x, we can merge it.  but no one else has noticed issues like this and 4.4.2 has been in stable for almost a year now.

post the output of `emerge --info` like every bug report says to, and post the output of `mount`.  further, run one of those simpler finds through strace and post the output as an attachment.
Comment 4 jan vereecke 2010-09-24 15:12:20 UTC
I made an strace of 
find / -type d
and 
find / -type d -maxdepth 100
and did a diff between them. I found many lines in the diff referring to an autofs loaded nfs drive

command mount shows
"/usr/portage on /mnt/autofs/nfs/Venus/usr/portage type none (rw,bind)"

I then stopped both the autofs and nfs service. After this find worked as expected. I will do some more experiments to pinpoint the problem more precisely and try to create an easily reproducable case.
Comment 5 Norman Back 2011-07-01 08:39:53 UTC
I can confirm this issue.

With 4.4.2 and autofs started
# find / -name alsactl
returns nothing

but
# find /usr -name alsactl
/usr/sbin/alsactl


# /etc/init.d/autofs stop

# find / -name alsactl
/usr/sbin/alsactl
/should-be-sbin/alsactl

/should-be-sbin is in the / partition

Upgrading to sys-apps/findutils-4.5.10 resolves the issue.

net-fs/autofs-5.0.5-r5 is installed
Comment 6 SpanKY gentoo-dev 2015-12-29 05:32:39 UTC
4.6.0 is in the tree and on the stable track which should have this issue fixed