JDK-8247611 : compiler/unsafe/UnsafeGetStableArrayElement.java failed "RuntimeException: assertEquals: expected true to equal false"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 16
  • Priority: P4
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows
  • CPU: x86_64
  • Submitted: 2020-06-15
  • Updated: 2020-09-24
  • Resolved: 2020-09-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 16
16Resolved
Related Reports
Relates :  
Description
The following test failed in the JDK16 CI:

compiler/unsafe/UnsafeGetStableArrayElement.java

Here's a snippet from the log file:

#section:main
----------messages:(5/690)----------
command: main -XX:+UnlockDiagnosticVMOptions -Xbatch -XX:-TieredCompilation -XX:+FoldStableValues -XX:CompileCommand=dontinline,*Test::test* compiler.unsafe.UnsafeGetStableArrayElement
reason: User specified action: run main/bootclasspath/othervm -XX:+UnlockDiagnosticVMOptions -Xbatch -XX:-TieredCompilation -XX:+FoldStableValues -XX:CompileCommand=dontinline,*Test::test* compiler.unsafe.UnsafeGetStableArrayElement 
Mode: othervm [/bootclasspath specified, /othervm specified]
Additional options from @modules: --add-modules java.base --add-exports java.base/jdk.internal.vm.annotation=ALL-UNNAMED --add-exports java.base/jdk.internal.misc=ALL-UNNAMED
elapsed time (seconds): 2.661
----------configuration:(5/198)----------
Boot Layer
  add modules: java.base                            
  add exports: java.base/jdk.internal.misc          ALL-UNNAMED
               java.base/jdk.internal.vm.annotation ALL-UNNAMED

----------System.out:(1/40)----------
CompileCommand: dontinline *Test.test*
----------System.err:(20/1436)----------
java.lang.RuntimeException: assertEquals: expected true to equal false
	at jdk.test.lib.Asserts.fail(Asserts.java:594)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:205)
	at jdk.test.lib.Asserts.assertEquals(Asserts.java:189)
	at jdk.test.lib.Asserts.assertEQ(Asserts.java:166)
	at compiler.unsafe.UnsafeGetStableArrayElement.run(UnsafeGetStableArrayElement.java:207)
	at compiler.unsafe.UnsafeGetStableArrayElement.testMatched(UnsafeGetStableArrayElement.java:218)
	at compiler.unsafe.UnsafeGetStableArrayElement.testUnsafeAccess(UnsafeGetStableArrayElement.java:229)
	at compiler.unsafe.UnsafeGetStableArrayElement.main(UnsafeGetStableArrayElement.java:336)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:127)
	at java.base/java.lang.Thread.run(Thread.java:832)

JavaTest Message: Test threw exception: java.lang.RuntimeException: assertEquals: expected true to equal false
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: assertEquals: expected true to equal false
----------rerun:(50/5612)*----------

This particular test run was invoked with these options:

-XX:+CreateCoredumpOnCrash -XX:+UseParallelGC -XX:+UseNUMA

so this issue is not the same as the following Graal bug
for the same test:

    JDK-8181833 [Graal] UnsafeGetStableArrayElement.java fails with "assertNotEquals: expected 1 to not equal 1"
Comments
This test fails for me with Graal/JVMCI as the compiler. Why does this test want to use -XX:-TieredCompilation? Apparently this isn't supported with JVMCI: Java HotSpot(TM) 64-Bit Server VM warning: Disabling tiered compilation with non-native JVMCI compiler is not recommended. Turning on tiered compilation and disabling intermediate compilation levels instead.
24-09-2020