RFR: 8254164: G1 only removes self forwarding pointers for last collection set increment

Thomas Schatzl thomas.schatzl at oracle.com
Fri Oct 9 07:29:52 UTC 2020


Hi StefanJ,

On 08.10.20 21:15, Stefan Johansson wrote:
> On Thu, 8 Oct 2020 08:05:57 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> 
>> Hi all,
>>
>>    can I have reviews for this change that fixes a previously hard to reproduce crash that started showing up much more
>>    frequently in conjunction with changes to young gen sizing (JDK-8244603)?
>>
[...]
> Nice work tracking this one down Thomas. The fix looks good, just a small thing about the comment.
> 
> src/hotspot/share/gc/g1/g1EvacFailure.cpp line 264:
> 
>> 262:   // We need to check all regions whether they need self forward removals, not only
>> 263:   // the last collection set increment. Reference processing may copy over and fail
>> 264:   // evacuation in any region in the collection set.
> 
> I think your explanation in the summary is very clear and it would be nice to capture it in the comment as well. Maybe
> something like:  Suggestion:
> 
>    // We need to check all regions whether they need self forward removals, not only
>    // the last collection set increment. The reason is that reference processing (e.g.
>    // finalizers) can make it necessary to resurrect an otherwise unreachable object at
>    // the very end of the collection. The resurrected object might be located in a region
>    // evacuated in an earlier increment, but copying it at the end of the collection can
>    // trigger an evacuation failure.
> 

   thanks for your review. I updated the comment with a slightly 
different version of what you wrote above.

Thanks,
   Thomas



More information about the hotspot-gc-dev mailing list