Parallel: Large allocations cause Full GC storm without heap expansion

XMLWordPrintable

    • gc
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      macOS Tahoe 26.2 (ARM64)
      java version:
      openjdk version "26-ea" 2026-03-17
      OpenJDK Runtime Environment (build 26-ea+31-2866)
      OpenJDK 64-Bit Server VM (build 26-ea+31-2866, mixed mode, sharing)

      A DESCRIPTION OF THE PROBLEM :
      When running a simple allocation loop with ParallelGC on JDK 26-ea+31 (macOS Tahoe 26.2, aarch64), the JVM intermittently enters a pathological state where it performs thousands of consecutive Full GCs due to Allocation Failure.

      The committed heap remains very small (~22MB) despite -Xmx4g, suggesting heap expansion ergonomics regression.

      The same test behaves normally on JDK 25.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      I use the following command to run the test cases:
      java "-Xlog:gc*:file=./ParallelCount26/parallel-26.log" -Xms8m -Xmx4g -XX:+UseParallelGC ParallelCount26.Test


      ---------- BEGIN SOURCE ----------
      package ParallelCount26;

      public class Test {
          protected volatile boolean[] field_7978;

          public Test() {
              this.field_7978 = new boolean[16];
              super();
          }

          public static void main(String[] var0) {

              (new Test()).test();
          }

          public void test() {
              this.field_7978 = new boolean[16];

              for(int var1 = 0; var1 < 2000; ++var1) {
                  byte[] b = new byte[16*1024*1024];
              }

          }
      }



      ---------- END SOURCE ----------

      FREQUENCY :
      OFTEN

            Assignee:
            Albert Yang
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: