[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bugs #9043] find fails on automounter paths

From: James Youngman
Subject: [bugs #9043] find fails on automounter paths
Date: Sun, 21 Nov 2004 17:30:46 -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 #9043] Latest Modifications:

Changes by: 
                James Youngman <address@hidden>
                Sun 11/21/04 at 22:24 (GMT)

------------------ Additional Follow-up Comments ----------------------------
I will shortly issue a release in which get_mounted_filesystems() does not 
return NULL on Solaris.    I've also addressed the issue of relative pathnames 
(in a failrly simplistic way).

[bugs #9043] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9043>
Project: findutils
Submitted by: VenkateswaraRao
On: Fri 05/21/04 at 10:25

Category:  find
Severity:  5 - Average
Item Group:  None
Resolution:  None
Privacy:  Public
Assigned to:  None
Originator Name:  
Originator Email:  
Status:  Open
Release:  None
Fixed Release:  4.2.6

Summary:  find fails on automounter paths

Original Submission:  The stat checks causing the find to quit where:
    * The find path is an SUN automounter directory and
    * It's not already mounted

~> find /proj/test
find: /proj/test changed during execution of find 
~> sudo umount /proj/test
~> gnu find /proj/test/.


Follow-up Comments

Date: Sun 11/21/04 at 22:24         By: James Youngman <jay>
I will shortly issue a release in which get_mounted_filesystems() does not 
return NULL on Solaris.    I've also addressed the issue of relative pathnames 
(in a failrly simplistic way).

Date: Sun 11/21/04 at 21:52         By: 0 <None>
I (martin.buchholz at sun.com) tried the fix as of 
2004-11-21, but it didn't work.  I instrumented the code as 
below to print debug info.

$ find test -name foobar
get_mount_point_state: dir=test was_mounted=0 is_mounted=0
wd_sanity: stateChange=MountPointStateUnchanged
wd_sanity: direction=down
find: test changed during execution of find (old device number 81032649, new 
device number 80744648, filesystem type is nfs) [ref 827]

$ find -version; uname -a
GNU find version 4.2.6
SunOS suttles 5.9 Generic_112233-05 sun4u sparc SUNW,Sun-Blade-1000

I see two serious problems with the fix in 4.2.6:
1. get_mounted_filesystems does not always return useful
   information.  On Solaris it appears to return NULL.
   FSTYPE_MNTENT is not defined in config.h.
2. Even if mount_points contained a complete list of mounted
   filesystems, the call to list_item_present might pass
   in a relative name, and thus not be found.  Some kind
   of complicated canonicalization would be required to
   check whether the filesystem in question was recently
   mounted or unmounted.

--- find/find.c~        2004-11-21 04:18:59.000000000 -0800
+++ find/find.c 2004-11-21 13:26:56.133944000 -0800
@@ -586,6 +586,18 @@
   return 0;
+static void
+  const char *s = mount_points;
+  fprintf(stderr, "mount_points=");
+  while (s && *s) {
+    fprintf(stderr, " %s", s);
+    s+=strlen(s);
+  }
+  fprintf(stderr,"n");
 /* Determine if a directory has recently had a filesystem 
  * mounted on it or unmounted from it.
@@ -605,6 +617,9 @@
   is_mounted = list_item_present(dir, mount_points);
+  fprintf(stderr, "get_mount_point_state: dir=%s was_mounted=%d 
+         dir, was_mounted, is_mounted);
+  print_mount_points();
   if (was_mounted == is_mounted)
     return MountPointStateUnchanged;
   else if (is_mounted)
@@ -689,6 +704,7 @@
          switch (transition)
            case MountPointRecentlyUnmounted:
+             fprintf(stderr, "wd_sanity: 
              isfatal = 0;
              error (0, 0,
                     _("Filesystem %s has recently been unmounted."),
@@ -696,6 +712,7 @@
            case MountPointRecentlyMounted:
+             fprintf(stderr, "wd_sanity: 
              isfatal = 0;
              error (0, 0,
                     _("Filesystem %s has recently been mounted."),
@@ -703,6 +720,7 @@
            case MountPointStateUnchanged:
+             fprintf(stderr, "wd_sanity: 
              isfatal = 1;
@@ -710,6 +728,8 @@
       if (isfatal)
+         fprintf(stderr, "wd_sanity: direction=%sn",
+                 direction == TraversingDown ? "down" : "up");
          fstype = filesystem_type(thing_to_stat, ".", newinfo);
          error (isfatal, 0,
                 _("%s%s changed during execution of %s (old device number %ld, 
new device number %ld, filesystem type is %s) [ref %ld]"),

Date: Sun 11/21/04 at 10:38         By: James Youngman <jay>
I think that automountd is the common factor here.  When you chdir() into an 
aoutomounted directory, that directory is mounted which causes the device 
number (and inode of course) to change.  This alarms the csanity check that we 

Date: Mon 11/08/04 at 21:47         By: James Youngman <jay>
findutils-4.2.4 has some extra diagnostics for this situation,  could you 
retest with that version and let me know what error message is produced?   

(marked postponed, pending a response)

CC List

CC Address                          | Comment
martin --DOT-- buchholz --AT-- sun --DOT-- com | 
levon --AT-- movementarian --DOT-- org | 

For detailed info, follow this link:

  Message sent via/by Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]