RFR 8028497: SIGSEGV at ClassLoaderData::oops_do(OopClosure*, KlassClosure*, bool)

Jon Masamitsu jon.masamitsu at oracle.com
Wed Mar 26 16:24:02 UTC 2014


Coleen,

Did you remove Class_obj_allocate() because it was only
called in that one spot and  use obj_allocate() did most
of the work?

http://cr.openjdk.java.net/~coleenp/8028497/src/share/vm/oops/instanceMirrorKlass.cpp.frames.html

  373   // the size in the mirror size itself.

Drop the second "size".  You know how we GC guys are
getting with our comments :-).

http://cr.openjdk.java.net/~coleenp/8028497/src/share/vm/oops/klass.cpp.frames.html

  498 void Klass::restore_unshareable_info(TRAPS) {
  499   // If an exception happened during CDS restore, some of these fields may already be
  500   // set.  We leave the class on the CLD list, even if incomplete so that we don't
  501   // modify the CLD list outside a safepoint.
  502   if (class_loader_data() == NULL) {
  503     ClassLoaderData* loader_data = ClassLoaderData::the_null_class_loader_data();

I can see that this works with the current CDS (sharing only classes loader
with the NULL class loader).  Will it work if the shared classes are loaded
with an application class loader?

Rest looks good.

Jon

On 3/25/2014 1:42 PM, Coleen Phillimore wrote:
> Summary: Keep class in CLD::_klasses list and mirror created for CDS 
> classes if OOM during restore_shareable_info(). This keeps pointers 
> consistent for CMS.
>
> This change makes restoring the mirror for shared classes restartable 
> if there is an OOM in the middle of restore_unshareable_info.   The 
> mirror field in the classes and CLD link is not cleaned up anymore.  
> The class isn't marked loaded though so must be loaded again.
>
> Tested with Stefan's test case with hard coded OOM in jvm, so can't 
> add the test.   Also ran all the tests against -client and server with 
> -Xshare:auto and with -XX:+UseConcMarkSweepGC.
>
> open webrev at http://cr.openjdk.java.net/~coleenp/8028497/
> bug link https://bugs.openjdk.java.net/browse/JDK-8028497
>
> Thanks,
> Coleen



More information about the hotspot-dev mailing list