On Fri, 3 Dec 2021 05:17:26 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:
> The issue appears to be due to running jstack before allowing the 4 threads > created by `LingeredAppWithLock` to fully start up and reach their blocking > or timed wait state. With this fix `LingeredAppWithLock.main()` now waits > until the threads have reached the blocking or timed wait state before > calling into `LingeredApp.main()`. > > Tests that use `LingeredAppWithLock` call `LingeredApp.startApp()`, which > will first launch `LingeredAppWithLock` and then block until the lock file is > touched. This blocking/waiting is done the call to `waitAppReady()`, which > will be called before `LingeredApp.startApp()` returns. The lock file is not > touched until `LingeredApp.main()` is called, and it is not called until > after `LingeredAppWithBloc.main()` has already verified the state of all the > threads. Thus by the time `LingeredApp.startApp()` returns, we can be sure > that the threads started by `LingeredAppWithLock.main()` are in the desired > state. I got some test failures when doing a large number of test runs. Need to investigate. Withdrawing for now. ------------- PR: https://git.openjdk.java.net/jdk/pull/6689