RFR (XS): 8233792: TestG1ParallelPhases.java fails with phase NonYoungFreeCSet not found (2)
thomas.schatzl at oracle.com
Mon Nov 11 15:44:27 UTC 2019
can I have reviews for this small test fix to avoid this test failing
The tests tries to force mixed gcs to wait for a particular JFR event
only sent at that time.
The way it forces those is a bit wrong: in some cases it may happen that
at the time it starts a concurrent marking, another one just finished
without being able to clean out the old gen. This means that the initial
mark for this forced marking will be upgraded to a full gc (which also
ends that marking), and the following forced young collections are
young-only gcs only.
In total, no mixed gcs happen in that case, and so that JFR event is
The fix is to make sure that before forcing mixed gc (which works) we
force the heap into a state where the upgrade to full gc may not happen
- by forcing a full gc.
Without the patch the fails like 6 times in 4000 runs, with the change
it does not fail after 3k runs.
More information about the hotspot-gc-dev