JDK-8293431 : G1: Investigate stalling allocating threads during shutdown instead of doing GC
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-09-06
  • Updated: 2022-09-10
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.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
After G1 stops concurrent threads during VM shutdown, particularly during concurrent clear bitmap, data structures may be in an inconsistent state:

The bitmap still contains marks but the concurrent cycle state is indicated as idle.

This means that some code relying on that consistency (basically that the bitmap is clear) needs to take extra precaution about this - JDK-8291725 and JDK-8274007 are the cases for young gc and full gc respectively where this issue cropped up.

ZGC, instead of trying to take care of this problem during GC, just stalls the java threads that want to allocate at that time.

Investigate whether stalling allocating threads that would otherwise cause a (GC) safepoint would be possible/reasonable for G1 too.