8237632: Shenandoah fails some vmTestbase_nsk_jvmti tests with "Forwardee must point to a heap address"
zgu at redhat.com
Mon Feb 3 20:59:28 UTC 2020
Shenandoah uses oop mark word's "marked" pattern to indicate forwarding.
Unfortunately, JVMTI heap walk (VM_HeapWalkOperation) also uses this
pattern to indicate visited.
The conflicts present serious problems during Shenandoah's concurrent
evacuation and concurrent reference update phases, as it blindly treats
"marked" pattern as "forwarding".
There are invariants we can use to distinguish "forwarding" and
1. Marked pattern in collection set indicates forwarding
2. Marked pattern off collection set indicates visited by ObjectMarker
(because oops seen by ObjectMarker were LRB'd)
3. No off collection set marked pattern at any shenandoah safepoint. In
fact, no off collection set marked pattern at any safepoints except
This is an important invariant, since traversal degenerated GC drops
collection set before entering degenerated GC cycle.
Note: We only downgrade some debug assertions, but preserve full
capacities of verifier, because verifier always runs at safepoints.
More information about the hotspot-gc-dev