JDK-8308589 : gc/cslocker/TestCSLocker.java timed out
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 21
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: linux
  • CPU: x86_64
  • Submitted: 2023-05-22
  • Updated: 2023-07-13
  • Resolved: 2023-05-26
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 21
21 b25Fixed
Related Reports
Relates :  
Relates :  
Description
The following test timed out in the JDK21 CI:

gc/cslocker/TestCSLocker.java

Here's a snippet from the log file:

#section:main
----------messages:(8/332)----------
command: main -Xmx256m gc.cslocker.TestCSLocker
reason: User specified action: run main/native/othervm -Xmx256m gc.cslocker.TestCSLocker 
started: Mon May 22 18:49:49 UTC 2023
Mode: othervm [/othervm specified]
Timeout information:
--- Timeout information end.
finished: Mon May 22 19:02:03 UTC 2023
elapsed time (seconds): 734.202
----------configuration:(0/0)----------
----------System.out:(1/26)----------
Timeout refired 480 times
----------System.err:(0/0)----------
----------rerun:(39/7096)*----------

<snip>

result: Error. Program `/opt/mach5/mesos/work_dir/jib-master/install/jdk-21+24-2057/linux-x64.jdk/jdk-21/bin/java' timed out (timeout set to 480000ms, elapsed time including timeout handling was 734189ms).
Comments
Changeset: cc0976bf Author: Stefan Karlsson <stefank@openjdk.org> Date: 2023-05-26 13:51:31 +0000 URL: https://git.openjdk.org/jdk/commit/cc0976bf7fc41caa5abdaa23f4df00b1a5d5bfba
26-05-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14150 Date: 2023-05-25 13:43:55 +0000
25-05-2023

This is the same test bug that we tried to work around in a previous change. We have this situation: JNI Critical Locker Thread ``` Thread 28 (Thread 0x7f37021f9700 (LWP 2983936)): ... Java_gc_cslocker_CSLocker_lock ``` GC thread waiting for the JNI Critical Locker Thread: ``` Thread 10 (Thread 0x7f37108ee700 (LWP 2983861)): ... #3 0x00007f372f6598cb in PlatformMonitor::wait #4 0x00007f372f95f196 in ZJNICritical::block #5 0x00007f372f9527e1 in ZGenerationYoung::collect #6 0x00007f372f94ca05 in ZDriverMajor::collect_young ``` The Test thread is supposed to wait a few seconds before signalling the JNI Critical Locker Thread, but is stuck performing an allocation, which waits for the GC to complete, which waits JNI Critical Locker Thread, which waits for the Test thread, …
23-05-2023