RFR: 8214118: HeapRegions marked as archive even if CDS mapping fails
stefan.johansson at oracle.com
Wed Nov 21 14:43:59 UTC 2018
Please review this fix to avoid leaving heap metadata in an inconsistent
state when CDS archive mapping fails.
Since JDK 12b15 a default CDS archive is shipped with the JDK. If this
archive for some reason fails to be mapped into the heap, the cleanup
leaves the heap metadata in a inconsistent state. Instead of clearing
the range in the map storing which regions are archive, it once again
marks the range as archive.
This information is used by the G1 Full collections and because a
regions is marked as archive even though it is not, we skip marking
through this region. This causes the heap to be corrupt and we can crash
in many different ways.
Verified that the new code clears the map correctly and re-ran the
benchmark previously failing many times. Tier 1-3 of normal functional
testing also run through m5 without problems.
More information about the hotspot-dev