RFR: 8263427: Shenandoah: Trigger weak-LRB even when heap is stable

Roman Kennke rkennke at openjdk.java.net
Thu Mar 11 18:43:24 UTC 2021


We currently guard all LRBs, including weak-LRB, by a test for heap-stable and only enter the LRB when heap is unstable (e.g. evacuation or update-refs in progress). However, the weak LRB must also be entered when heap is stable and concurrent refs is in progress, otherwise we may accidentally resurrect otherwise unreachable weak referents. This can happen when we take the shortcut cycle and skip evac&update-refs.

I believe this might be the root cause for JDK-8262852. 

Testing:
 - [x] New testcase failed without change, passes now
 - [ ] hotspot_gc_shenandoah
 - [ ] tier1 (+Shenandoah)

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

Commit messages:
 - 8263427: Shenandoah: Trigger weak-LRB even when heap is stable

Changes: https://git.openjdk.java.net/jdk/pull/2945/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=2945&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8263427
  Stats: 188 lines in 12 files changed: 161 ins; 12 del; 15 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2945.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2945/head:pull/2945

PR: https://git.openjdk.java.net/jdk/pull/2945


More information about the shenandoah-dev mailing list