Bug 43820 - getdents64 doesn't work on nfs remote mounted fs in java jar program.
getdents64 doesn't work on nfs remote mounted fs in java jar program.
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Depends On:
  Show dependency treegraph
Reported: 2001-06-07 06:28 EDT by jacques klein
Modified: 2007-04-18 12:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-27 13:14:29 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description jacques klein 2001-06-07 06:28:58 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.5 [en] (X11; I; IRIX 6.2 IP22)

Description of problem:
I discovered that the java jar utililty (sun's jdk1.2.2, and IBM's java 1.3
sdk) doesn't work in some situations:
"jar cvf file.jar dirRoot" only puts dirRoot into the .jar file and not all
the files in dirRoot's subdirectories,
but only in the case of beeing on some remote mounted nfs filesystems (on a
RedHat 7.0 for ex., 
also on SGI IRIX machines).

How reproducible:

Steps to Reproduce:
1.mount or automount a filesystem from a not RedHat 7.1 host
2.cd to a directory located on the remote fs.
3.do "jar cvf afile.jar adirWithSubdirs"

Actual Results:  the .jar file will only contain the topdirectory and not
all the subdirs and files

Expected Results:  the .jar file sould contain the complete tree of dirs
and files under the topdirectory given as last arg.

Additional info:

It works fine if the remote mounted nfs filesystem is on a RedHat 7.1

Using strace, I found out that on RedHat 7.1 the jar program uses ....64()
file functions, on RedHat 7.0, it defaults to NOT_64() functions after the
first call to stat64() has returned ENOSYS (Function not implemented) and
works fine by diving into the directory tree
Comment 1 Need Real Name 2002-02-09 19:10:02 EST
this same bug affects java.io.File::list().

The following fails to list all files on an SGI 6.5 kernel mounted by 2.4.9-smp

import java.io.*;

public class ls
   public static void main(String[] theArgs)
      System.out.println("Java ls of ["+theArgs[0]+"]");
      File aDir = new File(theArgs[0]);
      String aList[] = aDir.list();
      for(int c=0; c<aList.length; c++)
         System.out.println("--> ["+aList[c]+"]");
Comment 2 Ulrich Drepper 2004-09-27 13:14:29 EDT
Several NFS implementations are buggy.  You probably run into one of
these.  Get a better NFS server.

Note You need to log in before you can comment on or make changes to this bug.