RFR (S): JDK-8152949: Jigsaw crash when Klass in _fixup_module_field_list is unloaded
Dean Long
dean.long at oracle.com
Thu Apr 14 20:23:43 UTC 2016
Do the inc_keep_alive() and dec_keep_alive() updates need to be atomic
by any chance?
dl
On 4/14/2016 12:29 PM, Lois Foltan wrote:
> Hello,
>
> Please review the following fix:
>
> Webrev:
> http://cr.openjdk.java.net/~lfoltan/bug_jdk8152949/
>
> Bug: Jigsaw crash when Klass in _fixup_module_field_list is unloaded
> https://bugs.openjdk.java.net/browse/JDK-8152949
>
> Summary:
> Prior to java.base being defined to the VM by the module system
> initialization, classes loaded must be saved on a fixup list in order
> to later have their java.lang.Class' module field patched with
> java.base's java.lang.reflect.Module object once java.base is
> defined. Before module system initialization is complete, all classes
> loaded must have java.base as their defining module and be loaded by
> the boot loader. It was erroneously assumed that all classes placed
> on the module fixup list therefore would not die before java.base was
> defined. This assumption did not hold for anonymous classes which
> have a shorter lifetime than the boot loader. Test cases run with a
> small heap, -Xmx2m, would cause GC to unload the anonymous classes on
> the fixup list, later causing issues when an attempt was made to patch
> these classes with java.base's java.lang.reflect.Module object. Thank
> you to Per Liden and Stefan Karlsson for contributing this fix for the
> runtime team.
>
> Test:
> - java/lang, java/util, java/io, all Hotspot jtreg tests, Hotspot
> colocated tests & noncolo.quick.testlist
> - several iterations of ConcurrentLinkedQueue/RemoveLeak.java which
> exhibited the problem
More information about the hotspot-dev
mailing list