RFR: 8366865: G1: Allocation GC Pauses Triggered after JVM has started shutdown [v3]
Ivan Walulya
iwalulya at openjdk.org
Mon Sep 15 17:12:35 UTC 2025
> 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
Ivan Walulya has updated the pull request incrementally with one additional commit since the last revision:
Thomas Review
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/27190/files
- new: https://git.openjdk.org/jdk/pull/27190/files/187a463b..0e45912b
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=27190&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=27190&range=01-02
Stats: 13 lines in 4 files changed: 5 ins; 5 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/27190.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/27190/head:pull/27190
PR: https://git.openjdk.org/jdk/pull/27190
More information about the hotspot-dev
mailing list