RFR(XS): 7074579: G1: JVM crash with JDK7 running ATG CRMDemo Fusion App
John Cuthbertson
john.cuthbertson at oracle.com
Fri Aug 5 23:13:49 UTC 2011
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