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

Backout JDK-8034852: Shrinking of Metaspace high-water-mark causes incorrect OutOfMemoryErrors or back-to-back GCs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
      gc
    • Resolved In Build:
      b15

      Description

      The fix for JDK-8034852 added an assert:

      Internal Error (/opt/jprt/T/P1/080804.ehelin/s/src/share/vm/memory/metaspace.cpp:1436), pid=25676, tid=39
      assert(capacity_until_gc >= committed_bytes) failed: capacity_until_gc: 52428800 < committed_bytes: 52690944

      that fails for a lot of cases. The problem is in MetaspaceGC::allowed_expansion:
        // Always grant expansion if we are initiating the JVM,
        // or if the GC_locker is preventing GCs.
        if (!is_init_completed() || GC_locker::is_active_and_needs_gc()) {
          return left_until_max / BytesPerWord;
        }

      This will cause committed to grow beyond the HWM during initialization and when the GC_locker is active.

      The change JDK-8034852 should be backed out until this problem has been solved.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            ehelin Erik Helin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: