Integrated: 8362087: Test containers/docker/ShareTmpDir.java intermittent fails

SendaoYan syan at openjdk.org
Wed Jan 7 11:54:58 UTC 2026


On Sat, 2 Aug 2025 14:48:41 GMT, SendaoYan <syan at openjdk.org> wrote:

> Hi all,
> 
> The test containers/docker/ShareTmpDir.java intermittent fails, because before this PR, test assume start two java process in docker container by two threads will make the two java process start simultancely, but in fact, the second java process maybe start slower than the first one, even that the first java process already exit and then the second java process not start yet. If we add `Thread.sleep(2000)` to the second thread at the begin of run() method, will make this intermittent failure to always reproduceable. This prove the anasyis.
> 
> If the two java process can not start simultancely, the expected '/tmp/hsperfdata_1 locked' error can not observed. So this test will intermittent fails.
> 
> This PR will check all the two java processes started already and runing simultancely before exit, this will make the expected '/tmp/hsperfdata_1 locked' error can be alway observed.
> 
> The touch file test/hotspot/jtreg/containers/docker/WaitForFlagFile.java only use for test containers/docker/ShareTmpDir.java.
> 
> Change has been verified locally, test-fix only, no risk.

This pull request has now been integrated.

Changeset: 929864b1
Author:    SendaoYan <syan at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/929864b1a40eb222d3b7b3451fc6d4e5316a7cc8
Stats:     15 lines in 2 files changed: 9 ins; 0 del; 6 mod

8362087: Test containers/docker/ShareTmpDir.java intermittent fails

Reviewed-by: sgehwolf, cnorrbin

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

PR: https://git.openjdk.org/jdk/pull/26605


More information about the hotspot-runtime-dev mailing list