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

HeapMonitorEventOnOffTest.java test fails with "Statistics should be null to begin with"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 12
    • 12
    • hotspot
    • b24
    • windows

      On Win64 debug builds the test serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorEventOnOffTest.java fails (sometimes?) with the following output:

      command: main -agentlib:HeapMonitorTest MyPackage.HeapMonitorEventOnOffTest
      reason: User specified action: run main/othervm/native -agentlib:HeapMonitorTest MyPackage.HeapMonitorEventOnOffTest
      Mode: othervm [/othervm specified]
      elapsed time (seconds): 15.863
      ----------configuration:(0/0)----------
      ----------System.out:(0/0)----------
      ----------System.err:(15/1053)----------
      java.lang.RuntimeException: Statistics should be null to begin with.
      at MyPackage.HeapMonitor.allocateAndCheckFrames(HeapMonitor.java:192)
      at MyPackage.HeapMonitor.allocateAndCheckFrames(HeapMonitor.java:225)
      at MyPackage.HeapMonitorEventOnOffTest.main(HeapMonitorEventOnOffTest.java:39)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:567)
      at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
      at java.base/java.lang.Thread.run(Thread.java:835)

      JavaTest Message: Test threw exception: java.lang.RuntimeException: Statistics should be null to begin with.
      JavaTest Message: shutting down test

      Briefly looking through the shared library test code showed that the relevant "global_event_storage" and "second_global_event_storage" statics do not seem to be initialized anywhere.

      I.e. looks like a test issue.

            jcbeyler Jean Christophe Beyler
            tschatzl Thomas Schatzl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: