RFR: 8329088: Stack chunk thawing races with concurrent GC stack iteration [v2]

Patricio Chilano Mateo pchilanomate at openjdk.org
Wed Apr 17 00:49:08 UTC 2024


On Tue, 16 Apr 2024 09:19:08 GMT, Erik Österlund <eosterlund at openjdk.org> wrote:

>> src/hotspot/share/runtime/continuationFreezeThaw.cpp line 567:
>> 
>>> 565:   // Consider leaving the chunk's argsize set when emptying it and removing the following branch,
>>> 566:   // although that would require changing stackChunkOopDesc::is_empty
>>> 567:   if (!chunk->is_empty()) {
>> 
>> Seems you have implemented the suggestion in the comment so we can remove this branch and unconditionally decrement total_size_needed.
>
> I currently have an assert that checks that you shouldn't be asking for the argsize() if the chunk is empty, because it is so error prone. I think I'd like to keep the assert though - it was quite useful.

We should be okay since _cont.argsize gets it from the ContinuationEntry. I tested it a bit and we would also need to update _fast_freeze_size to be cont_size() in the chunk empty case before calling freeze_fast_copy() otherwise we hit an assert there. But I can do this in another RFR if you want.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/18643#discussion_r1568071510


More information about the hotspot-dev mailing list