RFR: 8264634: CollectCLDClosure collects duplicated CLDs when dumping dynamic archive [v2]
Yi Yang
yyang at openjdk.java.net
Mon Apr 5 03:48:03 UTC 2021
On Fri, 2 Apr 2021 21:55:20 GMT, Yumin Qi <minqi at openjdk.org> wrote:
> Hi, Yi
> The _loaded_cld is a global list, in this case it looks contain duplicated CLD in it.
> The duplication could from the thread run shutdown hook.
> Could you try
> if (!cld->is_unloading()) {
> cld->inc_keep_alive();
> `+` if (!_loaded_cld->contains(cld)) {
> _loaded_cld->append(cld);
> `+` }
> }
> Please let us know if you can avoid the crash.
Hi Yumin, this fix still crashes because the CLDs collected at the first invocation of MetaspaceShared::link_and_cleanup_shared_classes are not cleaned, they will decrement their _keep_alives as before at the second invocation of MetaspaceShared::link_and_cleanup_shared_classes.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3320
More information about the hotspot-runtime-dev
mailing list