RFR: 8347833: CrashOnOutOfMemory should stop GC threads before HeapDumpOnOutOfMemoryError [v2]

David Holmes dholmes at openjdk.org
Fri Feb 14 05:37:11 UTC 2025


On Thu, 13 Feb 2025 18:08:44 GMT, Fairoz Matte <fmatte at openjdk.org> wrote:

>> When CrashOnOutOfMemory  and HeapDumpOnOutOfMemoryError invoked together, we should make sure, it is performed in a single safepoint, this will avoid allowing other threads to run and throw OOM errors after the initial one is already under error logging.
>
> Fairoz Matte has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Aditional work on review comments

src/hotspot/share/utilities/debug.cpp line 272:

> 270:     VMError::report_java_out_of_memory(message, HeapDumpOnOutOfMemoryError, CrashOnOutOfMemoryError);
> 271: 
> 272:     if (CrashOnOutOfMemoryError) {

The `if (CrashOnOutOfMemoryError)` is unreachable code as `report_java_out_of_memory` already aborted.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23519#discussion_r1955582527


More information about the hotspot-dev mailing list