RFR: 8304147: JVM crash during shutdown when dumping dynamic archive
David Holmes
dholmes at openjdk.org
Wed Mar 22 22:10:41 UTC 2023
On Wed, 22 Mar 2023 21:59:36 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> Thanks missed that. Not sure how we can get here with a pending exception though:
>>
>> DestroyJavaVM()
>> -> Threads::destroy_vm();
>> -> wait till last non-daemon thread
>> -> commit shutdown event
>> -> JavaThread::invoke_shutdown_hooks()
>>
>> There is nowhere for an exception to materialize in this path AFAICS.
>
> Also note no need to move this as the code below clears any pending exception (from running the hooks). If we could get here with an exception pending it would have broken running of the hooks before we even had dynamic archiving.
But looking at the code history we did always clear the exception before running the hooks. So I will restore this parts as it was before JDK-8266770. That means the HandleMark stays too.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13134#discussion_r1145457696
More information about the hotspot-runtime-dev
mailing list