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

VM crash while loading many classes

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description



      Name: agR10195 Date: 10/03/2002



      Alexey Gibadullin, ###@###.###

      The following test loads and initilizes all classes and interfaces from
      jar-file, that is passed to the test as an argument.

      import java.io.*;
      import java.util.*;
      import java.util.jar.*;

      public class Bug {
          public static void main(String args[]) {
              if (args.length < 1) {
                  System.out.println("TEST FAILED.");
                  System.out.println("Cannot find JAR file.");
                  System.exit(2);
              }

              JarFile jarFile = null;

              try {
                  jarFile = new JarFile(args[0]);
              } catch (IOException e) {
                  System.out.println("TEST FAILED.");
                  System.out.println("Cannot create JarFile.");
                  System.exit(2);
              }

              Enumeration enumeration = jarFile.entries();

              try {
                  for (; enumeration.hasMoreElements(); ) {
                      JarEntry jarEntry = (JarEntry) enumeration.nextElement();
                      String fileName = jarEntry.getName();
                      int j = fileName.lastIndexOf(".class");

                      if (j != -1) {
                          String className = fileName.substring(0, j);
                          className = className.replace('/', '.');

                          try {
                              Class initClass = Class.forName(className);
                              System.out.println("Class loaded: " + initClass);
                          } catch (ClassNotFoundException e) {}
                      }
                  }
              } catch (OutOfMemoryError e) {
                  System.exit(0);
              }
          }
      }

      I've run the test on all platforms in all modes against Mantis-b02 to load
      classes from tools.jar file and used -XX:MaxPermSize=4M option.

      I have observed two crashes:

      1. on Solsparc machines (Ultra-10, 440MHz, 512Mb; Ultra-60, 400MHz, 512Mb),
         Server VM, -Xcomp mode

      $ ../jdk1.4.2-b02/solaris-sparc/bin/java -server -Xcomp -cp
        ../jdk1.4.2-b02/solaris-sparc/lib/tools.jar:. -XX:MaxPermSize=4M Bug
        ../jdk1.4.2-b02/solaris-sparc/lib/tools.jar
      ...
      Class loaded: interface com.sun.jdi.request.WatchpointRequest
      Class loaded: interface com.sun.jdi.request.ModificationWatchpointRequest
      Class loaded: interface com.sun.jdi.request.VMDeathRequest
      #
      # HotSpot Virtual Machine Error, Internal Error
      # Please report this error at
      # http://java.sun.com/cgi-bin/bugreport.cgi
      #
      # Java VM: Java HotSpot(TM) Server VM (1.4.2-beta-b02 compiled mode)
      #
      # Error ID: 43492F424A454354264143544F52590E4350500170 01
      #
      # Problematic Thread: prio=5 tid=0x000e1538 nid=0xb runnable
      #
      Abort

      2. on Solsparc machines (Ultra-10, 440MHz, 512Mb; Ultra-60, 400MHz, 512Mb) and
         on Linux machines (P-III, 600MHz, 512Mb; dual P-III, 600MHz, 512Mb),
         Client VM, -Xcomp mode
      $ ../jdk1.4.2-b02/linux-i586/bin/java -Xcomp -cp
        ../jdk1.4.2-b02/linux-i586/lib/tools.jar:. -XX:MaxPermSize=4M Bug
        ../jdk1.4.2-b02/linux-i586/lib/tools.jar
      ...
      Class loaded: class com.sun.tools.doclets.standard.SubWriterHolderWriter
      Class loaded: class com.sun.tools.doclets.standard.AbstractTreeWriter
      Class loaded: class com.sun.tools.doclets.standard.ClassSubWriter
      #
      # HotSpot Virtual Machine Error, Internal Error
      # Please report this error at
      # http://java.sun.com/cgi-bin/bugreport.cgi
      #
      # Java VM: Java HotSpot(TM) Client VM (1.4.2-beta-b02 compiled mode)
      #
      # Error ID: 4349254E560E435050012C 01
      #
      # Problematic Thread: prio=5 tid=0x000bb290 nid=0xa runnable
      #
      Abort


      The test also used to crash Merlin-b92 VM with '4349254E560E43505000C1 01'
      Error ID. See the bugs

          4675027 hotspot vm crashes when Perm Space filled up
          4533120 Customer seeing a crash while running BEA Weblogic in "-client"

      Please, note the test crashes neither Server, nor Client Hopper-b12 VMs.

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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              collins Gary Collins (Inactive)
              Reporter:
              gazsunw Gaz Gaz (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: