RFR: 8027630 SIGSEGV in const char*Klass::external_name()
Markus Gronlund
markus.gronlund at oracle.com
Fri Nov 15 05:11:06 PST 2013
Hi Staffan,
Looks good.
Thanks
Markus
-----Original Message-----
From: Staffan Larsen
Sent: den 15 november 2013 10:48
To: hotspot-runtime-dev at openjdk.java.net; serviceability-dev at openjdk.java.net serviceability-dev at openjdk.java.net
Subject: RFR: 8027630 SIGSEGV in const char*Klass::external_name()
All,
The StackFrameInfo class used when creating stack dumps from the management APIs keeps references to Methods. This is similar to what BacktraceBuilder does when creating stack traces in java_lang_Throwable::fill_in_stack_trace(). For permgen removal, BacktraceBuilder was updated to add a reference to the holder class of the methods, otherwise these classes can be unloaded.
This fix adds the same kind of code to StackFrameInfo so that it now has an oop reference to the class. The new pop has been added to the oops_do() method.
In addition, the Method reference needs to be made visible to the MetadataOnStackMark class. To fix this a long chain of metadata_do() calls have been added.
I would really like to create a test for this race, but can't figure out a reliable way to do so.
bug: http://bugs.openjdk.java.net/browse/JDK-8027630
webrev: http://cr.openjdk.java.net/~sla/8027630/webrev.00/
Thanks,
/Staffan
More information about the serviceability-dev
mailing list