JDK-7132029 : G1: mixed GC phase lasts for longer than it should
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs23
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2012-01-20
  • Updated: 2013-09-18
  • Resolved: 2012-03-24
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 7 JDK 8 Other
7u4Fixed 8Fixed hs23Fixed
Related Reports
Relates :  
Relates :  
Relates :  
It turns out that, under certain circumstances, G1 goes into "mixed GC" phase and does not come out of it in a timely manner. In some cases, several mixed GCs collect no old regions but are still considered "mixed". This, unfortunately, causes a serious issue: while we're in mixed GC mode we do not allow a new conc mark cycle to start. So, we have seen cases where a series of mixed GCs take place, the next cycle starts too late, and we end up with an evac failure / Full GC.

Many thanks to Charlie Hunt for discovering this.

EVALUATION http://hg.openjdk.java.net/lambda/lambda/hotspot/rev/a9647476d1a4

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/a9647476d1a4

EVALUATION http://hg.openjdk.java.net/hsx/hotspot-gc/hotspot/rev/a9647476d1a4

EVALUATION One of the reasons this issue happens is that the code that adds old regions to the CSet is suboptimal when the young regions are predicted to take longer to collect that the pause time. It bails out early without actually adding any old regions but also does not flag that mixed GCs should not fail. So, it's possible to do a series of mixed GCs that have no old regions and that also block out the initiation of a conc mark cycle.