RFR: 8214118: HeapRegions marked as archive even if CDS mapping fails
Stefan Johansson
stefan.johansson at oracle.com
Wed Nov 21 14:43:59 UTC 2018
Hi,
Please review this fix to avoid leaving heap metadata in an inconsistent
state when CDS archive mapping fails.
Issue: https://bugs.openjdk.java.net/browse/JDK-8214118
Webrev: http://cr.openjdk.java.net/~sjohanss/8214118/00/
Summary
-------
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.
Testing
-------
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.
Thanks,
Stefan
More information about the hotspot-dev
mailing list