RFR (S) JDK-8162553: Crash in class unloading due to null CLD having a zero _keep_alive value
Karen Kinnear
karen.kinnear at oracle.com
Tue Aug 9 21:57:10 UTC 2016
Code looks good. Agree with David about comment about use - for the _keep_alive field: for
loaders never unloaded (boot now, platform and application I would expect us to add), and for
anonymous classes via reference count methods.
thanks,
Karen
> On Aug 8, 2016, at 3:41 PM, Lois Foltan <lois.foltan at oracle.com> wrote:
>
> Hello,
>
> Please review the following fix:
>
> Webrev:
> http://cr.openjdk.java.net/~lfoltan/bug_jdk8162553/webrev/
>
> Bug: Crash in class unloading due to null CLD having a zero _keep_alive value
> https://bugs.openjdk.java.net/browse/JDK-8162553
>
> Summary:
> Limit the increment/decrement of the ClassLoaderData _keep_alive field to just ClassLoaderData(s) created specifically for an anonymous class. Due to the uniqueness that no other class shares an anonymous class' ClassLoaderData, no other non-GC thread has knowledge of the anonymous class while it is being defined. By limiting the increment/decrement to just ClassLoaderData(s) dedicated to anonymous classes, the need to make this an atomic operation is avoided. This bug was exposed since java_lang_Class::create_mirror() is multi-threaded once java.lang.Class is loaded during JVM start up.
>
> Testing:
> Several runs of hotspot nightly testing and several iterations of various tests that have exposed this issue.
>
> Thanks,
> Lois
More information about the hotspot-dev
mailing list