RFR: 8295713: runtime/ParallelLoad/SuperWait/SuperWaitTest.java fails intermittently on Windows [v4]
David Holmes
dholmes at openjdk.org
Tue Oct 25 13:01:54 UTC 2022
On Tue, 25 Oct 2022 12:25:03 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> I added another semaphore so the test will run in the order I want it to. Alternate suggestions or corrections welcome.
>> Running with GHA, and our tier1 in progress.
>
> Coleen Phillimore has updated the pull request incrementally with one additional commit since the last revision:
>
> David's fix - allow thread 2 to run first.
Sorry Coleen some of the intermediate changes here confused me. The original use of `mainSync` is slowing down thread1 (loading A) so that it can't proceed until thread 2 starts to load C and has the lock of L2 (which sets up the potential deadlock scenario). That could be added back in conjunction with the `dIsLoaded` usage. In both cases thread 2 could always get to go first and load C and D before thread 1 has a chance to do anything.
test/hotspot/jtreg/runtime/ParallelLoad/SuperWait/SuperWaitTest.java line 39:
> 37: public class SuperWaitTest {
> 38:
> 39: private static volatile boolean dIsLoading = false;
This doesn't need to be volatile as it is only accessed under the classloader lock.
-------------
PR: https://git.openjdk.org/jdk/pull/10822
More information about the hotspot-runtime-dev
mailing list