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

Clarify meaning of OOM texts for out-of-metaspace errors

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 16
    • Fix Version/s: tbd
    • Component/s: hotspot
    • Labels:
      None

      Description

      We throw an OOM in metaspace in two cases:

      - when hitting CompressedClassSpaceSize (compressed-class-space-local reserve limit)
      - when hitting MaxMetaspaceSize (global commit limit)

      Text says "Out of Metaspace" resp. "Out of Compressed Class Space", depending on whether the allocation hitting the limit was from class space or not.

      This is imprecise on multiple levels.

      The exception text is a bit misleading: naive interpretation would be "we hit the allocation limit for either class space or non-class space". But this is not what is currently implemented, nor can it be implemented, since non-class space has no limit (MaxMetaspaceSize is a global limit and limits compressed class space too).

      We could change the behaviour such that the OOM text depends on which limit we did hit (regardless of the data type of the allocation). That would make more sense. But probably we should change the exception text too then, clearly stating the limit we hit.

      Alternatively we could just keep the exception text more vague.

      (This should be done after JEP387 hits mainline.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              stuefe Thomas Stuefe
              Reporter:
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: