Integrated: 8366865: Allocation GC Pauses Triggered after JVM has started shutdown
Ivan Walulya
iwalulya at openjdk.org
Tue Sep 23 08:22:42 UTC 2025
On Wed, 10 Sep 2025 09:57:18 GMT, Ivan Walulya <iwalulya at openjdk.org> wrote:
> Please review this patch to skip VM_GC_Collect_Operations if initiated after the VM shutdown process has begun. We add a _is_shutting_down flag to CollectedHeap, which is set while holding the Heap_lock. This ensures mutual exclusion with VM_GC_Collect_Operations, which also require the Heap_lock.
>
> Skipping VM_GC_Collect_Operation would otherwise cause allocation requests to fail (resulting in OutOfMemoryError) if requesting daemon threads were allowed to continue, we instead block these threads on a monitor. They remain stalled until they are terminated as part of the VM shutdown sequence.
>
> Testing: Tier 1-7
This pull request has now been integrated.
Changeset: 3e5094ed
Author: Ivan Walulya <iwalulya at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3e5094ed12dbfad7587b85ae2168565682c1f1db
Stats: 100 lines in 15 files changed: 73 ins; 20 del; 7 mod
8366865: Allocation GC Pauses Triggered after JVM has started shutdown
Reviewed-by: ayang, tschatzl
-------------
PR: https://git.openjdk.org/jdk/pull/27190
More information about the hotspot-dev
mailing list