JDK-8227528 : TestAbortVMOnSafepointTimeout.java failed due to "RuntimeException: 'Safepoint sync time longer than' missing from stdout/stderr"
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 11,14
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: windows
  • CPU: x86_64
  • Submitted: 2019-07-10
  • Updated: 2022-06-27
  • Resolved: 2019-07-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 11 JDK 13 JDK 14
11.0.7Fixed 13.0.3Fixed 14 b08Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The following test failed in the JDK14 CI:

runtime/Safepoint/TestAbortVMOnSafepointTimeout.java

Here's a snippet from the log file:

----------System.err:(21/1129)----------
 stdout: [CompileCommand: compileonly TestAbortVMOnSafepointTimeout.test_loop
This message would occur after some time with result 715827882
];
 stderr: []
 exitValue = 0

java.lang.RuntimeException: 'Safepoint sync time longer than' missing from stdout/stderr 

	at jdk.test.lib.process.OutputAnalyzer.shouldMatch(OutputAnalyzer.java:293)
	at TestAbortVMOnSafepointTimeout.testWith(TestAbortVMOnSafepointTimeout.java:82)
	at TestAbortVMOnSafepointTimeout.main(TestAbortVMOnSafepointTimeout.java:46)
	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)
	at com.sun.javatest.regtest.agent.MainActionHelper$AgentVMRunnable.run(MainActionHelper.java:298)
	at java.base/java.lang.Thread.run(Thread.java:830)
Comments
Fix Request for 13u. The fix increases test stability for 13u. The patch applies cleanly, new test passes.
20-03-2020

Fix Request (11u) I would like to backport this test stabilization fix to 11u. Patch applies cleanly to 11u, new test passes. Risk is low.
03-02-2020

This test hasn't failed since the fix.
14-11-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/80ba2f1cdd4d User: pchilanomate Date: 2019-07-30 21:32:28 +0000
30-07-2019

Given that TestAbortVMOnSafepointTimeout.java is just testing for the correct behavior of flag AbortVMOnSafepointTimeout, one simple solution would be to add -XX:-UseBiasedLocking when creating the Java process with createJavaProcessBuilder(). That would prevent handshakes in revocations to interfere with the timeout situation we are trying to create.
22-07-2019

ILW = HLH = P2 (Impact is high since the test is in tier-1)
11-07-2019

The failure has shown up in a Tier1 job set so I'm bumping the priority from P4 -> P2.
11-07-2019

[~dcubed] The test is assuming a loop without safepoint polls will take more that 500ms to run causing a safepoint timeout, but the loop finishes executing before that. I saw this bug while testing for 8191890 and tested a fix by making the loop infinite, which seemed to work ( didn't include the fix with 8191890 because it seemed out of place for that changeset, I was just checking it wasn't a bug in 8191890). I will double check the solution again by making sure the JavaThread is not polling for safepoints and the loop is in fact finishing before the timeout.
10-07-2019