Skip to content

Commit e01e33d

Browse files
david-beaumontdfuch
authored andcommitted
8354424: java/util/logging/LoggingDeadlock5.java fails intermittently in tier6
Reviewed-by: dfuchs, smarks
1 parent 370e611 commit e01e33d

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

test/jdk/ProblemList.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,6 @@ com/sun/jdi/InvokeHangTest.java 8218463 linux-al
737737

738738
# jdk_util
739739
java/util/zip/CloseInflaterDeflaterTest.java 8339216 linux-s390x
740-
java/util/logging/LoggingDeadlock5.java 8354424 generic-all
741740

742741
############################################################################
743742

test/jdk/java/util/logging/LoggingDeadlock5.java

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,14 @@
2525
* @test
2626
* @bug 8349206
2727
* @summary j.u.l.Handler classes create deadlock risk via synchronized publish() method.
28+
* @library /test/lib
2829
* @modules java.base/sun.util.logging
2930
* java.logging
3031
* @run main/othervm LoggingDeadlock5
3132
*/
3233

34+
import jdk.test.lib.Utils;
35+
3336
import java.io.ByteArrayOutputStream;
3437
import java.io.IOException;
3538
import java.io.UnsupportedEncodingException;
@@ -115,7 +118,13 @@ static void assertNoDeadlock(Handler handler) throws InterruptedException, Unsup
115118
}
116119

117120
private static class DeadLocker {
118-
private final static Duration JOIN_WAIT = Duration.ofMillis(500);
121+
// Since this is used to self-test for an expected deadlock, it will
122+
// delay the test by at least this duration (so being overly large is
123+
// a potential issue). The deadlock is set up so it should occur almost
124+
// immediately (if it occurs), but tests are run under very high loads
125+
// in higher tiers, so it's necessary to be a bit pessimistic here.
126+
private final static Duration JOIN_WAIT =
127+
Duration.ofMillis(Utils.adjustTimeout(2000));
119128

120129
private final Semaphore readyToDeadlock = new Semaphore(0);
121130
private final Semaphore userLockIsHeld = new Semaphore(0);

0 commit comments

Comments
 (0)