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

1.4 FCS release - Large applications will not run with -Xrunhprof:cpu=times.

XMLWordPrintable

    • 04
    • x86
    • linux, windows_nt, windows_2000

      Please refer to Incident #144059 filed by Sitraka :

      Registering interest in JVMPI_EVENT_METHOD_EXIT will occasionaly cause client JVMs to hang after an indeterminate amount of time. The JVMs affected by this include

      1.3.1_01
      1.3.1_01a
      1.3.1_02
      1.4.0-b92

      Platform -- at least win32 (reproduced on Win2K, NT4).

      The 1.3.1-b24 JVM is not affected by this problem.

      HPROF can be used to demonstrate this behaviour by adding "-Xrunhprof:cpu=times" to the command line arguments of the JVM.

      A moderately large application is required in order to reproduce the problem. Tomcat 4.0.1 or WebLogic6.1sp2 are good candidates -- the hang occurs on startup (between 1 and 2 minutes into running the application). For the 1.3.1_0x JVMs, the hang does not cause the application to exit -- the JVM becomes unresponsive and does not report any errors. The 1.4 JVM exits with the error printed below. The hang does not occur every run.

      -------------- sample Tomcat 4 run --------------
      E:\>e:\j2sdk1.4.0\bin\java.exe -hotspot -Xrunhprof:cpu=times -Dcatalina.home=e:\tomcat4 -
      Dcatalina.base=e:\tomcat4 -classpath e:\tomcat4\bin;e:\tomcat4\bin\bootstrap.jar
       org.apache.catalina.startup.Bootstrap start
      HPROF ERROR: thread local table NULL in method exit 0AA10684
      HPROF ERROR: thread local table NULL in method exit 0AA10684
      HPROF ERROR: thread local table NULL in method exit 0023D4E4
      HPROF ERROR : stack underflow in method exit
      HPROF ERROR : stack underflow in method exit
      Starting service Tomcat-Standalone
      Apache Tomcat/4.0.1
      #
      # 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.0-b92 mixed mode)
      #
      # Error ID: 43113F32554E54494D45110E435050034A
      #
      # Problematic Thread: prio=5 tid=0x00234B20 nid=0x334 runnable
      #

      ----------- end sample Tomcat 4 run -------------

      HPROF reports stack problems regardless of whether the hang (or crash for the 1.4 JVM) occurs.

      The following code can be used as 'the simplest' JVMPI client able to reproduce the problem:

      ----------- sample code -------------

      #include <jvmpi.h>

      JVMPI_Interface * jvmpi;
      static void notify(JVMPI_Event *);

      JNIEXPORT jint JNICALL
      JVM_OnLoad(JavaVM * jvm, char * options, void * reserved) {

      (*jvm)->GetEnv(jvm, (void **) &jvmpi, JVMPI_VERSION_1);
      jvmpi->NotifyEvent = notify;
      jvmpi->EnableEvent(JVMPI_EVENT_METHOD_EXIT, 0);
      return JNI_OK;
      }

      static void
      notify(JVMPI_Event * event) {
      return;
      }

      -------------------------

      I ran the same test on Windows 2000 machine using Tomcat 4.0 (Modified catalina.bat script to include -Xrunhprof:cpu=times) and Java 1.4 FCS (buld 92). I can see HPROF errors, but the crash is not consistent. Tomcat is running fine some times, but fails some other times. There are many bug reports filed for similar issue, but could not find any thing which matches exactly the same description.

      ###@###.### - 03/13/02.
      ----------------------------------

            robm Robert Mckenna
            rverabel Raghu Verabelli (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: