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 11:07:58 UTC 2025


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 brake the guarantee statement in the ObjectMonitor::wait() method and lead to a crash. The missing statement is added.

Tested in tiers 1 - 5.

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

Commit messages:
 - 8365556: Added missed statement for changing the node state to TS_RUN

Changes: https://git.openjdk.org/jdk/pull/26794/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26794&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8365556
  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/26794.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26794/head:pull/26794

PR: https://git.openjdk.org/jdk/pull/26794


More information about the hotspot-runtime-dev mailing list