Skip to content

Commit d6e9f01

Browse files
committed
8285416: [LOOM] Some nsk/jdi tests fail due to needing too many virtual threads
8282383: [LOOM] 6 nsk JDI and JDB tests sometimes failing with vthread wrapper due to running out of carrier threads Reviewed-by: dholmes, sspitsyn, alanb, lmesnik
1 parent ba03f42 commit d6e9f01

File tree

3 files changed

+6
-25
lines changed

3 files changed

+6
-25
lines changed

test/hotspot/jtreg/ProblemList-svc-vthread.txt

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -131,29 +131,6 @@ vmTestbase/nsk/jdi/ThreadReference/forceEarlyReturn/forceEarlyReturn014/forceEar
131131
vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn001/TestDescription.java 8285415 generic-all
132132
vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn002/TestDescription.java 8285415 generic-all
133133

134-
###
135-
# These 2 tests try to create 10 vthreads and have them all block on a synchronized
136-
# method call, but on some hosts there are not enough carrier threads to support pinning
137-
# all 10 vthreads, so the test deadlocks. -Djdk.defaultScheduler.parallelism=<n>
138-
# could be used with the debuggee to ensure there are enough carrier threads.
139-
140-
vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq002/TestDescription.java 8285416 generic-all
141-
vmTestbase/nsk/jdi/EventRequestManager/deleteEventRequests/delevtreqs002/TestDescription.java 8285416 generic-all
142-
143-
###
144-
# These tests all create 5 virtual threads that block on a synchronized block, which causes
145-
# them to pin the carrier therad. On some of the macOS hosts there are only 4 cores,
146-
# so by default you only get 4 carrier threads. When this happesn the test is unable to get all
147-
# of the virtual threads started, and ends up timing out. -Djdk.defaultScheduler.parallelism=<n>
148-
# could be used with the debuggee to ensure there are enough carrier threads.
149-
150-
vmTestbase/nsk/jdb/kill/kill001/kill001.java 8282383 macosx-x64
151-
vmTestbase/nsk/jdi/LocatableEvent/thread/thread001/TestDescription.java 8282383 macosx-x64
152-
vmTestbase/nsk/jdi/Event/request/request001/TestDescription.java 8282383 macosx-x64
153-
vmTestbase/nsk/jdi/EventIterator/nextEvent/nextevent001/TestDescription.java 8282383 macosx-x64
154-
vmTestbase/nsk/jdi/EventRequestManager/stepRequests/stepreq001/TestDescription.java 8282383 macosx-x64
155-
vmTestbase/nsk/jdi/ObjectReference/waitingThreads/waitingthreads002/TestDescription.java 8282383 macosx-x64
156-
157134
###
158135
# This test always times out on windows. This is due to the test forcing OOME in the
159136
# debuggee, which has the side affect of making the Read-Poller thread exit. Because

test/hotspot/jtreg/vmTestbase/nsk/share/jdb/Launcher.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,12 @@ private String[] makeJdbCmdLine (String classToExecute) {
163163
args.add(jdbExecPath.trim());
164164

165165
if (argumentHandler.isLaunchingConnector()) {
166-
/* Need --enable-preview on the debuggee in order to support virtual threads. */
167166
boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
168167
if (vthreadMode) {
168+
/* Need --enable-preview on the debuggee in order to support virtual threads. */
169169
args.add("-R--enable-preview");
170+
/* Some tests need more carrier threads than the default provided. */
171+
args.add("-R-Djdk.virtualThreadScheduler.parallelism=15");
170172
}
171173
}
172174

test/hotspot/jtreg/vmTestbase/nsk/share/jdi/Binder.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,10 +751,12 @@ private Map<String,? extends Argument> setupLaunchingConnector(LaunchingConnecto
751751
vmArgs = vmUserArgs;
752752
}
753753

754-
/* Need --enable-preview on the debuggee in order to support virtual threads. */
755754
boolean vthreadMode = "Virtual".equals(System.getProperty("main.wrapper"));
756755
if (vthreadMode) {
756+
/* Need --enable-preview on the debuggee in order to support virtual threads. */
757757
vmArgs += " --enable-preview";
758+
/* Some tests need more carrier threads than the default provided. */
759+
vmArgs += " -Djdk.virtualThreadScheduler.parallelism=15";
758760
}
759761

760762
/*

0 commit comments

Comments
 (0)