Skip to content

Commit 285c833

Browse files
committed
8308043: Deadlock in TestCSLocker.java due to blocking GC while allocating
Reviewed-by: stefank, ayang, tschatzl
1 parent 1a6f981 commit 285c833

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

test/hotspot/jtreg/ProblemList-Xcomp.txt

-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,4 @@ serviceability/sa/TestJhsdbJstackMixed.java 8248675 linux-aarch64
4040

4141
serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java 8307462 generic-all
4242

43-
gc/cslocker/TestCSLocker.java 8293289 generic-x64
44-
4543
serviceability/sa/ClhsdbInspect.java 8283578 windows-x64

test/hotspot/jtreg/gc/cslocker/TestCSLocker.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,13 @@ public static void main(String args[]) throws Exception {
4848
// start CS locker thread
4949
CSLocker csLocker = new CSLocker();
5050
csLocker.start();
51+
// After the CSLocker thread has started, any operation such as an allocation,
52+
// which could rely on the GC to make progress, will cause a deadlock that will
53+
// make the test time out. That includes printing. Please don't use any such
54+
// code until unlock() is called below.
5155

5256
// check timeout to success deadlocking
53-
while(System.currentTimeMillis() < startTime + timeout) {
54-
System.out.println("sleeping...");
57+
while (System.currentTimeMillis() < startTime + timeout) {
5558
sleep(1000);
5659
}
5760

0 commit comments

Comments
 (0)