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

Sum of eden before GC and current survivor capacity may be larger than heap size

    XMLWordPrintable

Details

    • gc
    • b24

    Backports

      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 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.

        Attachments

          Issue Links

            Activity

              People

                tschatzl Thomas Schatzl
                tschatzl Thomas Schatzl
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: