JDK-8204199 : Test fails after 8202670 Graal update
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 11
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-06-01
  • Updated: 2018-06-12
  • Resolved: 2018-06-06
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 11
11 b17Fixed
Related Reports
Relates :  
Relates :  
Description
CI Tier3 failure with the JDK-8202670 update applied.

test/hotspot/jtreg/compiler/unsafe/JdkInternalMiscUnsafeAccessTestBoolean.java

test compiler.unsafe.JdkInternalMiscUnsafeAccessTestBoolean.testArray(): failure
java.lang.AssertionError: failing compareAndExchange boolean expected [true] but found [false]
	at org.testng.Assert.fail(Assert.java:94)
	at org.testng.Assert.failNotEquals(Assert.java:496)
	at org.testng.Assert.assertEquals(Assert.java:125)
	at org.testng.Assert.assertEquals(Assert.java:288)
	at compiler.unsafe.JdkInternalMiscUnsafeAccessTestBoolean.testAccess(JdkInternalMiscUnsafeAccessTestBoolean.java:177)
	at compiler.unsafe.JdkInternalMiscUnsafeAccessTestBoolean.testArray(JdkInternalMiscUnsafeAccessTestBoolean.java:113)

---------System.err:(15/973)----------
Java HotSpot(TM) 64-Bit Server VM warning: forcing TieredStopAtLevel to full optimization because JVMCI is enabled
Comments
When can we expect this issue to be resolved? Would it make sense to problemlist the tests while waiting for the fix? It would be nice to have a green build to tag for promotion tomorrow.
05-06-2018

[~dlong], can we expedite graal->jdk integration?
04-06-2018

The patch was merged in this commit: https://github.com/oracle/graal/commit/80b18b329f04b8ef75b4c367413a2de51c82f3d9
04-06-2018

A patch is already made, and should be merged soon.
04-06-2018

[~aprokopec], [~dlong], how long do you guys think it will take to fix this? to integrate into jdk/jdk?
04-06-2018

Yes, that's right. The problem was an incorrect stamp on the macro node for the Unsafe operation. A patch should come soon.
01-06-2018

I looked at the generated code, and there are two compareAndExchangeBoolean in a row, but Graal ignores the result from the 2nd.
01-06-2018

Ok, thank you! I was able to reproduce with the following command (using OpenJDK and Graal head): /home/alexpro/workspaces/java/jdk/build/linux-x86_64-normal-server-release/jdk/bin/java -server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --module-path=/home/alexpro/workspaces/java/graal5/graal/sdk/mxbuild/modules/org.graalvm.graal_sdk.jar:/home/alexpro/workspaces/java/graal5/graal/truffle/mxbuild/modules/com.oracle.truffle.truffle_api.jar --upgrade-module-path=/home/alexpro/workspaces/java/graal5/graal/compiler/mxbuild/modules/jdk.internal.vm.compiler.jar:/home/alexpro/workspaces/java/graal5/graal/compiler/mxbuild/modules/jdk.internal.vm.compiler.management.jar -server -XX:+EnableJVMCI -Dgraal.CompilerConfiguration=community -Djvmci.Compiler=graal -XX:+UseJVMCICompiler -XX:+TieredCompilation -Xcomp -Xbatch -cp ../testng-6.14.3.jar:. --add-exports java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED -Diters=10000 JdkInternalMiscUnsafeAccessTestBoolean
01-06-2018

Could you please provide a command line used to run this test?
01-06-2018

This is most likely due a bug in the compareAndExchange Graal intrinsics introduced by JDK-8202616.
01-06-2018

ILW = Incorrect execution of compiled code, single test with Graal as JIT, use C2 = HLM = P3
01-06-2018

The test was executed with " -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:+UseJVMCICompiler -Djvmci.Compiler=graal" on Windows x64. You can find the exact configuration in the mach5 link posted by David Holmes above.
01-06-2018