RFR (S) JDK-8007725 - Klass::restore_unshareable_info() triggers assert(k->java_mirror() == NULL)
Coleen Phillimore
coleen.phillimore at oracle.com
Thu Mar 14 06:46:05 PDT 2013
This looks good. Thank you for fixing it.
Coleen
On 03/14/2013 01:49 AM, Ioi Lam wrote:
> Hi, could someone review this? This fixes a crash related to OOM
> handling.
>
> Thanks
> - Ioi
>
> On 03/11/2013 12:47 PM, Ioi Lam wrote:
>> Please review:
>> http://cr.openjdk.java.net/~iklam/8007725/null_mirror_001/
>>
>> Bug: NPG: Klass::restore_unshareable_info() triggers
>> assert(k->java_mirror() == NULL)
>>
>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8007725
>> or https://jbs.oracle.com/bugs/browse/JDK-8007725
>>
>> (The bugs.sun.com page may be unavailable for a couple of days due
>> to recent change of confidentiality status.)
>>
>> Summary of fix:
>>
>> The assert is at:
>>
>> --------
>> # Internal Error (src/share/vm/classfile/javaClasses.cpp:527)
>> # assert(k->java_mirror() == NULL) failed: should only assign
>> mirror once
>> java_lang_Class::create_mirror(KlassHandle)
>> Klass::restore_unshareable_info()
>> InstanceKlass::restore_unshareable_info()
>> instanceKlassHandle
>> SystemDictionary::load_shared_class(instanceKlassHandle,Handle)
>> --------
>>
>> This happens if during class loading, an OOM happened after
>> Klass::restore_unshareable_info() has called
>> java_lang_Class::create_mirror(), but before the class loading is
>> completed.
>>
>> At this point, the class is not in the system dictionary. However
>> the
>> Klass structure is partially initialized.
>>
>> If the app tries to load the same class again, the assert happens.
>>
>> The fix is to undo all work performed by
>> InstanceKlass::restore_unshareable_info().
>>
>> Tests executed:
>>
>> * JPRT
>> * JCK (vm, lang, api/signaturetest)
>> * UTE (vm.quick.testlist, )
>>
>> Thanks,
>> Ioi
>
More information about the hotspot-runtime-dev
mailing list