[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bugs #3998] updatedb: exists early with ". changed during execution"
From: |
James Youngman |
Subject: |
[bugs #3998] updatedb: exists early with ". changed during execution" |
Date: |
Fri, 19 Nov 2004 14:42:58 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 |
This mail is an automated notification from the bugs tracker
of the project: findutils.
/**************************************************************************/
[bugs #3998] Latest Modifications:
Changes by:
James Youngman <address@hidden>
'Date:
Fri 11/19/04 at 19:37 (GMT)
------------------ Additional Follow-up Comments ----------------------------
Did you get a chance to do that test?
/**************************************************************************/
[bugs #3998] Full Item Snapshot:
URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=3998>
Project: findutils
Submitted by: Steve Revilak
On: Mon 06/16/03 at 19:23
Category: updatedb
Severity: 5 - Average
Item Group: None
Resolution: Postponed
Privacy: Public
Assigned to: None
Originator Name:
Originator Email:
Status: Open
Release: None
Fixed Release: None
Summary: updatedb: exists early with ". changed during execution"
Original Submission: I'd like to report a problem with findutils-4.1.20 on
Solaris 7.
I think that a comparison is the easiest way to illustrate. For this,
I'm using an updatedb script and find binary that have been slightly
modified to provide additional debugging information (Diffs are
appended, so that you can see exactly what's changed).
First - just a simple execution of find, run from the root of the
filesystem:
$ time sudo /usr/local/src/findutils-4.1.20/find/find / | wc
^C
real 419m54.387s
user 3m52.060s
sys 34m3.240s
If you factor in nfs shares, / a big filesystem on this machine. I
expected the above to take awhile, but got impatient. Let's try
again, sticking to a single partition:
$ time sudo /usr/local/src/findutils-4.1.20/find/find / -xdev | wc
105906 105906 5109425
real 0m18.742s
user 0m1.430s
sys 0m2.890s
Above, find found 105,906 files in about 18 seconds. Remember these
numbers.
Next - try to run updatedb without any arguments. This should find a
similar number of files (modulo the default set of prunepaths).
$ time sudo /u/srevilak/updatedb
/usr/local/src/findutils-4.1.20/find/find: find.c:528: . changed during
execution of /usr/local/src/findutils-4.1.20/find/find
/u/srevilak/updatedb: debug: entries in /tmp/debug-updatedb: 5
real 0m1.572s
user 0m0.060s
sys 0m0.080s
updatedb comes up with only 5 files, and finishes in under 2 seconds.
To summarize, something in the updatedb invocation of find is causing
it to bail early. Looking around find.c:528, we have
if (stat_buf.st_dev != dir_ids[dir_curr].dev ||
stat_buf.st_ino != dir_ids[dir_curr].ino)
error (1, 0, _("%s changed during execution of %s"), starting_dir,
program_name);
The test seems entirely reasonable, and under some invocations it
never returns positive. Perhaps one of the predicates in the updatedb
invocation isn't taking care of dir_ids properly?
I did notice `[ Bug #3786 ] updatedb fails if it cannot access "." as
the user to whom it switches uid.', but this appears to be something
different. "updatedb --localuser=root --netuser=root" fails in the
same way.
Anyway, if you guys could look into this, I'd really appreciate it.
If you need any additional information, please let me know and I'll be
happy to provide it. If I happen to get any further insight, I'll be
sure to pass it along.
Thanks much!
address@hidden
==================================================================
Aforementioned diffs follow:
==================================================================
updatedb diff.
Change: tee output to a temporary file and say how many files appeared
--- /usr/local/gnu/bin/updatedb 2003-06-06 08:13:25.000000000 -0400
+++ /u/srevilak/updatedb 2003-06-16 07:34:48.938002000 -0400
@@ -100,6 +100,8 @@
: ${bigram=${LIBEXECDIR}/bigram}
: ${code=${LIBEXECDIR}/code}
+find=/usr/local/src/findutils-4.1.20/find/find
+
PATH=/bin:/usr/bin:${BINDIR}; export PATH
: ${PRUNEFS="nfs NFS proc"}
@@ -143,7 +145,8 @@
$find $NETPATHS ( -type d -regex "$PRUNEREGEX" -prune ) -o -print
fi
fi
-} | sort -f | $frcode > $LOCATE_DB.n
+} | sort -f | tee /tmp/debug-updatedb | $frcode > $LOCATE_DB.n
+echo "$0: debug: entries in /tmp/debug-updatedb: `grep -c .
/tmp/debug-updatedb`"
# To avoid breaking locate while this script is running, put the
# results in a temp file, then rename it atomically.
==================================================================
find.c diff.
Change: add __FILE__ and __LINE__ to each error() call containing the
text "changed during execution"
--- find.c.ORIG 2003-05-24 14:36:25.000000000 -0400
+++ find.c 2003-06-16 07:32:57.067319000 -0400
@@ -304,7 +304,7 @@
error (1, errno, "%s", starting_dir);
if (stat_buf.st_dev != starting_stat_buf.st_dev ||
stat_buf.st_ino != starting_stat_buf.st_ino)
- error (1, 0, _("%s changed during execution of %s"), starting_dir,
program_name);
+ error (1, 0, _("%s:%d: %s changed during execution of %s"), __FILE__,
__LINE__, starting_dir, program_name);
}
else
{
@@ -341,7 +341,7 @@
error (1, errno, "%s", pathname);
if (cur_stat_buf.st_dev != stat_buf.st_dev ||
cur_stat_buf.st_ino != stat_buf.st_ino)
- error (1, 0, _("%s changed during execution of %s"), pathname,
program_name);
+ error (1, 0, _("%s:%d: %s changed during execution of %s"), __FILE__,
__LINE__, pathname, program_name);
process_path (pathname, ".", false, ".");
chdir_back ();
@@ -525,7 +525,7 @@
error (1, errno, "%s", pathname);
if (stat_buf.st_dev != dir_ids[dir_curr].dev ||
stat_buf.st_ino != dir_ids[dir_curr].ino)
- error (1, 0, _("%s changed during execution of %s"), starting_dir,
program_name);
+ error (1, 0, _("%s:%d: %s changed during execution of %s"), __FILE__,
__LINE__, starting_dir, program_name);
for (namep = name_space; *namep; namep += file_len - pathname_len + 1)
{
@@ -589,9 +589,9 @@
(dir_curr > 0 ? dir_ids[dir_curr-1].ino :
starting_stat_buf.st_ino))
{
if (dereference)
- error (1, 0, _("%s changed during execution of %s"), parent,
program_name);
+ error (1, 0, _("%s:%d: %s changed during execution of %s"),
__FILE__, __LINE__, parent, program_name);
else
- error (1, 0, _("%s/.. changed during execution of %s"),
starting_dir, program_name);
+ error (1, 0, _("%s:%d: %s/.. changed during execution of %s"),
__FILE__, __LINE__, starting_dir, program_name);
}
}
Follow-up Comments
------------------
-------------------------------------------------------
Date: Fri 11/19/04 at 19:37 By: James Youngman <jay>
Did you get a chance to do that test?
-------------------------------------------------------
Date: Mon 11/08/04 at 21:52 By: James Youngman <jay>
I'm marking this bug postponed for now, but will look at it again when I get
the diagnostic info from the test with findutils-4.2.3 (or later).
-------------------------------------------------------
Date: Sun 10/31/04 at 17:29 By: James Youngman <jay>
findutils 4.2.3 (available on ftp://alpha.gnu.org/gnu/findutils) includes an
enhanced diagnostic for this scenario. Could you re-test with that, please?
Thanks,
James.
-------------------------------------------------------
Date: Mon 06/16/03 at 19:26 By: Steve Revilak <srevilak>
I hit the submit button a little too soon: "exists" in the Summary line should
be "exits". Sorry :(
For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=3998>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [bugs #3998] updatedb: exists early with ". changed during execution",
James Youngman <=
- [bugs #3998] updatedb: exists early with ". changed during execution", anonymous, 2004/11/19
- [bugs #3998] updatedb: exists early with ". changed during execution", Steve Revilak, 2004/11/20
- [bugs #3998] updatedb: exists early with ". changed during execution", James Youngman, 2004/11/20
- [bugs #3998] updatedb: exists early with ". changed during execution", James Youngman, 2004/11/21
- [bugs #3998] updatedb: exists early with ". changed during execution", Steve Revilak, 2004/11/21
- [bugs #3998] updatedb: exists early with ". changed during execution", James Youngman, 2004/11/21
- [bugs #3998] updatedb: exists early with ". changed during execution", Steve Revilak, 2004/11/21
- [bugs #3998] updatedb: exists early with ". changed during execution", James Youngman, 2004/11/21
- [bugs #3998] updatedb: exists early with ". changed during execution", Steve Revilak, 2004/11/23
- [bugs #3998] updatedb: exists early with ". changed during execution", James Youngman, 2004/11/24