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

assert(!_thread->is_pending_jni_exception_check()) failed: Pending JNI Exception Check during class loading

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 15
    • 15
    • hotspot
    • svc
    • b25

      Exposed by test: serviceability/jvmti/HiddenClass/P/Q/HiddenClassSigTest.java

      running with -Xcheck:jni (which is a new occurrence)

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/805146e6-8fdb-4552-bf9e-385b73cf7129-S450/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/b0a6fd2c-a6ea-4307-81c3-d6abe0d03472/runs/61e5f951-4ad9-431b-a4b8-51a191ce7114/workspace/open/src/hotspot/share/runtime/interfaceSupport.inline.hpp:233), pid=30474, tid=30495
      # assert(!_thread->is_pending_jni_exception_check()) failed: Pending JNI Exception Check
      #
      # JRE version: Java(TM) SE Runtime Environment (15.0+22) (fastdebug build 15-ea+22-1041)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 15-ea+22-1041, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-amd64)
      # Problematic frame:
      # V [libjvm.so+0x88b7a0] ThreadToNativeFromVM::~ThreadToNativeFromVM()+0x180
      #

      Current thread (0x00007f1cb85a5800): JavaThread "MainThread" [_thread_in_vm, id=30495, stack(0x00007f1c89cfc000,0x00007f1c89dfd000)]

      Stack: [0x00007f1c89cfc000,0x00007f1c89dfd000], sp=0x00007f1c89df9d10, free space=1015k
      Native frames: (J=compiled Java code, A=aot compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x88b7a0] ThreadToNativeFromVM::~ThreadToNativeFromVM()+0x180
      V [libjvm.so+0x106f217] JvmtiExport::post_class_load(JavaThread*, Klass*)+0x297
      V [libjvm.so+0x163d8cd] SystemDictionary::define_instance_class(InstanceKlass*, Thread*)+0x48d
      V [libjvm.so+0x163dcc0] SystemDictionary::find_or_define_instance_class(Symbol*, Handle, InstanceKlass*, Thread*)+0x220
      V [libjvm.so+0x163e3a7] SystemDictionary::resolve_from_stream(Symbol*, Handle, Handle, ClassFileStream*, Thread*)+0x177
      V [libjvm.so+0xe7ed94] jvm_define_class_common(JNIEnv_*, char const*, _jobject*, signed char const*, int, _jobject*, char const*, Thread*) [clone .constprop.0]+0x2f4
      V [libjvm.so+0xe7f189] JVM_DefineClassWithSource+0xd9
      C [libjava.so+0xd4d2] Java_java_lang_ClassLoader_defineClass1+0x182
      j java.lang.ClassLoader.defineClass1(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;+0 java.base@15-ea
      j java.lang.ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;+27 java.base@15-ea
      j java.security.SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;+12 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.defineClass(Ljava/lang/String;Ljdk/internal/loader/Resource;)Ljava/lang/Class;+117 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Ljava/lang/String;)Ljava/lang/Class;+37 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Ljava/lang/String;Z)Ljava/lang/Class;+111 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+3 java.base@15-ea
      j jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+36 java.base@15-ea
      j java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3 java.base@15-ea
      v ~StubRoutines::call_stub
      V [libjvm.so+0xce029c] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x6ac
      V [libjvm.so+0xce09db] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x4db
      V [libjvm.so+0xce0ff8] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Handle, Thread*)+0xf8
      V [libjvm.so+0x1640aac] SystemDictionary::load_instance_class(Symbol*, Handle, Thread*)+0x19c
      V [libjvm.so+0x163f0c2] SystemDictionary::resolve_instance_class_or_null(Symbol*, Handle, Handle, Thread*)+0xa02
      V [libjvm.so+0x163f415] SystemDictionary::resolve_instance_class_or_null_helper(Symbol*, Handle, Handle, Thread*)+0x45
      V [libjvm.so+0x16416b7] SystemDictionary::resolve_or_fail(Symbol*, Handle, Handle, bool, Thread*)+0x27
      V [libjvm.so+0xe79d52] find_class_from_class_loader(JNIEnv_*, Symbol*, unsigned char, Handle, Handle, unsigned char, Thread*)+0x32
      V [libjvm.so+0xe7e706] JVM_FindClassFromCaller+0x1f6
      C [libjava.so+0xd0e7] Java_java_lang_Class_forName0+0xd7
      j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;Ljava/lang/Class;)Ljava/lang/Class;+0 java.base@15-ea
      j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+43 java.base@15-ea
      j com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V+120
      j java.lang.Thread.run()V+11 java.base@15-ea
      v ~StubRoutines::call_stub
      V [libjvm.so+0xce029c] JavaCalls::call_helper(JavaValue*, methodHandle const&, JavaCallArguments*, Thread*)+0x6ac
      V [libjvm.so+0xce09db] JavaCalls::call_virtual(JavaValue*, Klass*, Symbol*, Symbol*, JavaCallArguments*, Thread*)+0x4db
      V [libjvm.so+0xce0e8e] JavaCalls::call_virtual(JavaValue*, Handle, Klass*, Symbol*, Symbol*, Thread*)+0xbe
      V [libjvm.so+0xe5963e] thread_entry(JavaThread*, Thread*)+0x12e
      V [libjvm.so+0x16a1de6] JavaThread::thread_main_inner()+0x226
      V [libjvm.so+0x16a7c80] Thread::call_run()+0x100
      V [libjvm.so+0x13acc16] thread_native_entry(Thread*)+0x116

      Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
      j java.lang.ClassLoader.defineClass1(Ljava/lang/ClassLoader;Ljava/lang/String;[BIILjava/security/ProtectionDomain;Ljava/lang/String;)Ljava/lang/Class;+0 java.base@15-ea
      j java.lang.ClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/ProtectionDomain;)Ljava/lang/Class;+27 java.base@15-ea
      j java.security.SecureClassLoader.defineClass(Ljava/lang/String;[BIILjava/security/CodeSource;)Ljava/lang/Class;+12 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.defineClass(Ljava/lang/String;Ljdk/internal/loader/Resource;)Ljava/lang/Class;+117 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Ljava/lang/String;)Ljava/lang/Class;+37 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Ljava/lang/String;Z)Ljava/lang/Class;+111 java.base@15-ea
      j jdk.internal.loader.BuiltinClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+3 java.base@15-ea
      j jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+36 java.base@15-ea
      j java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3 java.base@15-ea
      v ~StubRoutines::call_stub
      j java.lang.Class.forName0(Ljava/lang/String;ZLjava/lang/ClassLoader;Ljava/lang/Class;)Ljava/lang/Class;+0 java.base@15-ea
      j java.lang.Class.forName(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;+43 java.base@15-ea
      j com.sun.javatest.regtest.agent.MainWrapper$MainThread.run()V+120
      j java.lang.Thread.run()V+11 java.base@15-ea
      v ~StubRoutines::call_stub

        There are no Sub-Tasks for this issue.

            sspitsyn Serguei Spitsyn
            dholmes David Holmes
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: