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

Improve CompilerConfig ergonomics to fix a VM crash after JDK-8261229

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b11

      Description


      * Reproduce

      1. Build JVM without C2: bash configure --with-jvm-features=-compiler2; make images
      2. java -XX:-TieredCompilation -version


      * Symptom
      ```
         #
         # A fatal error has been detected by the Java Runtime Environment:
         #
         # Internal Error (/home/jvm/jdk/src/hotspot/share/compiler/compileBroker.cpp:1360), pid=22265, tid=22266
         # assert(comp != __null) failed: Ensure we have a compiler
         #
        

         Current thread (0x00007f6fa4024640): JavaThread "main" [_thread_in_vm, id=22266, stack(0x00007f6fabc7e000,0x00007f6fabd7f000)]
        
         Stack: [0x00007f6fabc7e000,0x00007f6fabd7f000], sp=0x00007f6fabd7a720, free space=1009k
         Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
         V [libjvm.so+0x44fb14] CompileBroker::compile_method(methodHandle const&, int, int, methodHandle const&, int, CompileTask::CompileReason, Thread*)+0xc4
         V [libjvm.so+0x4409eb] CompilationPolicy::compile(methodHandle const&, int, CompLevel, Thread*)+0x18b
         V [libjvm.so+0x442fde] CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, CompiledMethod*, Thread*)+0x3ce
         V [libjvm.so+0x315bbb] Runtime1::counter_overflow(JavaThread*, int, Method*)+0x20b
         v ~RuntimeStub::counter_overflow Runtime1 stub
         J 2 c1 java.lang.Object.<init>()V java.base (1 bytes) @ 0x00007f6f995eb803 [0x00007f6f995eb780+0x0000000000000083]
         j java.util.HashMap$Node.<init>(ILjava/lang/Object;Ljava/lang/Object;Ljava/util/HashMap$Node;)V+1 java.base
         j java.util.HashMap.newNode(ILjava/lang/Object;Ljava/lang/Object;Ljava/util/HashMap$Node;)Ljava/util/HashMap$Node;+9 java.base
         j java.util.HashMap.putVal(ILjava/lang/Object;Ljava/lang/Object;ZZ)Ljava/lang/Object;+56 java.base
         j java.util.HashMap.put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;+9 java.base
         j jdk.internal.module.ModuleHashes$Builder.hashForModule(Ljava/lang/String;[B)Ljdk/internal/module/ModuleHashes$Builder;+6 java.base
         j jdk.internal.module.SystemModules$default.moduleHashes()[Ljdk/internal/module/ModuleHashes;+7918 java.base
         j jdk.internal.module.SystemModuleFinders.of(Ljdk/internal/module/SystemModules;)Ljava/lang/module/ModuleFinder;+15 java.base
         j jdk.internal.module.ModuleBootstrap.boot2()Ljava/lang/ModuleLayer;+252 java.base
         j jdk.internal.module.ModuleBootstrap.boot()Ljava/lang/ModuleLayer;+64 java.base
         j java.lang.System.initPhase2(ZZ)I+0 java.base
         v ~StubRoutines::call_stub
         V [libjvm.so+0x743c7f] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x57f
         V [libjvm.so+0x745bbc] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x19c
         V [libjvm.so+0xf885e5] Threads::create_vm(JavaVMInitArgs*, bool*)+0x775
         V [libjvm.so+0x876749] JNI_CreateJavaVM+0x99
         C [libjli.so+0x3e1a] JavaMain+0x8a
         C [libjli.so+0x7769] ThreadJavaMain+0x9
      ```

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jiefu Jie Fu
              Reporter:
              jiefu Jie Fu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: