Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4925707

cannot open more than 2035 files on Win98

    XMLWordPrintable

Details

    • b38
    • generic, x86
    • solaris_8, windows_98
    • Verified

    Description



      Name: ngR10089 Date: 09/19/2003


       
      The JCK tests run fails on Windows-98 when compiler is started in the
      sameJVM mode by Javatest Agent. The failure is reproduced under jdk 1.5.0
      b19. jdk 1.5.0-b15 executes the tests successully.

      To reproduce failure:
      (1) put the attached rw-jck.sh and jck.jti in a directory on win98 machine,
          (log file, jtb file and 'wd' directory will be created here during the
          test execution);
      (2) fix JH and JCKDIR references in rw-jck.sh according to your network
          drive mapping.
      (3) run rw-jck.sh in MKS KornShell window
           ./rw-jck.sh > log 2>&1
      After successfully execution more than 600 tests the compiler reports
      the errors:

      error: cannot read:
      tests\lang\CONV\conv053\conv05303m100111\conv05303m100111.java
      1 error
      error: cannot read:
      tests\lang\CONV\conv053\conv05303m100122\conv05303m100122.java
      1 error

      The compiler messages may be found in log file. The results of test
      executions
      may be found in 'wd' directory.

      ======================================================================

      ###@###.### 2003-11-21

      Here is a variant of Pavel's program that reproduces the failure without JCK tests at all.
      Put both files in the same directory, change the path to JDK in the script and run it under MKS ksh in win98. The script creates 2000 copies of the java file
      changing its name and then compiles all of them in the same JVM.
      Compilations begin to fail after 1000 or so steps (close to 1024 btw ;)

      --------- r --------------
      JH=r:/jdk/1.5/promoted/all/b28/binaries/windows-i586

      k=2000
      n=$k
      while [ $n -gt 0 ]
      do
         echo $n
         sed -e "s/public class CompileSameVM/public class CompileSameVM$n/" CompileSameVM.java > CompileSameVM${n}.java
         n=$(($n-1))
      done

      ${JH}/bin/javac -classpath ${JH}/lib/tools.jar -d . CompileSameVM.java
      ${JH}/bin/java -version
      ${JH}/bin/java -cp "${JH}/lib/tools.jar;." CompileSameVM $k 2>&1|tee log
      ---------end of r ----------------
      ------------------CompileSameVM.java-----------------

      public class CompileSameVM {

          public static void main(String args[]) {
              int N = 0;
              System.out.println("args#: " + args.length);
              if ( args.length > 0 ) {
                try {
                  N = Integer.valueOf(args[0]).intValue();
                } catch (NumberFormatException e) {
                  System.out.println("invalid argument: " + args[1]);
                }
              }
              System.out.println("# of compilations: " + N);
              for (int i = 1; i <= N ; i++) {
                  System.out.println(i + " : " );
                  try {
                      String[] files = new String[1];
                      files[0] = "CompileSameVM" + i + ".java";
                      String[] pre_args = {"-d", "."};
                      String[] cargs = new String[pre_args.length + files.length];
                      System.arraycopy(pre_args, 0, cargs, 0, pre_args.length);
                      System.arraycopy(files, 0, cargs, pre_args.length, files.length);
                      
                      int status = com.sun.tools.javac.Main.compile(cargs);

                  } catch (Exception e) {
                      System.err.println(e.getMessage());
      e.printStackTrace();
                      return;
                  }
              }
          }
      }
      --------------------------------------------------------

      ---------------output------------------------
      args#: 1
      # of compilations: 2000
      1 :
      2 :
      ....
      1011 :
      1012 :
      1013 :
      CompileSameVM1013.java:2: error while writing CompileSameVM1013: .\CompileSameVM1013.class (Bad file descriptor)
      (source unavailable)
      1 error
      1014 :
      CompileSameVM1014.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1015 :
      CompileSameVM1015.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1016 :
      CompileSameVM1016.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1017 :
      CompileSameVM1017.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1018 :
      CompileSameVM1018.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1019 :
      CompileSameVM1019.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1020 :
      CompileSameVM1020.java:25: package com.sun.tools.javac does not exist
      (source unavailable)
      1 error
      1021 :
      Fatal Error: Unable to locate package java.lang in classpath or bootclasspath
      1022 :
      error: cannot read: CompileSameVM1022.java
      1 error
      1023 :
      error: cannot read: CompileSameVM1023.java
      1 error
      1024 :
      ...
      ---------------------------------------------

      =====================================================================

      Attachments

        Issue Links

          Activity

            People

              martin Martin Buchholz
              nvgsunw Nvg Nvg (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: