RFR: 8366659: ObjectMonitor::wait() liveness problem with a suspension request [v21]

Anton Artemov aartemov at openjdk.org
Mon Jan 19 09:57:11 UTC 2026


On Fri, 16 Jan 2026 22:07:22 GMT, Daniel D. Daugherty <dcubed at openjdk.org> wrote:

> Sorry for the long delay in getting back to this review.
> 
> There a comment in ObjectMonitor::wait() that I think might be incorrect. See L1965 -> L1969 in src/hotspot/share/runtime/objectMonitor.cpp.
> 
> I really like the refactoring that you've done with the test!
> 
> Thumbs up on the code and most of the comments.

I think that part of the comment dates back to 2014 commit, when there was no `ExitOnSuspend` trick, and it seems that the comment is no longer valid. I modified in both places where we use the trick, one in `wait()`, and another one in `enter_with_contention_mark()`, because they are the same.

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

PR Comment: https://git.openjdk.org/jdk/pull/27040#issuecomment-3767425019


More information about the hotspot-runtime-dev mailing list