JDK-8225357 : Rewire ShenandoahHeap::maybe_update_with_forwarded for contending fixups
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8-shenandoah,11-shenandoah,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-06-05
  • Updated: 2020-01-16
  • Resolved: 2019-06-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 13 JDK 14
13 b25Fixed 14Fixed
Related Reports
Blocks :  
Blocks :  
Description
Currently the method can return NULL on the path where something else is contending over the write. In most current cases, that path works correctly, but not when something else (for example, inline fixup in barrier taken by Java thread) updates the references on their own. 

Then, the CAS might fail (as it should), and the GC code would think that thread is responsible to show the object to the marking code. This is risky and would lead to bugs. Instead, we would want to reply with the most actual reference at all times.
Comments
Webrev: http://cr.openjdk.java.net/~shade/8225357/webrev.01
05-06-2019

This might happen with JDK-8222766, for example.
05-06-2019