On Mon, 11 Mar 2024 02:18:57 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> I have an idea how to fix it but it will add extra complexity. Not sure it >> is worth it. >> It is possible to identify there was a spurious wakeup and invalidate the >> sub-test result in such a case. >> Not sure if it is important to rerun the sub-test then. >> What do you think? > > Sorry I missed this response. I can't see a way to address spurious wakeups > in this case as it needs to be a per-thread flag (so that each thread knows > it was notified) but you don't know which thread will be notified in any > given call to `notify()`. I also can't see how you can detect a spurious > wakeup in this code. If they happen then a subtest may fail due to an > unexpected number of re-entering threads. > I think we will just have to see how stable the test is in practice. Okay, thanks! I'll add some diagnostic code to catch spurious wakups. Let's see if we ever encounter any spurious wakeup in this test. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/17680#discussion_r1520204046