On Wed, 10 Jan 2024 20:25:21 GMT, Alan Bateman <al...@openjdk.org> wrote:

> This test was recently dialled down via JDK-8323002 but it still makes slow 
> progress on some test machines, esp. macox-x64-debug builds. The issue is 
> that the sampling of the target thread is skewed towards the unmounted case 
> so the target thread is disabled from being scheduled and doesn't make 
> progress. The test is re-worked to use a barrier so that the main thread and 
> target virtual thread run in lock step. This allows the virtual thread to 
> make progress at each iteration and also increases the chances of sampling 
> the stack trace at around the time that the target thread transitions from 
> being unmounted (due to the Thread.yield) and parking while pinned.

test/jdk/java/lang/Thread/virtual/stress/GetStackTraceALotWhenPinned.java line 
52:

> 50:         // need at least two carrier threads when main thread is a 
> virtual thread
> 51:         if (Thread.currentThread().isVirtual()) {
> 52:             VThreadRunner.ensureParallelism(2);

Given that this changes the JVM level scheduler's parallelism, should we now 
use `/othervm` for these tests to prevent this change interfering with other 
tests?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/17353#discussion_r1448858813

Reply via email to