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

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • None
    • hotspot
    • None
    • gc
    • b15

      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.

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

              Created:
              Updated:
              Resolved: