On Thu, 30 Oct 2025 07:21:48 GMT, David Holmes <[email protected]> wrote:

>> FWIW the first instance of this I observed was our compiler threads. But 
>> yeah the practice to do this seems to be there for several JVM internal 
>> threads, but it does cause a nasty fatal error during initialization that I 
>> just wanted to smoothen out.
>
> I think the thought process here was that we should "never" get exceptions 
> during these parts of VM init because the minimum heap size should ensure the 
> VM can safely init. Hence getting an actual exception was indeed a "fatal 
> error" because something was misconfigured - hence the EM. With AoTOC that 
> may no longer be the case.

Interesting. So the idea is that we should at the time of the 
`set_init_completed();` call determine if we have a correct configuration and 
exit gracefully there, expecting that all future init code should succeed, and 
if it does not we throw a fatal. 

Currently we have a lot of "graceful" exits in initialisation code which runs 
between init completed and successfully returning from `Threads::create_vm`, 
but OOME was not one of them.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/27732#discussion_r2476730154

Reply via email to