RFR: 8304147: JVM crash during shutdown when dumping dynamic archive [v2]
Coleen Phillimore
coleenp at openjdk.org
Mon Mar 27 12:04:35 UTC 2023
On Mon, 27 Mar 2023 04:46:43 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> src/hotspot/share/cds/dynamicArchive.cpp line 383:
>>
>>> 381: ExceptionMark em(current);
>>> 382: ResourceMark rm(current);
>>> 383: HandleMark hm(current);
>>
>> Why is there a HandleMark here? Should it be lower in the call stack?
>
> It is needed before calling `MetaspaceShared::link_shared_classes`. It seemed neatest to place all the "marks" together at the start of the method.
The HandleMarks should be around the code that creates and uses the handles, so GC doesn't have to collect Handles that are not needed. I don't see any Handle's escaping from link_shared_classes or any there. If you remove the HandleMark does (or where does) the code assert?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13134#discussion_r1149210540
More information about the hotspot-runtime-dev
mailing list