RFR: 8314225: SIGSEGV in JavaThread::is_lock_owned [v2]

Richard Reingruber rrich at openjdk.org
Wed Jan 31 08:29:04 UTC 2024


On Wed, 31 Jan 2024 03:58:55 GMT, Patricio Chilano Mateo <pchilanomate at openjdk.org> wrote:

>>> BasicLock::move_to() doesn't change the markword
>> 
>> Good point, I missed that.  So where does the markword get updated if the object was stack-locked?
>
>> > BasicLock::move_to() doesn't change the markword
>> 
>> Good point, I missed that. So where does the markword get updated if the object was stack-locked?
>>
> You mean in this BasicLock::move_to() call? If it was stack-locked, inflation will change the markword to point to the created ObjectMonitor (https://github.com/openjdk/jdk/blob/master/src/hotspot/share/runtime/synchronizer.cpp#L1471). The _owner field of that inflated monitor will contain the BasicLock* that was previously stored in the markword.

> @pchilano: OK so if deoptimization never sets the markword to point at the monitor chunks, then it seems pointless for JavaThread::is_lock_owned() to look at monitor chunks.

@dean-long I've been following the discussion. I think that it's the correct conclusion from @pchilano's observation.

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

PR Comment: https://git.openjdk.org/jdk/pull/17566#issuecomment-1918615317


More information about the hotspot-dev mailing list