JDK-8222292 : runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java timeout but test passed
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-04-10
  • Updated: 2019-08-15
  • Resolved: 2019-05-09
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
13 b21Fixed
Related Reports
Relates :  
Description
----------System.out:(11/443)----------
[TestNG] Running:
  runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java

test ArrayIndexOutOfBoundsExceptionTest.testAIOOBMessages(): success
Timeout refired 1200 times

===============================================
runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java
Total tests run: 1, Failures: 0, Skips: 0
Comments
Okay I have a simple fix - allow the first @run to be either normal or Graal, but exclude the two Xcomp variants (for C1 and C2) when Graal is enabled. That way the test checks the four compiler variants. diff -r 7eb3d3ec9b36 test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java --- a/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java +++ b/test/hotspot/jtreg/runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java @@ -26,8 +26,14 @@ * @test * @summary Test extended ArrayIndexOutOfBoundsException message. The * message lists information about the array and the indexes involved. - * @compile ArrayIndexOutOfBoundsExceptionTest.java + * @comment This will run in 'normal' mode when Graal is not enabled, else + * Graal mode. * @run testng ArrayIndexOutOfBoundsExceptionTest + */ +/** + * @test + * @requires !vm.graal.enabled + * @comment These test C1 and C2 so make no sense when Graal is enabled. * @run testng/othervm -Xcomp -XX:-TieredCompilation ArrayIndexOutOfBoundsExceptionTest * @run testng/othervm -Xcomp -XX:TieredStopAtLevel=1 ArrayIndexOutOfBoundsExceptionTest */
09-05-2019

On other hand if Graal will have the same message we don't need to do anything when libgraal will be used. It will be used instead of C2 when Tiered Compilation is off.
06-05-2019

I think it is easy to modify test to add an other subtest '/* @test' and run it when graal is enabled and original don't run in such case. The Exception message should be the same! We will fix Graal if needed.
05-05-2019

[~kvn] I think we still have an issue with the test itself that needs to be addressed. The test is trying to check the exception messages as implemented by code in the interpreter, C1 and C2 - hence the three variants of the test that get executed via @run. But those make no sense when Graal is added to the mix - some of the Graal flags will negate the ones added by the @run. So we still need to decide how this test should run when Graal is present.
04-05-2019

Only Java Graal has issue with -Xcomp and Tiered off. When we get libgraal it would not be an issue. For now I think we should list this test in problem list with JDK-8207267 bug as reference. And we can closed this bug as duplicate of JDK-8207267. Originally [~epavlova] suggested to use JDK-8222524 but it is closed as duplicate of JDK-8207267.
04-05-2019

[~kvn][~epavlova] -Xcomp -XX:-TieredCompilation is a problem when Graal is enabled, because it forces Graal to compile itself using the interpreter. For most uses of -Xcomp, I think we want it to apply to the test classes. Having -Xcomp apply to Graal classes as the default doesn't make much sense to me. I wonder if we should consider changing how -Xcomp affects Graal classes.
04-05-2019

FYI it is: * @run testng/othervm -Xcomp -XX:-TieredCompilation ArrayIndexOutOfBoundsExceptionTest when combined with Graal that takes the long time: TEST: runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java#id1 build: 2.801 seconds compile: 2.801 seconds testng: 536.745 seconds TEST RESULT: Passed. Execution successful The C1 one is much quicker: TEST: runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java#id2 build: 3.593 seconds compile: 3.592 seconds testng: 78.927 seconds TEST RESULT: Passed. Execution successful
03-05-2019

The timeouts only seem to happen on Windows and OS X - neither of which I can test locally. But a local test on Linux took 20 minutes so that is consistent with timing out: Running: jtreg -a -v:fail,error,time -retain:fail,error -ignore:quiet -exclude:ProblemList.txt -noreport -timeout:5 -J-Djavatest.maxOutputSize=10000000 -testjdk:../../../../build/linux-x64-debug/images/jdk -nativepath:/export/users/dh198349/jdk-dev/open/test/hotspot/jtreg/../../../../build/linux-x64-debug/images/test/hotspot/jtreg/native -javaoptions:-ea -esa -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal -XX:+TieredCompilation runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java Directory "JTwork" not found: creating -------------------------------------------------- TEST: runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java compile: 2.857 seconds build: 0.001 seconds testng: 1.444 seconds build: 0.0 seconds testng: 533.755 seconds build: 0.0 seconds testng: 72.464 seconds TEST RESULT: Passed. Execution successful -------------------------------------------------- Test results: passed: 1 Results written to /export/users/dh198349/jdk-dev/open/test/hotspot/jtreg/JTwork real 10m23.743s user 20m57.921s sys 0m34.285s But the test itself executes three times via @run and two of those are -Xcomp. Breaking this into 3 @test segments we see the non-Xcomp takes a few seconds: -------------------------------------------------- TEST: runtime/exceptionMsgs/ArrayIndexOutOfBoundsException/ArrayIndexOutOfBoundsExceptionTest.java#id0 compile: 2.876 seconds build: 0.001 seconds testng: 1.448 seconds TEST RESULT: Passed. Execution successful -------------------------------------------------- The two Xcomp runs are intended to test C2 and c1 separately: * @run testng/othervm -Xcomp -XX:-TieredCompilation ArrayIndexOutOfBoundsExceptionTest * @run testng/othervm -Xcomp -XX:TieredStopAtLevel=1 ArrayIndexOutOfBoundsExceptionTest those flags are not compatible with the flags used to enable Graal. [~dlong] Dean what do you suggest here? We can exclude the Xcomp variants if Graal is enabled (not sure exact syntax for @requires) or we can adjust the flags when Graal is enabled. Thanks.
03-05-2019

[~jwilhelm] None of the CI executions of this test use Graal AFAICS from the JSON files. In the CI the test completes in around 1 minute. With Graal it times out after 20 minutes.
03-05-2019

Could be related to JDK-8218700 if we are getting stuck in Graal code.
10-04-2019

Runtime, please evaluate and kick back to Compiler if appropriate.
10-04-2019