RFR: 8308764: Reporting errors from create_vm may crash [v4]

Kim Barrett kbarrett at openjdk.org
Tue Jun 6 06:49:56 UTC 2023


On Tue, 6 Jun 2023 03:52:20 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> There are more details in the bug report but the basic fix is to not delete the main_thread so that it is available to report the exception that caused VM initialization to fail. Added some additional comments too.
>> 
>> Testing:
>>  - basic fault injection to test non-exception exit paths both before and after Universe:;is_fully_initialized() which exercises the failing use of JavaThread::current()
>>  -  tiers 1-3 sanity testing
>> 
>> Thanks.
>
> David Holmes has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Take 3

One minor comment nit.  Looks good otherwise.

src/hotspot/share/runtime/threads.cpp line 569:

> 567:     // It is possible that we managed to fully initialize Universe but have then
> 568:     // failed by throwing an exception. In that case our caller JNI_CreateJavaVM
> 569:     // we will want to report it, so we can't delete the main thread.

s/we//

-------------

Marked as reviewed by kbarrett (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/14238#pullrequestreview-1464386829
PR Review Comment: https://git.openjdk.org/jdk/pull/14238#discussion_r1219012919


More information about the hotspot-runtime-dev mailing list