JDK-8284303 : runtime/Thread/AsyncExceptionTest.java timed out
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 19
  • Priority: P2
  • Status: New
  • Resolution: Unresolved
  • OS: linux
  • CPU: x86_64
  • Submitted: 2022-04-04
  • Updated: 2022-04-04
Related Reports
Relates :  
Description
The following test timed out in the JDK19 CI:

runtime/Thread/AsyncExceptionTest.java

Here's a snippet from the log file:

#section:main
----------messages:(6/354)----------
command: main -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AsyncExceptionTest
reason: User specified action: run main/othervm -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI AsyncExceptionTest 
Mode: othervm [/othervm specified]
Timeout information:
--- Timeout information end.
elapsed time (seconds): 499.182
----------configuration:(0/0)----------
----------System.out:(2/59)----------
About to execute for 30 seconds.
Timeout refired 480 times
----------System.err:(0/0)----------
----------rerun:(35/7888)*----------

<snip>

result: Error. Program `/opt/mach5/mesos/work_dir/jib-master/install/jdk-19+17-1108/linux-x64-debug.jdk/jdk-19/fastdebug/bin/java' timed out (timeout set to 480000ms, elapsed time including timeout handling was 499163ms).

I'm starting this bug as a P2 since this is a Tier1 failure.
Comments
A pull request was submitted for review. URL: https://git.openjdk.java.net/jdk/pull/8097 Date: 2022-04-04 21:16:19 +0000
04-04-2022

I was able to reproduce the issue quite easily on the VM.Standard.E4.Flex machines running the same parallel workflow. The issue was indeed due to the methods never reaching that compilation level. I added a bail out after ~20 seconds so for the rare cases where the methods didn't get compiled we just execute the interpreted version: diff --git a/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java b/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java index 9e35af9557a5..990c8b66ddd9 100644 --- a/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java +++ b/test/hotspot/jtreg/runtime/Thread/AsyncExceptionTest.java @@ -69,10 +69,15 @@ public void checkCompLevel(String method) { throw new RuntimeException("Unexpected: " + e); } int compLevel = WB.getMethodCompilationLevel(m); + long start_time = System.currentTimeMillis(); while (compLevel < (highestLevel - 1)) { try { Thread.sleep(200); } catch (InterruptedException e) { /* ignored */ } + if( System.currentTimeMillis() - start_time > 20000) { + // if more than 20 seconds have elapsed just bail out + break; + } compLevel = WB.getMethodCompilationLevel(m); } }
04-04-2022

I run multiple instances of the test in parallel in infinite loops but I cannot reproduce the timeout. It's odd that just after a couple of runs in the pipeline we see a timeout. I'll try to run it in one of the VM.Standard.E4.Flex machines where it failed.
04-04-2022

Looking at it. No core dump so hard to tell but I'm guessing it might be because of: while (compLevel < (highestLevel - 1)) { try { Thread.sleep(200); } catch (InterruptedException e) { /* ignored */ } compLevel = WB.getMethodCompilationLevel(m); } So the methods never get compiled to that level. I can problem list it if you want until I confirm that.
04-04-2022

[~pchilanomate] - Can you take a look at this timeout of your new test? runtime/Thread/AsyncExceptionTest.java is a new test included with: JDK-8283044 Use asynchronous handshakes to deliver asynchronous exceptions
04-04-2022