RFR: 8366865: Allocation GC Pauses Triggered after JVM has started shutdown [v5]

Ivan Walulya iwalulya at openjdk.org
Tue Sep 16 12:35:38 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 with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 12 additional commits since the last revision:

 - Merge remote-tracking branch 'upstream/master' into shutting_down_gcs
 - Revert
 - Thomas Review
 - return on timeout
 - Merge remote-tracking branch 'upstream/master' into shutting_down_gcs
 - timed wait
 - Merge remote-tracking branch 'upstream/master' into shutting_down_gcs
 - space
 - remove debug logs
 - remove debug logs
 - ... and 2 more: https://git.openjdk.org/jdk/compare/35dc4349...edad0efe

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/27190/files
  - new: https://git.openjdk.org/jdk/pull/27190/files/2ebff06c..edad0efe

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=27190&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=27190&range=03-04

  Stats: 4639 lines in 131 files changed: 3502 ins; 611 del; 526 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