RFR: 8235119: Incomplete initialization of scan_top values results in out-of-bounds scanning of regions
sangheon.kim at oracle.com
sangheon.kim at oracle.com
Thu Dec 19 18:55:01 UTC 2019
Hi Stefan,
On 12/19/19 5:27 AM, Stefan Johansson wrote:
> Hi,
>
> Please review this fix for JDK-8235119, it's intended for both JDK 14
> and 15.
>
> Webrev: http://cr.openjdk.java.net/~sjohanss/8235119/00/
> Issue: https://bugs.openjdk.java.net/browse/JDK-8235119
>
> Summary
> When we parallelized the evacuation preparation in JDK-8141637 we made
> a small change to how we initialize the scan state. The problem with
> this change was that free and unavailable regions didn't get cleared
> and reset as before. This will lead to regions being allocated during
> the GC can have an inconsistent state.
>
> This fix reverts a small part of JDK-8141637, so that we continue to
> clear and reset all regions regardless of state and then just update
> the state for the regions needing it.
>
> Testing
> Functional testing in mach5 tier1-3 and Kim has done manual
> verification with tests that previously reproduced the failure.
>
> Also big thanks to Kim, Sangheon and Thomas for all the work with
> reproducing and digging into the issue.
Looks good to me too.
I chased with logs added and the result shows that your thought above is
correct. i.e. at the time of crash the problematic region is gc
allocating region and its scan_top is top which previously was 0 (if it
was properly reset).
I reassigned the bug to you as you have the patch.
Thanks,
Sangheon
>
> Cheers,
> Stefan
More information about the hotspot-gc-dev
mailing list