[jdk17] RFR: 8269897: Shenandoah: Treat UNKNOWN refs access as strong [v2]

Roman Kennke rkennke at openjdk.java.net
Wed Jul 7 12:37:16 UTC 2021


On Wed, 7 Jul 2021 10:41:25 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

> It looks okay to me, and it fixes the jcstress failures. But I see one of the `tier1` tests failing:
> 
> ```
> $ make run-test TEST=gc/TestReferenceClearDuringReferenceProcessing.java TEST_VM_OPTS="-XX:+UseShenandoahGC"
> ...
> TEST RESULT: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: ref not enqueued
> ```
> 
> I wonder if that failure indicates that fix is still incomplete or too conservative.

Changing behaviour for oop_load_in_heap() seems to break it (although it is not quite obvious to me how - the test does not seem to access Reference.referent itself, especially not via reflection/unsafe/etc. Maybe something internal in Reference queue does, and expects it to return NULL on unreachable.)
Let's limit the change to treat UNKNOWN as STRONG only for CAE.

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

PR: https://git.openjdk.java.net/jdk17/pull/219


More information about the shenandoah-dev mailing list