RFR: 8266576: dynamicArchive/ParallelLambdaLoadTest.java crashes in tier2 testing
Yumin Qi
minqi at openjdk.java.net
Fri May 7 15:28:50 UTC 2021
On Fri, 7 May 2021 00:08:53 GMT, Yumin Qi <minqi at openjdk.org> wrote:
> Hi, Please review
>
> In dynamic dump, the lambda invoker holder classes are regenerated in DynamicArchive::dump, which is after shutdown hook executed. The returned objects from the regeneration may contain invalid contents which caused crash like in this bug. It is late to execute java code, the fix is to move the call into MetaspaceShared::link_and_cleanup_shared_classes which is before shutdown hook, before halt.
> JDK-8266585 and JDK-8266594 failed in different patterns, could be the same reason.
>
> Tests: tier1,tier2
>
> Thanks
> Yumin
There also is concurrent issue at dynamic dump time (offline discussion with Ioi). We could encounter memory stomp when multiple threads adding to the global list, LambdaFormInvokers::_lambdaform_lines. That potentially screws some of the list entry up with inconsistent contents. The list should not grow once the dumping in progress. I will update with a lock to protect the list.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3910
More information about the hotspot-runtime-dev
mailing list