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

ZGC: Set explicit heap size for compiler/gcbarriers tests

    Details

    • Subcomponent:
      gc
    • Resolved In Build:
      b01

      Description

      On my large TR 3970X, jtreg asks for MaxRAMFraction=0, which makes ZGC use 128M heap for some tests. These tests reliably fail with OOM in jdk-updates/jdk11u-dev:
       compiler/gcbarriers/UnsafeIntrinsicsTest.java
       compiler/loopopts/TestRangeCheckPredicatesControl.java

      These tests are in tier1.

      They are not failing in jdk/jdk, possibly due to JDK-8234338 improvements. Since these ZGC improvements are not easily backportable, I think setting the explicit heap size for these tests in 11u is the way to resolve tier1 failures:

      diff -r ddbe957d9ff3 test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java
      --- a/test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java Mon May 25 11:05:23 2020 +0200
      +++ b/test/hotspot/jtreg/compiler/gcbarriers/UnsafeIntrinsicsTest.java Tue Aug 18 14:31:48 2020 +0200
      @@ -25,11 +25,11 @@
        * @test
        * @bug 8059022
        * @modules java.base/jdk.internal.misc:+open
        * @summary Validate barriers after Unsafe getObject, CAS and swap (GetAndSet)
        * @requires vm.gc.Z & !vm.graal.enabled
      - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+ZUnmapBadViews -XX:ZCollectionInterval=1 -XX:-CreateCoredumpOnCrash -XX:CompileCommand=dontinline,*::mergeImpl* compiler.gcbarriers.UnsafeIntrinsicsTest
      + * @run main/othervm -Xmx256m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+ZUnmapBadViews -XX:ZCollectionInterval=1 -XX:-CreateCoredumpOnCrash -XX:CompileCommand=dontinline,*::mergeImpl* compiler.gcbarriers.UnsafeIntrinsicsTest
        */
       
       package compiler.gcbarriers;
       
       import java.lang.reflect.Field;
      diff -r ddbe957d9ff3 test/hotspot/jtreg/compiler/loopopts/TestRangeCheckPredicatesControl.java
      --- a/test/hotspot/jtreg/compiler/loopopts/TestRangeCheckPredicatesControl.java Mon May 25 11:05:23 2020 +0200
      +++ b/test/hotspot/jtreg/compiler/loopopts/TestRangeCheckPredicatesControl.java Tue Aug 18 14:31:48 2020 +0200
      @@ -25,12 +25,12 @@
        * @test
        * @requires vm.gc.Z & !vm.graal.enabled
        * @bug 8237859
        * @summary A LoadP node has a wrong control input (too early) which results in an out-of-bounds read of an object array with ZGC.
        *
      - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseZGC compiler.loopopts.TestRangeCheckPredicatesControl
      - * @run main/othervm -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM compiler.loopopts.TestRangeCheckPredicatesControl
      + * @run main/othervm -Xmx256m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC compiler.loopopts.TestRangeCheckPredicatesControl
      + * @run main/othervm -Xmx256m -XX:+UnlockExperimentalVMOptions -XX:+UseZGC -XX:+UnlockDiagnosticVMOptions -XX:+StressGCM compiler.loopopts.TestRangeCheckPredicatesControl
        */
       
       package compiler.loopopts;
       

        Attachments

          Activity

            People

            • Assignee:
              shade Aleksey Shipilev
              Reporter:
              shade Aleksey Shipilev
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: