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

test jcstress_BooleanFencedTest_0 UnsupportedOperationException at jdk.management/com.ibm.lang.management.internal.ExtendedThreadMXBeanImpl.getThreadAllocatedBytes(ExtendedThreadMXBeanImpl.java:74) #17728

Closed JasonFengJ9 closed 6 months ago

JasonFengJ9 commented 1 year ago

ailure link

From an internal build(ub20-aarch64-6):

23:30:15  openjdk version "11.0.20" 2023-07-18
23:30:15  IBM Semeru Runtime Open Edition 11.0.20.0-m2 (build 11.0.20+7)
23:30:15  Eclipse OpenJ9 VM 11.0.20.0-m2 (build v0.40.0-release-6eed0535c, JRE 11 Linux aarch64-64-Bit Compressed References 20230628_721 (JIT enabled, AOT enabled)
23:30:15  OpenJ9   - 6eed0535c
23:30:15  OMR      - e80bff83b
23:30:15  JCL      - 20e0e53157 based on jdk-11.0.20+7)

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

Optional info

Failure output (captured from console output)

[2023-06-29T03:35:31.862Z] ===============================================
[2023-06-29T03:35:31.862Z] Running test jcstress_BooleanFencedTest_0 ...
[2023-06-29T03:35:31.862Z] ===============================================
[2023-06-29T03:35:31.862Z] jcstress_BooleanFencedTest_0 Start Time: Wed Jun 28 23:35:31 2023 Epoch Time (ms): 1688009731573
[2023-06-29T03:35:31.862Z] variation: NoOptions
[2023-06-29T03:35:31.862Z] JVM_OPTIONS:  

[2023-06-29T03:35:43.451Z] Exception in thread "main" java.lang.IllegalStateException: @Contended does not seem to work properly
[2023-06-29T03:35:43.451Z]  at org.openjdk.jcstress.vm.ContendedTestMain.main(ContendedTestMain.java:80)
[2023-06-29T03:35:43.451Z] 
[2023-06-29T03:35:43.451Z] ----- [OK] Unlocking debug information for non-safepoints
[2023-06-29T03:35:43.868Z] ----- [OK] Unlocking C2 local code motion randomizer
[2023-06-29T03:35:43.868Z] ----- [OK] Unlocking C2 global code motion randomizer
[2023-06-29T03:35:44.284Z] ----- [OK] Unlocking C2 iterative global value numbering randomizer
[2023-06-29T03:35:44.704Z] ----- [OK] Unlocking C2 conditional constant propagation randomizer
[2023-06-29T03:35:45.121Z] ----- [OK] Checking if C2 randomizers accept stress seed
[2023-06-29T03:35:45.537Z] ----- [N/A] Testing allocation profiling
[2023-06-29T03:35:45.537Z] Exception in thread "main" java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
[2023-06-29T03:35:45.537Z]  at org.openjdk.jcstress.vm.AllocProfileSupport.getAllocatedBytes(AllocProfileSupport.java:94)
[2023-06-29T03:35:45.537Z]  at org.openjdk.jcstress.vm.AllocProfileMain.main(AllocProfileMain.java:38)
[2023-06-29T03:35:45.537Z] Caused by: java.lang.reflect.InvocationTargetException
[2023-06-29T03:35:45.537Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2023-06-29T03:35:45.537Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[2023-06-29T03:35:45.537Z]  at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[2023-06-29T03:35:45.537Z]  at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[2023-06-29T03:35:45.537Z]  at org.openjdk.jcstress.vm.AllocProfileSupport.getAllocatedBytes(AllocProfileSupport.java:92)
[2023-06-29T03:35:45.537Z]  ... 1 more
[2023-06-29T03:35:45.537Z] Caused by: java.lang.UnsupportedOperationException
[2023-06-29T03:35:45.537Z]  at jdk.management/com.ibm.lang.management.internal.ExtendedThreadMXBeanImpl.getThreadAllocatedBytes(ExtendedThreadMXBeanImpl.java:74)
[2023-06-29T03:35:45.537Z]  ... 6 more

[2023-06-29T04:37:32.106Z]  at org.openjdk.jcstress.infra.grading.ExceptionReportPrinter.work(ExceptionReportPrinter.java:63)
[2023-06-29T04:37:32.106Z]  at org.openjdk.jcstress.JCStress.parseResults(JCStress.java:140)
[2023-06-29T04:37:32.106Z]  at org.openjdk.jcstress.JCStress.run(JCStress.java:107)
[2023-06-29T04:37:32.106Z]  at org.openjdk.jcstress.Main.main(Main.java:60)
[2023-06-29T04:37:32.106Z] -----------------------------------
[2023-06-29T04:37:32.106Z] jcstress_ReentrantRWLockMutexTests_0_FAILED
pshipton commented 1 year ago

Seems a problem with the test, OpenJ9 doesn't support getThreadAllocatedBytes() and throwing UnsupportedOperationException is behavior allowed by the spec.

pshipton commented 1 year ago

@llxia fyi

llxia commented 1 year ago

dup of https://github.com/eclipse-openj9/openj9/issues/16569

pshipton commented 6 months ago

Closing since support for getThreadAllocatedBytes() was added in 0.41 https://eclipse.dev/openj9/docs/version0.41/#support-added-for-the-comsunmanagementthreadmxbeangetthreadallocatedbytes-api