RFR: 8350905: Shenandoah: Releasing a WeakHandle's referent may extend its lifetime [v2]
William Kemper
wkemper at openjdk.org
Wed Mar 12 18:55:08 UTC 2025
> When weak handles are cleared, the `nullptr` is stored with the `ON_PHANTOM_OOP_REF` decorator. For concurrent collectors using a SATB barrier like Shenandoah, this may cause the referent to be enqueued and marked when it would be otherwise unreachable. The problem is especially acute for Shenandoah's generational mode, in which a young region holding the otherwise unreachable referent, may become trash after the referent is enqueued for old marking. Shenandoah's store barrier should be modified to not enqueue WEAK or PHANTOM stores in the SATB buffer.
William Kemper has updated the pull request incrementally with two additional commits since the last revision:
- Split out and comment on weak/phantom stores separately
- Revert unnecessary change
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/24001/files
- new: https://git.openjdk.org/jdk/pull/24001/files/a742874e..929bf043
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=24001&range=01
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=24001&range=00-01
Stats: 10 lines in 1 file changed: 7 ins; 0 del; 3 mod
Patch: https://git.openjdk.org/jdk/pull/24001.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/24001/head:pull/24001
PR: https://git.openjdk.org/jdk/pull/24001
More information about the hotspot-gc-dev
mailing list