RFR: 8373468: Shenandoah: Mutator may block at _gc_waiters_lock after allocation failure even block parameter is false [v2]

Xiaolong Peng xpeng at openjdk.org
Thu Dec 11 14:57:27 UTC 2025


> There is behavior discrepancy between Shenandoah generational mode and non-generational when it handles mutator allocation failure, as stated in the description of [JDK-8373468](https://bugs.openjdk.org/browse/JDK-8373468), in non-generational, the `block` parameter may not always work.
> 
> Further looking into ShenandoahGenerationalControlThread and ShenandoahControlThread, they handle the _requested_gc_cause and ShenandoahHeap::cancelled_cause differently in other places as well, the change in this PR will minimize the gap to unify the behavior, and also fix potentially missed allocation failure notifications in some rare cases for both control threads.
> 
> ### Test
> - [x] hotspot_gc_shenandoah
> - [ ] GHA (includes tier1 but no unit unit with gtest) - Only one test failure caused by header filer order, fixed. 
> - [x] gtest

Xiaolong Peng has updated the pull request incrementally with one additional commit since the last revision:

  Reorder include statements in shenandoahGenerationalControlThread.hpp

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/28758/files
  - new: https://git.openjdk.org/jdk/pull/28758/files/e60e71da..b3e18e9f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=28758&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=28758&range=00-01

  Stats: 2 lines in 1 file changed: 1 ins; 1 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/28758.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/28758/head:pull/28758

PR: https://git.openjdk.org/jdk/pull/28758


More information about the hotspot-gc-dev mailing list