Thu 07 Oct 2010 09:50:37 AM UTC, comment #9:
If neither of us has access to a suitable machine for testing, or even to establish if the bug still exists, it's going to be hard to confirm the situation still continues in recent releases. It will also be hard to test a possible fix. I appreciate there's nothing you can do about this. Please re-open the bug if it should siumultaneously be the case that
1. you (or anybody else) discover the bug still remains
2. you (or anybody else) can test patches
|
Sun 11 Apr 2010 01:56:34 AM UTC, comment #8:
Sorry, I no longer work in an environment where the bug is reproducible, perhaps only occurring with a particular Solaris automounter implementation. I have the vague recollection that this bug is not completely fixed, so I would keep it open. Thanks for your persistence as GNU find maintainer.
|
Sat 10 Apr 2010 11:12:42 PM UTC, comment #7:
Ping! Could you recheck a recent 4.5.x release (for example 4.5.8)?
|
Mon 13 Apr 2009 12:01:25 AM UTC, comment #6:
Does this problem still occur in findutils-4.5.4?
|
Tue 19 Feb 2008 01:21:53 AM UTC, comment #5:
I believe the bug is likely to be in the link count handling, but your transcript doesn't provide evidence either way, as it shows information about mostly uninteresting directories; compare for example though the link count of the "make" subdirectory over time.
However, I am not in a position to speculate on changes to the Solaris automounter, as I have no access to a Solaris system.
|
Tue 19 Feb 2008 01:10:42 AM UTC, comment #4:
I tried the proposed patch, but it didn't work for me.
I admit to being confused about this.
I expected the bug to be related to not counting
subdirectories in the link count, but here it seems
to be something else --
perhaps link counts of mount point directories being 1?
Has the automounter changed since previous Solaris versions?
The underlying cause of the failure remains to be properly
diagnosed. fts.c is hairy.
|
Mon 18 Feb 2008 08:30:30 PM UTC, comment #3:
Here is a better shell transcript,
showing the evolution of the link counts over time,
and demonstrating that Solaris find does not have
the same problem.
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ perl -e 'use File::stat; opendir(D, "."); print map {sprintf "%s nlinks=%d %s\n", $_, stat($_)->nlink, (-d $_ ? "DIR" : "")} readdir(D)'
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=1 DIR
src nlinks=1 DIR
make nlinks=1 DIR
test nlinks=1 DIR
agent nlinks=1 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ /usr/bin/find . -name '*.cpp' 2>/dev/null | wc -l
1636
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ perl -e 'use File::stat; opendir(D, "."); print map {sprintf "%s nlinks=%d %s\n", $_, stat($_)->nlink, (-d $_ ? "DIR" : "")} readdir(D)'
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=7 DIR
build nlinks=8 DIR
deleted_files nlinks=8 DIR
Codemgr_wsdata nlinks=3 DIR
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ sleep 900; perl -e 'use File::stat; opendir(D, "."); print map {sprintf "%s nlinks=%d %s\n", $_, stat($_)->nlink, (-d $_ ? "DIR" : "")} readdir(D)'
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=1 DIR
src nlinks=1 DIR
make nlinks=1 DIR
test nlinks=1 DIR
agent nlinks=1 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ ~/src/findutils-4.3.12/find/find . -name '*.cpp' 2>/dev/null | wc -l
0
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ perl -e 'use File::stat; opendir(D, "."); print map {sprintf "%s nlinks=%d %s\n", $_, stat($_)->nlink, (-d $_ ? "DIR" : "")} readdir(D)'
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=1 DIR
make nlinks=1 DIR
test nlinks=1 DIR
agent nlinks=1 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
(mb29450@suttles) jdk/7/ws/MASTER/hotspot $ repeat 8 (~/src/findutils-4.3.12/find/find . -name '*.cpp' 2>/dev/null | wc -l; perl -e 'use File::stat; opendir(D, "."); print map {sprintf "%s nlinks=%d %s\n", $_, stat($_)->nlink, (-d $_ ? "DIR" : "")} readdir(D)')
176
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=1 DIR
test nlinks=1 DIR
agent nlinks=1 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
1274
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=1 DIR
agent nlinks=1 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
1274
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=1 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
1284
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=7 DIR
build nlinks=1 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
1324
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=7 DIR
build nlinks=8 DIR
deleted_files nlinks=1 DIR
Codemgr_wsdata nlinks=1 DIR
1636
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=7 DIR
build nlinks=8 DIR
deleted_files nlinks=8 DIR
Codemgr_wsdata nlinks=1 DIR
1636
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=7 DIR
build nlinks=8 DIR
deleted_files nlinks=8 DIR
Codemgr_wsdata nlinks=3 DIR
1636
. nlinks=9 DIR
.. nlinks=12 DIR
doc nlinks=7 DIR
src nlinks=7 DIR
make nlinks=4 DIR
test nlinks=9 DIR
agent nlinks=7 DIR
build nlinks=8 DIR
deleted_files nlinks=8 DIR
Codemgr_wsdata nlinks=3 DIR
|
Sat 16 Feb 2008 12:50:05 PM UTC, comment #2:
Please let me know if the attached patch to gnulib works around the problem.
(file #15049)
|
Sat 16 Feb 2008 11:33:59 AM UTC, comment #1:
bug #9043 related to a spurious mutation warning, as you know, since you diagnosed it. This looks like a wholly different problem, also involving the Sun automounter. Aside from that it's not obvious that they have much in common.
The evidence that you present in your transcript is that find has done something to cause the aoutomounter to mount an additional filesystem. I'm not sure what action on the part of find had that effect on the automounter, but I can't see that such an action could be "wrong" on find's part.
Specifically, was there an existing file which matched the criteria expressed in the predicates you gave which was not printed (since in this case the defautl -print is in effect)? Was there a file whose name was printed which did not match the criteria? If either of those things is true, then there is a bug (unless the file appeared in or disappeared from a directory after find searched it; Unix filesystems generally don't offer read isolation).
Now, if on the other hand you have found that find is failing to search (recurse into, effectively) an existing directory which was mounted at the time find was started, then yes, that looks like a bug (since in theory the unsearched directory could contain a filename of interest, as we're searching for glob patterns in your example). If that's the case, could you please indicate the result of stat(2)ing the affected directory both before and after? Is the initial link count 2 or less? What is the final link count?
|
Wed 13 Feb 2008 05:16:07 AM UTC, original submission:
bug #9043: find fails on automounter paths
has regressed, apparently with the introduction of
gnulib/fts
Even specifying --enable-leaf-optimisation=no
has no effect when fts is enabled because
gnulib fts appears to assume that the leaf optimisation
is always correct...fts.c states
" Otherwise, we assume that the number
- of subdirectories in a node is equal to the number of links to the parent."
Here is the output of a series of find commands.
Each invocation of find causes the automounter to
mount another filesystem, and causes the find command
to search more files. The workaround is to build
findutils --without-fts
$ (pwd; FIND=~/src/findutils-4.3.12/find/find; repeat 4 (mount | grep /hotspot; $FIND -name '*.cpp' | wc -l; echo ---; sleep 10); $FIND --version; uname -a)
/java/jdk/7/ws/MASTER/hotspot
0
---
/net/jdk.sfbay/export/disk7/jdk7/hotspot/doc on jdk.sfbay:/export/disk7/jdk7/hotspot/doc remote/read/write/nosetuid/nodevices/intr/retrans=10/retry=3/xattr/dev=4f462a3 on Tue Feb 12 20:57:51 2008
176
---
/net/jdk.sfbay/export/disk7/jdk7/hotspot/doc on jdk.sfbay:/export/disk7/jdk7/hotspot/doc remote/read/write/nosetuid/nodevices/intr/retrans=10/retry=3/xattr/dev=4f462a3 on Tue Feb 12 20:57:51 2008
/net/jdk.sfbay/export/disk7/jdk7/hotspot/src on jdk.sfbay:/export/disk7/jdk7/hotspot/src remote/read/write/nosetuid/nodevices/intr/retrans=10/retry=3/xattr/dev=4f462a4 on Tue Feb 12 20:58:02 2008
1274
---
/net/jdk.sfbay/export/disk7/jdk7/hotspot/doc on jdk.sfbay:/export/disk7/jdk7/hotspot/doc remote/read/write/nosetuid/nodevices/intr/retrans=10/retry=3/xattr/dev=4f462a3 on Tue Feb 12 20:57:51 2008
/net/jdk.sfbay/export/disk7/jdk7/hotspot/src on jdk.sfbay:/export/disk7/jdk7/hotspot/src remote/read/write/nosetuid/nodevices/intr/retrans=10/retry=3/xattr/dev=4f462a4 on Tue Feb 12 20:58:02 2008
/net/jdk.sfbay/export/disk7/jdk7/hotspot/make on jdk.sfbay:/export/disk7/jdk7/hotspot/make remote/read/write/nosetuid/nodevices/intr/retrans=10/retry=3/xattr/dev=4f462a5 on Tue Feb 12 20:58:20 2008
1274
---
find (GNU findutils) 4.3.12
Copyright (C) 2007 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Eric B. Decker, James Youngman, and Kevin Dalley.
Built using GNU gnulib version 0ecab77568dafa1f0b67627f319efe88d51d3b86
Features enabled: O_NOFOLLOW(enabled) LEAF_OPTIMISATION FTS() CBO(level=0)
SunOS suttles 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Blade-1000 Solaris
|