JDK-8222551 : [Graal] org.graalvm.compiler.hotspot.test.ArrayNewInstanceTest fails with java.lang.AssertionError
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 13
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2019-04-16
  • Updated: 2019-05-30
  • Resolved: 2019-05-30
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 13
13Resolved
Related Reports
Duplicate :  
Relates :  
Description
org.graalvm.compiler.hotspot.test.ArrayNewInstanceTest fails 

java.lang.AssertionError
        at org.graalvm.compiler.hotspot.test.ArrayNewInstanceTest.testNewArrayInLoop(ArrayNewInstanceTest.java:102)
        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)

when running with -Xcomp mode (note no JIT graal is used).

Steps to reproduce:
> make run-test TEST="compiler/graalunit/HotspotTest.java" TEST_VM_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:-UseJVMCICompiler -Xcomp"

Or you can create smaller test to run just 2 Array tests:
> compiler/graalunit/ArrayTests.java
/*
 * @test
 * @summary
 * @requires vm.opt.final.EnableJVMCI == true
 *
 * @modules jdk.internal.vm.compiler
 *
 * @library /test/lib /compiler/graalunit /
 *
 * @build compiler.graalunit.common.GraalUnitTestLauncher
 *
 * @run main compiler.graalunit.common.GraalUnitTestLauncher -prefix org.graalvm.compiler.hotspot.test.Array
 */

>  make run-test TEST="compiler/graalunit/ArrayTests.java" TEST_VM_OPTS="-XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+TieredCompilation -XX:-UseJVMCICompiler -Xcomp"

Comments
Adding the testbug label for now. Please remove if it turns out to be a JIT issue.
23-04-2019

[~dlong] JDK-8192853 was filed against "Graal JIT mode + -Xcomp", this bug is reproduced just in "-server -Xcomp" configuration. So, this is why I filed separate bug.
18-04-2019

[~epavlova] In JDK-8192853, Doug said "I propose that Graal unit tests are not to be run with -Xcomp". So should we make this a duplicate?
18-04-2019

If this test is not suitable for running with -Xcomp flag then let me know whether it should be fixed similar to https://github.com/oracle/graal/blob/ae813716ed6525dc4db5c51e7ef3cc904f73c18d/compiler/src/org.graalvm.compiler.core.test/src/org/graalvm/compiler/core/test/ProfilingInfoTest.java#L188-L192 (see JDK-8192853)
16-04-2019