RFR: 8366659: ObjectMonitor::wait() can deadlock with a suspension request [v6]
Anton Artemov
aartemov at openjdk.org
Fri Nov 14 12:04:33 UTC 2025
On Thu, 13 Nov 2025 20:38:52 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:
>> The `notify()` call doesn’t unpark the waiter thread, it just moves it from the `_wait_set` to the `_entry_list`. The wait(timeout) is there to allow it to run again so that it is suspended in `reenter_internal()`. But currently the timings will not exercise this case well. I added some comments to fix it.
>
> Please see the notes in the new doWork3 transaction diagram. I think I've covered this case.
Thanks @dcubed-ojdk! I added your diagrams to the test.
>> This sleep is not needed.
>
> I have a comment about this in the new doWork3 transaction diagram.
Removed as suggested.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/27040#discussion_r2527248191
PR Review Comment: https://git.openjdk.org/jdk/pull/27040#discussion_r2527245983
More information about the serviceability-dev
mailing list