-
Bug
-
Resolution: Fixed
-
P4
-
8u74, 9
-
b24
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8216212 | 13 | Thomas Schatzl | P4 | Resolved | Fixed | team |
G1 calculates survivor capacity based on eden capacity and SurvivorRatio (literally current_eden_capacity / SurvivorRatio).
If eden capacity is very large, e.g. set by limiting min young gen size by G1NewSizePercent to something > 50%, and SurvivorRatio=1, the total of eden, survivor and old gen capacities will exceed total heap size.
This is just an issue with logging, e.g. on a 256M heap it is possible that the following log output is given:
[2.335s][info ][gc,heap ] GC(0) Eden regions: 153->0(133)
[2.335s][info ][gc,heap ] GC(0) Survivor regions: 0->20(133)
I.e. eden size before gc + survivor capacity = 286 regions, which are more regions than available in the heap.
The problem is that in the calculation of the next survivor capacity in G1CollectorPolicy::update_survivors_policy() does not guarantee consistency.
This seems to only be a printing issue.
This is a day one G1 bug.
If eden capacity is very large, e.g. set by limiting min young gen size by G1NewSizePercent to something > 50%, and SurvivorRatio=1, the total of eden, survivor and old gen capacities will exceed total heap size.
This is just an issue with logging, e.g. on a 256M heap it is possible that the following log output is given:
[2.335s][info ][gc,heap ] GC(0) Eden regions: 153->0(133)
[2.335s][info ][gc,heap ] GC(0) Survivor regions: 0->20(133)
I.e. eden size before gc + survivor capacity = 286 regions, which are more regions than available in the heap.
The problem is that in the calculation of the next survivor capacity in G1CollectorPolicy::update_survivors_policy() does not guarantee consistency.
This seems to only be a printing issue.
This is a day one G1 bug.
- backported by
-
JDK-8216212 Sum of eden before GC and current survivor capacity may be larger than heap size
-
- Resolved
-
- relates to
-
JDK-8077945 Incorrect or inaccurate logging for G1 GC
-
- Closed
-