Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8152724

Sum of Eden, survivor and old capacity may be larger than heap size

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u74, 9
    • Fix Version/s: tbd_major
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc

      Description

      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 + survivor capacity = 266 regions, which is more regionas than are available.

      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.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tschatzl Thomas Schatzl
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: