RFR: 8365556: ObjectMonitor::try_lock_or_add_to_entry_list() returns true with the wrong state of the node [v2]

David Holmes dholmes at openjdk.org
Wed Aug 20 08:15:50 UTC 2025


On Tue, 19 Aug 2025 08:35:51 GMT, Anton Artemov <duke at openjdk.org> wrote:

>> Hi, please consider the following change:
>> 
>> `ObjectMonitor::try_lock_or_add_to_entry_list() `does not change the node state to `TS_RUN `in case of a successful acquisition of the object monitor. In certain cases this can break the guarantee statement in the `ObjectMonitor::wait()` method and lead to a crash. The missing statement is added.
>> 
>> Tested in tiers 1 - 5.
>
> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
> 
>   8365556: Added assert.

This fixes the issue at hand - thanks. I think any further changes should be done under seperate RFE's if wanted.

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

Marked as reviewed by dholmes (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26794#pullrequestreview-3135331907


More information about the hotspot-runtime-dev mailing list