RFR (S): 8225418: G1: region attribute remembered set state disagrees with actual remembered set state

Thomas Schatzl thomas.schatzl at oracle.com
Fri Jun 7 10:51:54 UTC 2019

Hi all,

  can I have reviews for this small change that fixes G1 clearing the
cached information about whether the remembered set for a given region
needs to be tracked or not for regions that were initially put into the
collection set, but ultimately not used during mixed collection,
causing some (correct) assertion failure (and in the product missing
remembered sets, i.e. crashes)?

The change makes sure that this information is not lost. It's basically
a one-liner (g1CollectionSet.cpp:535), somewhat obscured by additional
verification code.

There is no additional test case because the problem is really hard to
reproduce (no reproduction after 16k+ runs of some tests that failed
once). Instead I added some verification that causes tier1 failures if
there would be an issue.

Initially this issue ran under JDK-8224681 as reported by SAP, but due
to technical issues I had to create this new CR. The cause has, as
correctly been identified the optimization introduced in JDK-8200545
(in jdk13).

There have also been ideas that the cause for this problem were some
memory visibility issues, however I could not find any even after
multiple reviews. See the original bug report discussion too [0].

local jtreg passed with the change, failing without (with the
verification only), hs-tier1-5 60% through



More information about the hotspot-gc-dev mailing list