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

[JVMCI] ensureLinked must be able to call Java

    XMLWordPrintable

Details

    • b23

    Description

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (systemDictionary.cpp:614), pid=55890, tid=55910
      # guarantee(THREAD->can_call_java()) failed: can not load classes with compiler thread: class=com/oracle/truffle/api/frame/FrameSlotTypeException, classloader=jdk/internal/loader/ClassLoaders$AppClassLoader
      #

      Stack: [0x00007f8db5027000,0x00007f8db5228000], sp=0x00007f8db5221a80, free space=2026k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xe71246] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, JavaThread*)+0x5e6 (systemDictionary.cpp:614)
      V [libjvm.so+0xe72aae] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, JavaThread*)+0x5e
      V [libjvm.so+0xf15bc6] VerificationType::resolve_and_check_assignability(InstanceKlass*, Symbol*, Symbol*, bool, bool, bool, JavaThread*)+0x2b6
      V [libjvm.so+0xf162d7] VerificationType::is_reference_assignable_from(VerificationType const&, ClassVerifier*, bool, JavaThread*) const+0x147
      V [libjvm.so+0xf2bdfc] StackMapFrame::pop_stack(VerificationType, JavaThread*)+0x9c
      V [libjvm.so+0xf25ab2] ClassVerifier::verify_method(methodHandle const&, JavaThread*)+0x1392
      V [libjvm.so+0xf2b37d] ClassVerifier::verify_class(JavaThread*)+0xed
      V [libjvm.so+0xf2b79f] Verifier::verify(InstanceKlass*, bool, JavaThread*)+0x31f
      V [libjvm.so+0x8c4c02] InstanceKlass::link_class_impl(JavaThread*)+0x432
      V [libjvm.so+0x9fa57b] c2v_ensureLinked(JNIEnv_*, _jobject*, _jobject*, long)+0x2eb
      C [libjvmcicompiler.so+0x18528d3] void jdk.vm.ci.hotspot.CompilerToVM::ensureLinked(jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl*, long)+0xc3
      C [libjvmcicompiler.so+0x18527de] void jdk.vm.ci.hotspot.CompilerToVM::ensureLinked(jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl*)+0x2e
      C [libjvmcicompiler.so+0x18b5416] void jdk.vm.ci.hotspot.HotSpotResolvedObjectTypeImpl::link()+0xa6
      C [libjvmcicompiler.so+0x78d8e2] jdk.vm.ci.meta.ResolvedJavaType* com.oracle.svm.graal.hotspot.libgraal.truffle.HSTruffleCompilerRuntime::resolveType(jdk.vm.ci.meta.MetaAccessProvider*, java.lang.String*, boolean)+0xc2
      C [libjvmcicompiler.so+0x16decde] jdk.graal.compiler.truffle.host.TruffleKnownHostTypes::TruffleKnownHostTypes(com.oracle.truffle.compiler.TruffleCompilerRuntime*, jdk.vm.ci.meta.MetaAccessProvider*)+0x6e
      C [libjvmcicompiler.so+0x79079a] com.oracle.svm.graal.hotspot.libgraal.truffle.LibGraalTruffleHostEnvironment* com.oracle.svm.core.code.FactoryMethodHolder::LibGraalTruffleHostEnvironment_constructor_292ceb0730867d730484287f2bd5cff3c9dce00f(com.oracle.truffle.compiler.TruffleCompilerRuntime*, jdk.vm.ci.meta.MetaAccessProvider*)+0x9a
      C [libjvmcicompiler.so+0x791365] jdk.graal.compiler.truffle.host.TruffleHostEnvironment* com.oracle.svm.graal.hotspot.libgraal.truffle.LibGraalTruffleHostEnvironmentLookup::lookup(jdk.vm.ci.meta.ResolvedJavaType*)+0x105

      As of JDK-8318694, only a few select C2V entry points in jvmciCompilerToVM.cpp can make Java calls. The ensureLinked method was not included but needs to be as it is called from a Truffle context executing on a Compiler thread as shown above.

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: