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

Committed > max memory usage when getting MemoryUsage

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 12
    • Component/s: hotspot
    • Subcomponent:
      gc
    • Resolved In Build:
      b10

      Description

      http://mail.openjdk.java.net/pipermail/serviceability-dev/2018-July/024409.html

      java.lang.IllegalArgumentException: committed = 542113792 should be <
      max = 536870912
      at java.lang.management.MemoryUsage.<init>(MemoryUsage.java:166)
      at sun.management.MemoryImpl.getMemoryUsage0(Native Method)
      at sun.management.MemoryImpl.getHeapMemoryUsage(MemoryImpl.java:71)
      at org.elasticsearch.indices.breaker.HierarchyCircuitBreakerService.currentMemoryUsage(HierarchyCircuitBreakerService.java:246)
      [...]

      The values reported in the exception message are:

      * "max": 536870912 = 512MB (exactly)
      * "committed": 542113792 = 517MB (exactly), i.e. 5MB more than "max".

      As the value of "max" is exactly what we have specified with -Xmx this indicates to me that the problem seems to be the calculation of "committed".

      As the value of "max" is exactly what we have specified with -Xmx it seems to
      indicate that the problem is the calculation of "committed". I do not
      understand under which conditions this can happen thus I post this to the
      mailing list in case anybody has ideas what might cause this.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tschatzl Thomas Schatzl
                Reporter:
                mchung Mandy Chung
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: