RFR: 8369442: ExitOnOutOfMemoryError should exit more gracefully [v2]
Axel Boldt-Christmas
aboldtch at openjdk.org
Fri Oct 10 08:18:03 UTC 2025
On Fri, 10 Oct 2025 06:12:42 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> See RFE for more discussion. It seems we have a leeway in defining what "exit" means for `-XX:+ExitOnOutOfMemoryError`, and this PR does it more akin to `JVM_Halt`, rather than abrupt `os::_exit`. This gives VM a chance to shutdown some of its subsystems gracefully.
>>
>> Comments welcome!
>>
>> Additional testing:
>> - [x] Linux x86_64 server fastdebug, `tier1`
>> - [ ] Linux x86_64 server fastdebug, `all`
>
> Aleksey Shipilev has updated the pull request incrementally with one additional commit since the last revision:
>
> Update src/hotspot/share/utilities/debug.cpp
>
> Co-authored-by: David Holmes <62092539+dholmes-ora at users.noreply.github.com>
Are we sure that `before_exit` can handle being called at any point between `set_init_completed` and when we start running user byte code.
I know we have internally questioned the validity of the development flag `ExitOnFullCodeCache` which also can call `before_exit` very early, albiet it uses the non-halting version which is scarier.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27718#issuecomment-3388789658
More information about the hotspot-dev
mailing list