RFR(XS): 7074579: G1: JVM crash with JDK7 running ATG CRMDemo Fusion App

John Cuthbertson john.cuthbertson at oracle.com
Tue Aug 9 10:13:34 PDT 2011


Hi Fred,

Thanks for the review.

JohnC

On 08/09/11 06:30, Frederic Parain wrote:
> The fix looks good.
>
> Fred
>
> On 08/ 6/11 01:13 AM, John Cuthbertson wrote:
>> Hi Everyone,
>>
>> Can I have a couple of volunteers look at these changes? The webrev can
>> be found at: http://cr.openjdk.java.net/~johnc/7074579/webrev.0/
>>
>> The issue was a crash caused by an oop that was naked across a GC. What
>> was happening was that the ServiceThread was attempting to send a GC
>> notification that came from the end of an evacuation pause. (Note that
>> the ServiceThread is a Java thread and the GC notification is sent when
>> the threads are restarted after the safepoint.) The construction of the
>> first of the object arrays (used to pass before and memory pool
>> information) triggered a full GC which moved the memory usage class.
>> Thus when the attempt to allocate the second object array was made, the
>> variable holding the klass oop was now stale causing the crash. Although
>> this issue was found when the app was run with G1, the issue is not G1
>> specific.
>>
>> The solution was to allocate a handle to hold the klass oop and use the
>> de-referenced handle in the allocations.
>>
>> Verified by inserting a full GC after the first array allocation and
>> running the GC notification regression test. Fix was tested by running
>> the regression test with all collectors and monitoring a KitchenSink run
>> with jconsole.
>>
>> Thanks,
>>
>> JohnC
>



More information about the hotspot-gc-dev mailing list