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

Lazy creation of exception instances is not thread safe

    XMLWordPrintable

Details

    • b16
    • aarch64

    Description

      Test: vmTestbase/nsk/monitoring/stress/classload/unload011/TestDescription.java

      #
      # A fatal error has been detected by the Java Runtime Environment:
      #
      # Internal Error (/opt/mach5/mesos/work_dir/slaves/6bbe0543-8c5a-457e-b0ca-dfa2833be967-S4752/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/15aeade9-3d23-4be0-8903-78ee9270aeb0/runs/feb73051-30b4-4452-bc2f-4d5fde097eea/workspace/open/src/hotspot/share/runtime/jniHandles.inline.hpp:81), pid=3145336, tid=3145364
      # assert(external_guard || result != nullptr) failed: Invalid JNI handle
      #
      # JRE version: Java(TM) SE Runtime Environment (24.0+12) (fastdebug build 24-ea+12-1218)
      # Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 24-ea+12-1218, mixed mode, sharing, compressed class ptrs, z gc, linux-aarch64)
      # Problematic frame:
      # V [libjvm.so+0x7a486c] oop JNIHandles::resolve_impl<0ul, false>(_jobject*)+0x22c


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

      Current thread (0x0000ffffb028b8d0): JavaThread "C2 CompilerThread0" daemon [_thread_in_vm, id=3145364, stack(0x0000ffff94d91000,0x0000ffff94f8f000) (2040K)]


      Current CompileTask:
      C2:31024 541 jdk.internal.classfile.impl.SplitConstantPool::internalAdd (12 bytes)

      Stack: [0x0000ffff94d91000,0x0000ffff94f8f000], sp=0x0000ffff94f8a800, free space=2022k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x7a486c] oop JNIHandles::resolve_impl<0ul, false>(_jobject*)+0x22c (jniHandles.inline.hpp:81)
      V [libjvm.so+0x79d810] ciEnv::get_or_create_exception(_jobject*&, Symbol*)+0x9c (jniHandles.inline.hpp:94)
      V [libjvm.so+0x79db1c] ciEnv::ArrayStoreException_instance()+0x3c (ciEnv.cpp:417)
      V [libjvm.so+0xc384ac] GraphKit::builtin_throw(Deoptimization::DeoptReason)+0x4fc (graphKit.cpp:584)
      V [libjvm.so+0xc3a2e0] GraphKit::gen_checkcast(Node*, Node*, Node**)+0x720 (graphKit.cpp:3385)
      V [libjvm.so+0x1352750] Parse::array_store(BasicType)+0xf0 (parse2.cpp:85)
      V [libjvm.so+0x135ee48] Parse::do_one_bytecode()+0x28b8 (parse2.cpp:2124)
      V [libjvm.so+0x134b77c] Parse::do_one_block()+0x1ec (parse1.cpp:1587)
      V [libjvm.so+0x134cc0c] Parse::do_all_blocks()+0x13c (parse1.cpp:725)
      V [libjvm.so+0x13502f8] Parse::Parse(JVMState*, ciMethod*, float)+0x9d8 (parse1.cpp:629)
      V [libjvm.so+0x721724] ParseGenerator::generate(JVMState*)+0x174 (callGenerator.cpp:99)
      V [libjvm.so+0x725060] PredictedCallGenerator::generate(JVMState*)+0x370 (callGenerator.cpp:932)
      V [libjvm.so+0xa2b600] Parse::do_call()+0x280 (doCall.cpp:675)
      V [libjvm.so+0x135c90c] Parse::do_one_bytecode()+0x37c (parse2.cpp:2713)
      V [libjvm.so+0x134b77c] Parse::do_one_block()+0x1ec (parse1.cpp:1587)
      V [libjvm.so+0x134cc0c] Parse::do_all_blocks()+0x13c (parse1.cpp:725)
      V [libjvm.so+0x13502f8] Parse::Parse(JVMState*, ciMethod*, float)+0x9d8 (parse1.cpp:629)
      V [libjvm.so+0x721724] ParseGenerator::generate(JVMState*)+0x174 (callGenerator.cpp:99)
      V [libjvm.so+0x8c983c] Compile::Compile(ciEnv*, ciMethod*, int, Options, DirectiveSet*)+0x107c (compile.cpp:792)
      V [libjvm.so+0x71f4c0] C2Compiler::compile_method(ciEnv*, ciMethod*, int, bool, DirectiveSet*)+0x17c (c2compiler.cpp:142)
      V [libjvm.so+0x8d5ab4] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x864 (compileBroker.cpp:2303)
      V [libjvm.so+0x8d6664] CompileBroker::compiler_thread_loop()+0x514 (compileBroker.cpp:1961)
      V [libjvm.so+0xd37b60] JavaThread::thread_main_inner()+0xcc (javaThread.cpp:758)
      V [libjvm.so+0x15aea90] Thread::call_run()+0xac (thread.cpp:225)
      V [libjvm.so+0x13036d4] thread_native_entry(Thread*)+0x130 (os_linux.cpp:858)
      C [libpthread.so.0+0x7950] start_thread+0x190

      Attachments

        Issue Links

          Activity

            People

              thartmann Tobias Hartmann
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: