RFR: 8038925: Java with G1 crashes in dump_instance_fields using jmap or jcmd without fullgc
andreas.eriksson at oracle.com
Tue May 20 14:26:40 UTC 2014
Could I have a review for this G1 jdk7 only fix please?
(There is a related problem in jdk8 and jdk9, where an assert can fail
because of this problem. I have logged another bug for this.)
Due to the marking cleanup reclaiming empty regions, and having stale
references a crash can occur when doing a heap dump.
The code tries to do an is_klass check on the object, which crashes the VM.
The fix is to add an is_perm check before doing the check, since is_perm
will do a bounds check on the oop and if it's in the perm gen we know
it's safe to look at it since G1 only ever does full compactions of the
For more information, and a more in-depth analysis, please see the jira bug.
More information about the hotspot-gc-dev