RFR: 8038925: Java with G1 crashes in dump_instance_fields using jmap or jcmd without fullgc

Mikael Gerdin mikael.gerdin at oracle.com
Wed May 21 08:46:28 UTC 2014


Hi Andreas,

On Tuesday 20 May 2014 16.26.40 Andreas Eriksson wrote:
> Hi,
> 
> 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.)
> 
> Description:
> 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
> perm gen.
> 
> For more information, and a more in-depth analysis, please see the jira bug.
> 
> http://cr.openjdk.java.net/~aeriksso/8038925/webrev.01/

The change looks good to me.

/Mikael

> https://bugs.openjdk.java.net/browse/JDK-8038925
> 
> Regards,
> Andreas




More information about the hotspot-gc-dev mailing list