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

[Graal] Crash in DumpTimeSharedClassInfo::add_verification_constraint

XMLWordPrintable

    • b13

      runtime/cds/appcds tests started to crash with

      # SIGSEGV (0xb) at pc=0x00007fdc673a3df0, pid=18592, tid=18606
      #
      # JRE version: Java(TM) SE Runtime Environment (16.0) (fastdebug build 16-internal+0-2020-08-18-0010386.katya...)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 16-internal+0-2020-08-18-0010386.katya..., mixed mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x16e1df0] DumpTimeSharedClassInfo::add_verification_constraint(InstanceKlass*, Symbol*, Symbol*, bool, bool, bool)+0x20
      #

      --------------- S U M M A R Y ------------

      Command Line: -XX:+CreateCoredumpOnCrash -ea -esa -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal -XX:+TieredCompilation -XX:ArchiveClassesAtExit=/home/katya/work/JavaSE/Hotspot/ws/jdk.jdk/JTwork/scratch/0/appcds-17h31m59s488.jsa -Xshare:auto -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI -Xlog:class+load=debug,class+unload=info,cds+dynamic=info -Xbootclasspath/a:/home/katya/work/JavaSE/Hotspot/ws/jdk.jdk/JTwork/scratch/0/WhiteBox.jar BasicLambdaApp

      Host: olegbox, Intel(R) Xeon(R) CPU E5-2630 0 @ 2.30GHz, 24 cores, 15G, Ubuntu 16.04.6 LTS
      Time: Mon Aug 17 17:32:00 2020 PDT elapsed time: 0.775643 seconds (0d 0h 0m 0s)

      --------------- T H R E A D ---------------

      Current thread (0x00007fdc602b7870): JavaThread "JVMCI CompilerThread0" daemon [_thread_in_vm, id=18606, stack(0x00007fdc29823000,0x00007fdc29924000)]




      Current CompileTask:
      JVMCI: 775 193 4 java.lang.StringLatin1::equals (36 bytes)

      Stack: [0x00007fdc29823000,0x00007fdc29924000], sp=0x00007fdc2991d510, free space=1001k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x16e1df0] DumpTimeSharedClassInfo::add_verification_constraint(InstanceKlass*, Symbol*, Symbol*, bool, bool, bool)+0x20
      V [libjvm.so+0x16e2178] SystemDictionaryShared::add_verification_constraint(InstanceKlass*, Symbol*, Symbol*, bool, bool, bool)+0x68
      V [libjvm.so+0x17bc834] VerificationType::is_reference_assignable_from(VerificationType const&, ClassVerifier*, bool, Thread*) const+0x2b4
      V [libjvm.so+0x17c5455] ClassVerifier::verify_return_value(VerificationType, VerificationType, unsigned short, StackMapFrame*, Thread*)+0x55
      V [libjvm.so+0x17cc282] ClassVerifier::verify_method(methodHandle const&, Thread*)+0x1112
      V [libjvm.so+0x17cffad] ClassVerifier::verify_class(Thread*)+0x2fd
      V [libjvm.so+0x17d07bf] Verifier::verify(InstanceKlass*, bool, Thread*)+0x4af
      V [libjvm.so+0xd23db7] InstanceKlass::link_class_impl(Thread*)+0x457
      V [libjvm.so+0xf15b6b] get_class_declared_methods_helper(JNIEnv_*, _jclass*, unsigned char, bool, Klass*, Thread*) [clone .constprop.0]+0x21b
      V [libjvm.so+0xf172f2] JVM_GetClassDeclaredMethods+0xd2
      j java.lang.Class.getDeclaredMethods0(Z)[Ljava/lang/reflect/Method;+0 java.base@16-internal
      j java.lang.Class.privateGetDeclaredMethods(Z)[Ljava/lang/reflect/Method;+34 java.base@16-internal
      j java.lang.Class.getDeclaredPublicMethods(Ljava/lang/String;[Ljava/lang/Class;)Ljava/util/List;+2 java.base@16-internal
      j java.lang.System$2.getDeclaredPublicMethods(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/util/List;+3 java.base@16-internal
      j java.util.ServiceLoader.findStaticProviderMethod(Ljava/lang/Class;)Ljava/lang/reflect/Method;+12 java.base@16-internal
      j java.util.ServiceLoader.loadProvider(Ljdk/internal/module/ServicesCatalog$ServiceProvider;)Ljava/util/ServiceLoader$Provider;+241 java.base@16-internal
      j java.util.ServiceLoader$ModuleServicesLookupIterator.hasNext()Z+79 java.base@16-internal
      j java.util.ServiceLoader$2.hasNext()Z+4 java.base@16-internal
      j java.util.ServiceLoader$3.hasNext()Z+32 java.base@16-internal
      j org.graalvm.compiler.options.OptionKey$Lazy.<clinit>()V+10 jdk.internal.vm.compiler@16-internal
      v ~StubRoutines::call_stub
      V [libjvm.so+0xd622ca] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x62a
      V [libjvm.so+0xd233af] InstanceKlass::call_class_initializer(Thread*)+0x1bf
      V [libjvm.so+0xd248a7] InstanceKlass::initialize_impl(Thread*)+0x637
      V [libjvm.so+0x1190b9f] LinkResolver::resolve_static_call(CallInfo&, LinkInfo const&, bool, Thread*)+0xcf
      V [libjvm.so+0x1197b43] LinkResolver::resolve_invoke(CallInfo&, Handle, constantPoolHandle const&, int, Bytecodes::Code, Thread*)+0x183
      V [libjvm.so+0xd51636] InterpreterRuntime::resolve_invoke(JavaThread*, Bytecodes::Code)+0x1b6
      V [libjvm.so+0xd54122] InterpreterRuntime::resolve_from_cache(JavaThread*, Bytecodes::Code)+0x122
      j org.graalvm.compiler.options.OptionKey.checkDescriptorExists()Z+0 jdk.internal.vm.compiler@16-internal
      j org.graalvm.compiler.options.OptionKey.getValue(Lorg/graalvm/compiler/options/OptionValues;)Ljava/lang/Object;+7 jdk.internal.vm.compiler@16-internal
      j org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.initializeGraalCompilePolicyFields(Lorg/graalvm/compiler/options/OptionValues;)V+4 jdk.internal.vm.compiler@16-internal
      j org.graalvm.compiler.hotspot.HotSpotGraalCompilerFactory.onSelection()V+66 jdk.internal.vm.compiler@16-internal
      j jdk.vm.ci.hotspot.HotSpotJVMCICompilerConfig.getCompilerFactory()Ljdk/vm/ci/runtime/JVMCICompilerFactory;+282 jdk.internal.vm.ci@16-internal
      j jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.<init>()V+280 jdk.internal.vm.ci@16-internal
      j jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime()Ljdk/vm/ci/hotspot/HotSpotJVMCIRuntime;+31 jdk.internal.vm.ci@16-internal
      v ~StubRoutines::call_stub
      V [libjvm.so+0xd622ca] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x62a
      V [libjvm.so+0xd638a2] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x312
      V [libjvm.so+0xfa6f52] JVMCIEnv::call_HotSpotJVMCIRuntime_runtime(JVMCIEnv*)+0xf2
      V [libjvm.so+0x104007b] JVM_GetJVMCIRuntime+0x21b
      j jdk.vm.ci.runtime.JVMCI.initializeRuntime()Ljdk/vm/ci/runtime/JVMCIRuntime;+0 jdk.internal.vm.ci@16-internal
      j jdk.vm.ci.runtime.JVMCI.getRuntime()Ljdk/vm/ci/runtime/JVMCIRuntime;+35 jdk.internal.vm.ci@16-internal
      v ~StubRoutines::call_stub
      V [libjvm.so+0xd622ca] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x62a
      V [libjvm.so+0xd638a2] JavaCalls::call_static(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x312
      V [libjvm.so+0xfa72b2] JVMCIEnv::call_JVMCI_getRuntime(JVMCIEnv*)+0xf2
      V [libjvm.so+0x1042bd6] JVMCIRuntime::compile_method(JVMCIEnv*, JVMCICompiler*, methodHandle const&, int)+0x326
      V [libjvm.so+0x923eae] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x144e
      V [libjvm.so+0x924628] CompileBroker::compiler_thread_loop()+0x6c8
      V [libjvm.so+0x1736d2f] JavaThread::thread_main_inner()+0x22f
      V [libjvm.so+0x173c340] Thread::call_run()+0x100
      V [libjvm.so+0x1440266] thread_native_entry(Thread*)+0x116

      when running with Graal as JIT.



      To reproduce try to run for example runtime/cds/appcds/dynamicArchive/BasicLambdaTest.java

      > jtreg -va -jdk:build/linux-x64/images/jdk -vmoptions:"-XX:+CreateCoredumpOnCrash -ea -esa -server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Djvmci.Compiler=graal -XX:+TieredCompilation"
        -dir:open/test/hotspot/jtreg runtime/cds/appcds/dynamicArchive/BasicLambdaTest.java

      Note, it could take more than 1 iteration to reproduce.

            ccheung Calvin Cheung
            epavlova Ekaterina Pavlova
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: