RFR: 8365556: ObjectMonitor::try_lock_or_add_to_entry_list() returns true with the wrong state of the node
Anton Artemov
duke at openjdk.org
Fri Aug 15 13:57:09 UTC 2025
On Fri, 15 Aug 2025 13:44:10 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:
> Looks fine, but I don’t see how `ObjectMonitor::wait` would crash without this. Were you experimenting with some additional changes?
Yes I was, but I think a crash is possible even with the current state of things. The path I was thinking is: `wait() -> enter() -> enter_with_contention_mark() -> enter_internal() -> try_lock_or_add_to_entry_list()`. I think a guarantee statement on line 1944 would be broken if `try_lock_or_add_to_entry_list()` returned true without changing the state.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26794#issuecomment-3191558144
More information about the hotspot-runtime-dev
mailing list