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

Generational ZGC: The SoftMaxHeapSize might be wrong when CDS decreases the MaxHeapSize

XMLWordPrintable

    • gc
    • b17

        The bug is found by the next test if executed on the systems with some particular amount of memory:
         "runtime/cds/appcds/TestZGCWithCDS.java$ZGenerational"

        To reproduce run the test under the docker and set the memory limit, the test passed if limit=3000m and fail if limit=30000m

        docker run -m 30000m -v /home/ec2-user/path/:/path amazonlinux /bin/sh -c 'cd /path/ws/openjdk/jdk && /path/soft/jtreg/bin/jtreg -jdk:/path/ws/openjdk/jdk/build/linux-x86_64-server-release/images/jdk/ /path/ws/openjdk/jdk/test/hotspot/jtreg/runtime/cds/appcds/TestZGCWithCDS.java'


         stdout: [[0.098s][info][cds] Core region alignment: 4096
        ];
         stderr: [SoftMaxHeapSize must be less than or equal to the maximum heap size
        Error: Could not create the Java Virtual Machine.
        Error: A fatal exception has occurred. Program will exit.
        ]
         exitValue = 1

        java.lang.RuntimeException: 'Dumping shared data to file:' missing from stdout/stderr
                at jdk.test.lib.process.OutputAnalyzer.shouldContain(OutputAnalyzer.java:221)
                at TestZGCWithCDS.main(TestZGCWithCDS.java:67)
                at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
                at java.base/java.lang.reflect.Method.invoke(Method.java:580)
                at com.sun.javatest.regtest.agent.MainWrapper$MainTa

              stefank Stefan Karlsson
              serb Sergey Bylokhov
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: