JDK-8194823 : Serial and CMS GC do not account GCs caused by TLAB allocation in GC overhead limit
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2018-01-09
  • Updated: 2022-11-16
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 21
21Unresolved
Description
Serial and CMS GC implement the GCOverheadLimit mechanism that makes the VM bail out with an OOME if the amount of GC activity has been too high recently.

The implementation in CollectedHeap::common_mem_allocate_noinit() however only considers GC activity in the super-slow path when calling CollectedHeap::mem_allocate().

Any GC issued during the call to allocate_from_tlab() is not considered in this calculation, but both Serial and CMS may run GCs at that time.

So both collectors might issue many more GCs before bailing out.

Parallel GC is fine, it does never issue a GC while trying to allocate a new TLAB.

This seems to be a "day one" omission.