RFR 6720349: NotificationBufferDeadlockTest.java throw exception: java.lang.Exception: TEST FAILED: Deadlock detected
shanliang
shanliang.jiang at oracle.com
Mon Jan 5 17:47:29 UTC 2015
Hi,
Please review this fix:
bug: https://bugs.openjdk.java.net/browse/JDK-8068418
webrev: http://cr.openjdk.java.net/~sjiang/JDK-8068418/00/
This must be a timing issue in the test, the test called:
t.join(5000L);
to wait a thread's dying, I reproduced the bug by insert at line 202:
try {
Thread.sleep(5100);
} catch (Exception ee) {}
to delay the t's dying.
The fix is to replace:
t.join(5000L);
by:
t.join();
and replace:
Object.wait(timeout);
by
CountDownLatch.countDown();
The test harness timeout will be used as the max waiting timeout.
Shanliang
More information about the serviceability-dev
mailing list