eclipse-openj9 / openj9

Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Other
3.27k stars 721 forks source link

serviceability_jvmti_j9_0_FAILED Compilation failed #15980

Open JasonFengJ9 opened 1 year ago

JasonFengJ9 commented 1 year ago

Failure link

From an internal build(rhel9x86-rt2-1):

openjdk version "19" 2022-09-20
IBM Semeru Runtime Open Edition 19+36 (build 19+36)
Eclipse OpenJ9 VM 19+36 (build master-784820387, JRE 19 Linux amd64-64-Bit Compressed References 20220920_45 (JIT enabled, AOT enabled)
OpenJ9   - 784820387
OMR      - 24b511df5
JCL      - 4efd563f9c based on jdk-19+36)

Rerun in Grinder - Change TARGET to run only the failed test targets.

Optional info

Failure output (captured from console output)

[2022-09-25T07:43:03.014Z] variation: Mode150
[2022-09-25T07:43:03.014Z] JVM_OPTIONS:  -XX:+UseCompressedOops 

[2022-09-25T07:43:54.311Z] TEST: serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorArrayAllSampledTest.java

[2022-09-25T07:43:54.312Z] direct:
[2022-09-25T07:43:54.312Z] /home/jenkins/workspace/Test_openjdk19_j9_extended.openjdk_x86-64_linux/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:32: error: cannot find symbol
[2022-09-25T07:43:54.312Z] import com.sun.management.VMOption;
[2022-09-25T07:43:54.312Z]                          ^
[2022-09-25T07:43:54.312Z]   symbol:   class VMOption
[2022-09-25T07:43:54.312Z]   location: package com.sun.management
[2022-09-25T07:43:54.312Z] /home/jenkins/workspace/Test_openjdk19_j9_extended.openjdk_x86-64_linux/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:253: error: cannot find symbol
[2022-09-25T07:43:54.312Z]       VMOption enableJVMCI = bean.getVMOption("EnableJVMCI");
[2022-09-25T07:43:54.312Z]       ^
[2022-09-25T07:43:54.312Z]   symbol:   class VMOption
[2022-09-25T07:43:54.312Z]   location: class HeapMonitor
[2022-09-25T07:43:54.312Z] /home/jenkins/workspace/Test_openjdk19_j9_extended.openjdk_x86-64_linux/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:253: error: cannot find symbol
[2022-09-25T07:43:54.312Z]       VMOption enableJVMCI = bean.getVMOption("EnableJVMCI");
[2022-09-25T07:43:54.312Z]                                  ^
[2022-09-25T07:43:54.312Z]   symbol:   method getVMOption(String)
[2022-09-25T07:43:54.312Z]   location: variable bean of type HotSpotDiagnosticMXBean
[2022-09-25T07:43:54.312Z] /home/jenkins/workspace/Test_openjdk19_j9_extended.openjdk_x86-64_linux/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:254: error: cannot find symbol
[2022-09-25T07:43:54.312Z]       VMOption useJVMCICompiler = bean.getVMOption("UseJVMCICompiler");
[2022-09-25T07:43:54.312Z]       ^
[2022-09-25T07:43:54.312Z]   symbol:   class VMOption
[2022-09-25T07:43:54.312Z]   location: class HeapMonitor
[2022-09-25T07:43:54.312Z] /home/jenkins/workspace/Test_openjdk19_j9_extended.openjdk_x86-64_linux/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:254: error: cannot find symbol
[2022-09-25T07:43:54.312Z]       VMOption useJVMCICompiler = bean.getVMOption("UseJVMCICompiler");
[2022-09-25T07:43:54.312Z]                                       ^
[2022-09-25T07:43:54.312Z]   symbol:   method getVMOption(String)
[2022-09-25T07:43:54.312Z]   location: variable bean of type HotSpotDiagnosticMXBean
[2022-09-25T07:43:54.312Z] 5 errors
[2022-09-25T07:43:54.312Z] 
[2022-09-25T07:43:54.312Z] TEST RESULT: Failed. Compilation failed: Compilation failed
babsingh commented 1 year ago

This test looks Hotspot specific. HotSpotDiagnosticMXBean, VMOption and other related classes, under com/sun/management, are empty or stubs in the OpenJ9 repo. @LinHu2016 Can you confirm if it is possible to support the above failing test with OpenJ9?

LinHu2016 commented 1 year ago

@JasonFengJ9 HeapMonitor.java doesn't look like new for java19, I am wondering how we support it in Java 17.

babsingh commented 1 year ago

how we support it in Java 17.

These tests have been enabled recently (few weeks ago) only in Java19's extension repo. They exist in prior extension repos; but they are still disabled. We have not supported HeapMonitor.java in the past.

LinHu2016 commented 1 year ago

@babsingh we might can implement some methods of HotSpotDiagnosticMXBean interface, VMOption, but they are Hotspot specific, some features or internal structures, which they expose, are not exist in OpenJ9 jvm(no meaningful too), so there is no guarantee that we can support all of them.

babsingh commented 1 year ago

re https://github.com/eclipse-openj9/openj9/issues/15980#issuecomment-1262398750:

I feel the same. I wanted your agreement before proposing to permanently exclude the test. @LinHu2016 Shall we exclude the test?

pshipton commented 1 year ago

Yes, exclude it. Adding any compatibility for HotSpotDiagnosticMXBean is a separate decision from supporting Loom. So far we haven't made any commitment to support HotSpotDiagnosticMXBean.

JasonFengJ9 commented 1 year ago

Some tests within test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage were built manually when developing JEP 331 like JTReg Test Failure - serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java, which now has compilation failure as well.

2022-09-25T00:43:56-0700 Test finished: serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorVMEventsTest.java#id0: Failed. Compilation failed: Compilation failed

The test might be modified to add incompatible HotSpotDiagnosticMXBean APIs. Agreed on test excluding before a fix is available (or planned).

JasonFengJ9 commented 1 year ago

Test JDK18 0.33 w/ Adoptium testimage

openjdk version "18.0.2" 2022-07-19
IBM Semeru Runtime Open Edition 18.0.2.0 (build 18.0.2+9)
Eclipse OpenJ9 VM 18.0.2.0 (build openj9-0.33.0, JRE 18 Mac OS X amd64-64-Bit Compressed References 20220804_38 (JIT enabled, AOT enabled)
OpenJ9   - 04a55b45b
OMR      - b58aa2708
JCL      - dff9c97e1c7 based on jdk-18.0.2+9)

===============================================
Running test serviceability_jvmti_j9_0 ...
===============================================

variation: Mode150
JVM_OPTIONS:  -XX:+UseCompressedOops 

--------------------------------------------------
TEST: serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitorArrayAllSampledTest.java
TEST JDK: /Users/ivm/ive/semeru/jdk-18.0.2+9/Contents/Home

direct:
/Users/ivm/semeru-tests/jdk18-1009/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:32: error: cannot find symbol
import com.sun.management.VMOption;
                         ^
  symbol:   class VMOption
  location: package com.sun.management
/Users/ivm/semeru-tests/jdk18-1009/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:253: error: cannot find symbol
      VMOption enableJVMCI = bean.getVMOption("EnableJVMCI");
      ^
  symbol:   class VMOption
  location: class HeapMonitor
/Users/ivm/semeru-tests/jdk18-1009/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:253: error: cannot find symbol
      VMOption enableJVMCI = bean.getVMOption("EnableJVMCI");
                                 ^
  symbol:   method getVMOption(String)
  location: variable bean of type HotSpotDiagnosticMXBean
/Users/ivm/semeru-tests/jdk18-1009/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:254: error: cannot find symbol
      VMOption useJVMCICompiler = bean.getVMOption("UseJVMCICompiler");
      ^
  symbol:   class VMOption
  location: class HeapMonitor
/Users/ivm/semeru-tests/jdk18-1009/aqa-tests/openjdk/openjdk-jdk/test/hotspot/jtreg/serviceability/jvmti/HeapMonitor/MyPackage/HeapMonitor.java:254: error: cannot find symbol
      VMOption useJVMCICompiler = bean.getVMOption("UseJVMCICompiler");
                                      ^
  symbol:   method getVMOption(String)
  location: variable bean of type HotSpotDiagnosticMXBean
5 errors

TEST RESULT: Failed. Compilation failed: Compilation failed

serviceability_jvmti_j9_0_FAILED

This is not a regression introduced by JDK19.