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

VM crash when add option '-XX:G1UpdateBufferSize=512M'

    XMLWordPrintable

Details

    • gc

    Description

      ADDITIONAL SYSTEM INFORMATION :
      java -version

      java version "11.0.18" 2023-01-17 LTS
      Java(TM) SE Runtime Environment 18.9 (build 11.0.18+9-LTS-195)
      Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.18+9-LTS-195, mixed mode)
      ========
      OS

      version Windows 11 22621.1265



      A DESCRIPTION OF THE PROBLEM :
      When I was testing the performance of my program, I found a problem by accident. And then I reduce the program to reproduce this problem. I found that the JVM crashed only after '-XX:G1UpdateBufferSize=512M' was added. Hopefully that's enough to help you pinpoint the problem.

      Attached files:
      https://drive.google.com/drive/folders/1QFyNAwExwvHxWCwu1cE0a5CFlDkXcTQm?usp=sharing

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Step1.
      Download the testcase from https://drive.google.com/drive/folders/1QFyNAwExwvHxWCwu1cE0a5CFlDkXcTQm?usp=sharing.

      import jdk.test.lib.process.ProcessTools;
      import sun.hotspot.WhiteBox;

      public class Test {
          public Test() {
          }

          public static void main(String[] var0) throws Exception {
              for(int var2 = 0; var2 < 2; ++var2) {
                  WhiteBox var10000 = WhiteBox.getWhiteBox();
                  var10000.youngGC();
                  var10000.fullGC();
                  ProcessBuilder var1 = ProcessTools.createJavaProcessBuilder(new String[]{"-version"});
              }

          }
      }

      Step2.
      Run the program with command line:

      java -XX:+UseG1GC -XX:G1UpdateBufferSize=512M -Xbootclasspath/a:.\wb.jar -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -XX:+UnlockExperimentalVMOptions -Dtest.jdk=D:\jdk\jdk11.0.18_hotspot Test

      Step3.
      Get the output

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffaa63e7b3, pid=28572, tid=10536
      #
      # JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.18+9) (build 11.0.18+9-LTS-195)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.18+9-LTS-195, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
      # Problematic frame:
      # V [jvm.dll+0x31e7b3]
      #
      # No core dump will be written. Minidumps are not enabled by default on client versions of Windows
      #
      Unsupported internal testing APIs have been used.

      # An error report file with more information is saved as:
      # C:\Users\me\hs_err_pid28572.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #

      ACTUAL -
      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00007fffaa63e7b3, pid=28572, tid=10536
      #
      # JRE version: Java(TM) SE Runtime Environment 18.9 (11.0.18+9) (build 11.0.18+9-LTS-195)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM 18.9 (11.0.18+9-LTS-195, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)
      # Problematic frame:
      # V [jvm.dll+0x31e7b3]
      #
      # No core dump will be written. Minidumps are not enabled by default on client versions of Windows
      #
      Unsupported internal testing APIs have been used.

      # An error report file with more information is saved as:
      # C:\Users\me\hs_err_pid28572.log
      #
      # If you would like to submit a bug report, please visit:
      # https://bugreport.java.com/bugreport/crash.jsp
      #


      ---------- BEGIN SOURCE ----------
      import jdk.test.lib.process.ProcessTools;
      import sun.hotspot.WhiteBox;

      public class Test {
          public Test() {
          }

          public static void main(String[] var0) throws Exception {
              for(int var2 = 0; var2 < 2; ++var2) {
                  WhiteBox var10000 = WhiteBox.getWhiteBox();
                  var10000.youngGC();
                  var10000.fullGC();
                  ProcessBuilder var1 = ProcessTools.createJavaProcessBuilder(new String[]{"-version"});
              }

          }
      }
      ---------- END SOURCE ----------

      Attachments

        1. backport.diff
          2 kB
        2. JDK11_hs_err_pid1216.log
          30 kB
        3. JDK8_hs_err_pid20288.log
          52 kB
        4. Test.java
          0.5 kB

        Issue Links

          Activity

            People

              jianyesun Jianye Sun
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated: