JDK-8254164 : G1 only removes self forwarding pointers for last collection set increment
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 13,14,15,16
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2020-10-07
  • Updated: 2021-01-19
  • Resolved: 2020-10-12
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 16
16 b20Fixed
Related Reports
Blocks :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
The code to process regions where evacuation failed only processes the last increment. This leaves forwarded pointers in the mark word of some objects.

This is wrong in case there is an evacuation failure caused by reference processing in a region that has been evacuated in earlier evacuation increments. Reference processing (e.g. finalizers) can resurrect an otherwise unreachable object at the very end of the collection, that can't be copied and is located in a region evacuated in an earlier increment.

This optimization to only look at the last increment for removal of self forwarding pointers has been introduced in JDK-8218668.

This may cause crashes like JDK-8248438. Until changes to young gen sizing in JDK-8244603 this crashes has been a very rare occurrence.
Comments
Verified by CI results. (See https://bugs.openjdk.java.net/browse/JDK-8248438 for examples of failures.)
19-01-2021

Changeset: 59378a19 Author: Thomas Schatzl <tschatzl@openjdk.org> Date: 2020-10-12 07:55:01 +0000 URL: https://git.openjdk.java.net/jdk/commit/59378a19
12-10-2020

Instances of this problem can be detected as follows: - occurs after an evacuation failure in a mixed gc with optional evacuation; gc logging shows this (gc type and "Optional*" timing visible - the mark word contains a self-forwarding pointer (if it has not been mutilated previously in some way) Obviously this only affects G1.
09-10-2020

See JDK-8253413 for initial investigation.
07-10-2020