RFR: 8324881: ObjectSynchronizer::inflate(Thread* current...) is invoked for non-current thread [v4]

Daniel D. Daugherty dcubed at openjdk.org
Thu Feb 1 22:09:03 UTC 2024


On Thu, 1 Feb 2024 12:49:24 GMT, Richard Reingruber <rrich at openjdk.org> wrote:

>> It is the ` -XX:LockingMode=0 -Xlog:monitorinflation=trace ` that timeout. 
>> You are correct that this case should also be handled. 
>> No tests reach this point. But it should still be reachable. The re-lock code will never cause inflation, but it might relock a lock which was inflated by the current thread (due to hash code) and then relock calls `enter_for`
>
> This test triggers the case where `prev_owner` is a stack lock with `LM_LEGACY` https://github.com/openjdk/jdk/compare/master...reinrich:jdk:tmp2.

I'm confused. The `LockingMode == LM_LEGACY && locking_thread->is_lock_owned((address)prev_owner) == true`
case is handled below on L350 -> L355. What am I missing?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17626#discussion_r1475213010


More information about the hotspot-dev mailing list