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

[JVMCI] replace use of vm_abort with vm_exit

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • 9
    • hotspot
    • b140

      Calling vm_abort from multiple threads can cause nasty crashes such as double free errors. We've seen this in Graal during JVMCI initialization when an unknown Graal option is encountered:

      mx benchmark specjvm2008:compress -- --jvm-config=graal-core --jvm=server -Dgraal.OptSomethingThatDoesNotExcist=false
      Running JVM with args: ['-server', '-XX:+EnableJVMCI', '-XX:+UseJVMCICompiler', '-Djvmci.Compiler=graal', '-version']
      java version "1.8.0_92"
      Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
      Java HotSpot(TM) 64-Bit Server VM (build 25.71-b01-internal-jvmci-0.20, mixed mode)
      Running JVM with args: ['-server', '-XX:+EnableJVMCI', '-XX:+UseJVMCICompiler', '-Djvmci.Compiler=graal', '-Dgraal.OptSomethingThatDoesNotExcist=false', '-jar', '/home/davidleopoldseder/Work/Benchmarks/SPECjvm2008/SPECjvm2008.jar', 'compress']
      Uncaught exception at /scratch/graaluser/buildslave/buildlog/ci_executor/main/graal-jvmci-8/src/share/vm/jvmci/jvmciCompiler.cpp:127
      java.lang.ExceptionInInitializerError
              at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime(HotSpotJVMCIRuntime.java:85)
              at jdk.vm.ci.runtime.JVMCI.initializeRuntime(Native Method)
              at jdk.vm.ci.runtime.JVMCI.<clinit>(JVMCI.java:58)
      Caused by: java.lang.IllegalArgumentException: Could not find option OptSomethingThatDoesNotExcist
              at com.oracle.graal.options.OptionsParser.parseOption(OptionsParser.java:134)
              at com.oracle.graal.options.OptionsParser.parseOptions(OptionsParser.java:62)
              at com.oracle.graal.hotspot.HotSpotGraalCompilerFactory.initializeOptions(HotSpotGraalCompilerFactory.java:156)
              at com.oracle.graal.hotspot.HotSpotGraalCompilerFactory.onSelection(HotSpotGraalCompilerFactory.java:86)
              at jdk.vm.ci.hotspot.HotSpotJVMCICompilerConfig.getCompilerFactory(HotSpotJVMCICompilerConfig.java:96)
              at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.<init>(HotSpotJVMCIRuntime.java:277)
              at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.<init>(HotSpotJVMCIRuntime.java:67)
              at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime$DelayedInit.<clinit>(HotSpotJVMCIRuntime.java:75)
              at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime(HotSpotJVMCIRuntime.java:85)
              at jdk.vm.ci.runtime.JVMCI.initializeRuntime(Native Method)
              at jdk.vm.ci.runtime.JVMCI.<clinit>(JVMCI.java:58)
      Uncaught exception at /scratch/graaluser/buildslave/buildlog/ci_executor/main/graal-jvmci-8/src/share/vm/jvmci/jvmciCompiler.cpp:127
      java.lang.NoClassDefFoundError: Could not initialize class jdk.vm.ci.runtime.JVMCI
      Uncaught exception at /scratch/graaluser/buildslave/buildlog/ci_executor/main/graal-jvmci-8/src/share/vm/jvmci/jvmciCompiler.cpp:127
      java.lang.NoClassDefFoundError: Could not initialize class jdk.vm.ci.runtime.JVMCI

      SPECjvm2008 Base
        Properties file: none
        Benchmarks: compress

        WARNING: Run will not be compliant.
        Not a compliant sequence of benchmarks for publication.

        Kit signature and checksum is validated.
        This can take several minutes.
        Use argument '-ikv' to skip this.
      *** Error in `/home/davidleopoldseder/Work/Source/labsjdk1.8.0_92-jvmci-0.20/bin/java': double free or corruption (!prev): 0x00000000013bc8b0 ***
        #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # SIGSEGV (0xb) at pc=0x00007fdec7fed13d, pid=18406, tid=0x00007fde926e6700
      #
      # JRE version: Java(TM) SE Runtime Environment (8.0_92-b14) (build 1.8.0_92-b14)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (25.71-b01-internal-jvmci-0.20 mixed mode linux-amd64 compressed oops)======= Backtrace: =========

      # Problematic frame:
      /lib64/libc.so.6(+0x7566b)[0x7fdec802966b]
      /lib64/libc.so.6(+0x7de0acl# C [libc.so.6+0x3913d]

            dnsimon Douglas Simon
            dnsimon Douglas Simon
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: