RFR: 8244551: Shenandoah: Fix racy update of update_watermark

Roman Kennke rkennke at redhat.com
Thu May 7 11:06:19 UTC 2020


Here comes the good fix.

I changed volatile HeapWord* -> HeapWord* volatile.

I also added an accessor that does unsynchronized/fast access, to be
used at safepoint.

I also moved the implementations to shenandoahHeap.inline.hpp, they are
becoming more and more bulky to carry in .hpp.

http://cr.openjdk.java.net/~rkennke/JDK-8244551/webrev.01/

Ok?

Roman

> Disregard this webrev, it contains another change, and Zhengyu also
> pointed out that I got volatile HeapWord* wrong: it should be HeapWord*
> volatile of course. I'll post another webrev tomorrow.
> 
> Thanks,
> Roman
> 
>> See bug for discussion:
>> https://bugs.openjdk.java.net/browse/JDK-8244551
>>
>> Fix is to make _update_watermark volatile and access to it ordered
>> correctly with load_acquire() and release_store().
>>
>> http://cr.openjdk.java.net/~rkennke/JDK-8244551/webrev.00/
>>
>> Testing: testcase mentioned in bug on aarch64 several times,
>> hotspot_gc_shenandoah
>>
>> Ok?
>>
>> Roman
>>
> 



More information about the hotspot-gc-dev mailing list