-
Bug
-
Resolution: Unresolved
-
P3
-
None
-
21
-
None
-
30 CPU cores.
-
x86
-
linux
When using virtual thread, the juc unpark event may not be executed and the whole application will wait forever.
I have constructed a simple testcase to emulate the situation.
I put the two files in the test/jdk/java/lang/Thread/virtual/ and run jtreg test it. The fail rate is 13/30.
I find that there may be a problem in ForkJoinPool.java.
The `signalWork` may choose do nothing when (c >>> RC_SHIFT) >= pc. (In the testcase, 29 threads are pinned and one is free for doing some work.)
And the one active thread which is in the first lines of the function `awaitWork` (before change the ctl) will not be signaled and choose to park.
I have constructed a simple testcase to emulate the situation.
I put the two files in the test/jdk/java/lang/Thread/virtual/ and run jtreg test it. The fail rate is 13/30.
I find that there may be a problem in ForkJoinPool.java.
The `signalWork` may choose do nothing when (c >>> RC_SHIFT) >= pc. (In the testcase, 29 threads are pinned and one is free for doing some work.)
And the one active thread which is in the first lines of the function `awaitWork` (before change the ctl) will not be signaled and choose to park.
- relates to
-
JDK-8322732 ForkJoinPool may underutilize cores in async mode
-
- Resolved
-
-
JDK-8345294 test/jdk/java/lang/Thread/virtual/RetryMonitorEnterWhenPinned.java timeout with JTREG_TEST_THREAD_FACTORY=Virtual
-
- Closed
-
-
JDK-8350294 java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted"
-
- Closed
-
- links to
-
Review(master) openjdk/jdk21u-dev/1455