[9] RFR (S): 8060147: SIGSEGV in Metadata::mark_on_stack() while marking metadata in ciEnv

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Thu Oct 30 10:14:56 UTC 2014


Roland,

Thanks for the feedback.

>> http://cr.openjdk.java.net/~vlivanov/8060147/webrev.00
>> https://bugs.openjdk.java.net/browse/JDK-8060147
>>
>> ciObjectFactory doesn't keep cached Metadata* alive. ciMetadata is different from ciObject - it doesn't store JNI handle, but a raw Metadata* pointer.
>
> What kind of ciMetadata do you observe being unloaded?
I saw that ciMethod for a method from VM anonymous class went away. But 
that's what my stress test does - unloads VM anonymous classes a lot.

> For instance, if I remember correctly ciInstanceKlass is kept alive by storing a handle to the loader object of the instance klass.
Thanks for the pointer! I missed that.

It should work for ciInstanceKlass & ciMethod with regular classes.
VM anonymous classes have loader == NULL, so class holder 
(java_mirror()) should be used instead. Also, I don't see how 
ciMethodData keeps relevant MethodData from unloading.

Regarding the fix, I can add special cases for VM anonymous classes & 
MethodData or keep it as is (more explicit). What do people think?

Best regards,
Vladimir Ivanov


More information about the hotspot-runtime-dev mailing list