RFR: 8291653: G1 refinement incorrectly expects always-valid HeapRegion out of the Hot Card Cache
Daniel D. Daugherty
dcubed at openjdk.org
Thu Aug 4 23:09:49 UTC 2022
On Wed, 3 Aug 2022 11:36:51 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I have reviews for this wrong use of `G1CollectedHeap::heap_region_containing` in `G1RemSet::clean_card_before_refine()`?
>
> If a card is evicted from the hot card cache it might also be located in an outdated (reclaimed) region (by Remark). So the call needs to explicitly consider that case and use `heap_region_containing_or_null` and appropriately check for that later.
>
> This is only an issue in debug mode, because while still this is kind of an illegal request, the return value will always be a valid `HeapRegion` instance as we never deallocate them.
>
> Testing: reproduced crashes with the given test case (1:5), no more crashes afterwards.
>
> Thanks,
> Thomas
It would be good if this PR got reviewed and integrated soon. The number of
sightings of this test failure is starting to show up on my radar and I'll likely
ProblemList it tomorrow (Fri) if the PR is not integrated soon.
-------------
PR: https://git.openjdk.org/jdk/pull/9724
More information about the hotspot-gc-dev
mailing list