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

Crash with large G1RSetSparseRegionEntries when using G1GC in JDK8

XMLWordPrintable

    • gc
    • generic
    • generic

      ADDITIONAL SYSTEM INFORMATION :
      >java -version
      java version "1.8.0_371"
      Java(TM) SE Runtime Environment (build 1.8.0_371-b11)
      Java HotSpot(TM) 64-Bit Server VM (build 25.371-b11, mixed mode)

      OS: windows 10

      A DESCRIPTION OF THE PROBLEM :
      JDK8 only crashes when using G1. And JDK11/JDK17 does not crash.

      On windows & linux, JVM crashed with

      # A fatal error has been detected by the Java Runtime Environment:
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005)

      when invoked with following options:
      java -XX:G1RSetSparseRegionEntries=40000 -Xms1024m -Xmx2048m -XX:+UseG1GC Case

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. copy the program Case.java

      public class Case {
          public static void main(String[] var0) {
              int len = 1000;
              for (int i = 0; i <= len; ++i) {
                  int[][][] array = new int[256][128][64];
              }
          }
      }
      2. run with following options:
      > jdk8u371\bin\java -XX:G1RSetSparseRegionEntries=40000 -Xms1024m -Xmx2048m -XX:+UseG1GC Case
      <crash>

      > jdk8u371\bin\java -XX:G1RSetSparseRegionEntries=40000 -Xms1024m -Xmx2048m -XX:+UseParallelGC Case
      <no output>

      > jdk-11.0.19\bin\java -XX:G1RSetSparseRegionEntries=40000 -Xms1024m -Xmx2048m -XX:+UseG1GC Case
      <no output>

      > jdk-17.0.7\bin\java -XX:G1RSetSparseRegionEntries=40000 -Xms1024m -Xmx2048m -XX:+UseG1GC Case
      <no output>


      ACTUAL -
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000742517c1, pid=11488, tid=0x0000000000008b90
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_371) (build 1.8.0_371-b11)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.371-b11 mixed mode windows-amd64 compressed oops)
      # Problematic frame:
      # [thread 34448 also had an error]
      [thread 31560 also had an error]
      [thread 27660 also had an error]
      [thread 43840 also had an error]
      [thread 41024 also had an error]
      [thread 47520 also had an error]
      [thread 29288 also had an error]
      [thread 42528 also had an error]
      [thread 47600 also had an error]
      [thread 45524 also had an error]
      V[thread 41440 also had an error]
      [thread 27460 also had an error]
        [jvm.dll+0x3e17c1]
      #
      # Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
      #
      # An error report file with more information is saved as:
      # D:\projects\Cases\target\classes\hs_err_pid11488.log
      #
      # If you would like to submit a bug report, please visit:
      # http://bugreport.java.com/bugreport/crash.jsp
      #


      ---------- BEGIN SOURCE ----------
      public class Case {
          public static void main(String[] var0) {
              int len = 1000;
              for (int i = 0; i <= len; ++i) {
                  int[][][] array = new int[256][128][64];
              }
          }
      }

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

      FREQUENCY : always


        1. hs_err_pid22152.log
          153 kB
          swati sharma
        2. Case.java
          0.2 kB
          swati sharma

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: