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

Coleen Phillimore coleenp at openjdk.org
Wed May 1 13:26:53 UTC 2024


On Wed, 1 May 2024 13:10:29 GMT, Kevin Walls <kevinw at openjdk.org> wrote:

>> src/hotspot/share/runtime/vframeArray.cpp line 55:
>> 
>>> 53:      MonitorChunk* chunk = _monitors;
>>> 54:      _monitors = nullptr;
>>> 55:      delete chunk;
>> 
>> Is there just one monitor now on the vframeArrayElement?  All of these functions imply there are more than one but if I'm reading this right only one gets deleted.
>
> Thanks Coleen -
> 
> There is one MonitorChunk, created with new MonitorChunk(list->length());  where list is vf->monitors()
> and it creates its _monitors member as a NEW_C_HEAP_ARRAY sized by number of monitors.
> 
> ~MonitorChunk() calls FreeHeap(monitors());  so all the info for possibly multiple monitors is freed in one call as before.
> 
> 
> JavaThread had possibly a linked list of MonitorChunks, that is being removed  (if we ever used that list, wouldn't that imply multiple deopts in the same JavaThread at the same time??)

Ok, so I didn't read it wrong.  If there's only one monitor now on each vframeArrayElement, can you change the name to _monitor and this function should be free_monitor_chunk, singular?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18940#discussion_r1586291859


More information about the hotspot-dev mailing list