RFR: 8296405: java/util/concurrent/forkjoin/AsyncShutdownNow.java is too slow
Jaikiran Pai
jpai at openjdk.org
Mon Nov 14 09:39:36 UTC 2022
On Fri, 4 Nov 2022 14:13:42 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> java/util/concurrent/forkjoin/AsyncShutdownNow.java takes ~40s as each test uses a delay of 5s before it invokes shutdownNow. The test will run in <1s if changed to poll the thread state and invoke shutdownNow when the thread waits.
>
> The update temporarily disables testInvokeAny because of a suspected issue doing shutdown at around the same that worker threads are spinning up. It duplicates more frequently (on Windows at least) with the updated test. JDK-8286352 and JDK-8288899 are two bugs on this issue. Doug Lea is looking into the issue. The test can be re-enabled when that issue is resolved.
Looks fine to me.
Unexpected exceptions could happen in `onWait` and could mean the `action` never gets run or the `action` itself fails. That exception isn't propagated back, but I believe that's fine in the case of these tests because these tests run a task which sleeps for a day. So, if the (`shutdownNow`) action doesn't get run for whatever reason, these tests will fail with a jtreg test timeout and will have the stacktrace printed on System.err from the implementation of the `onWait`.
test/jdk/java/util/concurrent/forkjoin/AsyncShutdownNow.java line 131:
> 129: * Test shutdownNow with thread blocked in invokeAny.
> 130: */
> 131: @Test(dataProvider = "executors", enabled = false)
Should we file a JBS to re-enable this so that we don't forget?
-------------
Marked as reviewed by jpai (Reviewer).
PR: https://git.openjdk.org/jdk/pull/10986
More information about the core-libs-dev
mailing list