8308043: Deadlock in TestCSLocker.java due to blocking GC while allocating
Reviewed-by: stefank, ayang, tschatzl
This commit is contained in:
parent
1a6f9810cd
commit
285c833ffa
@ -40,6 +40,4 @@ serviceability/sa/TestJhsdbJstackMixed.java 8248675 linux-aarch64
|
|||||||
|
|
||||||
serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java 8307462 generic-all
|
serviceability/jvmti/VMObjectAlloc/VMObjectAllocTest.java 8307462 generic-all
|
||||||
|
|
||||||
gc/cslocker/TestCSLocker.java 8293289 generic-x64
|
|
||||||
|
|
||||||
serviceability/sa/ClhsdbInspect.java 8283578 windows-x64
|
serviceability/sa/ClhsdbInspect.java 8283578 windows-x64
|
||||||
|
@ -48,10 +48,13 @@ public class TestCSLocker extends Thread
|
|||||||
// start CS locker thread
|
// start CS locker thread
|
||||||
CSLocker csLocker = new CSLocker();
|
CSLocker csLocker = new CSLocker();
|
||||||
csLocker.start();
|
csLocker.start();
|
||||||
|
// After the CSLocker thread has started, any operation such as an allocation,
|
||||||
|
// which could rely on the GC to make progress, will cause a deadlock that will
|
||||||
|
// make the test time out. That includes printing. Please don't use any such
|
||||||
|
// code until unlock() is called below.
|
||||||
|
|
||||||
// check timeout to success deadlocking
|
// check timeout to success deadlocking
|
||||||
while(System.currentTimeMillis() < startTime + timeout) {
|
while (System.currentTimeMillis() < startTime + timeout) {
|
||||||
System.out.println("sleeping...");
|
|
||||||
sleep(1000);
|
sleep(1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user