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

resexhausted003 fails with assert(!thread->owns_locks()) failed: must release all locks when leaving VM

XMLWordPrintable

    • b27

      In Method::build_profiling_method_data() we lock MethodData_lock and then try to allocate from metaspace.

      This triggers the assertion `assert(!thread->owns_locks()) failed: must release all locks when leaving VM` at the following location:

      Current thread (0x00007fff9035b7f0): JavaThread "MainThread" [_thread_in_vm, id=12008, stack(0x00007fff65130000,0x00007fff65330000)]

      Stack: [0x00007fff65130000,0x00007fff65330000], sp=0x00007fff6532c0c0, free space=2032k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x1274648] JvmtiJavaThreadEventTransition::JvmtiJavaThreadEventTransition(JavaThread*)+0xa8 (interfaceSupport.inline.hpp:187)
      V [libjvm.so+0x126d9bc] JvmtiExport::post_resource_exhausted(int, char const*)+0x13c (jvmtiExport.cpp:1760)
      V [libjvm.so+0x14ab72c] Metaspace::report_metadata_oome(ClassLoaderData*, unsigned long, MetaspaceObj::Type, Metaspace::MetadataType, JavaThread*)+0x76c (metaspace.cpp:972)
      V [libjvm.so+0x14abd08] Metaspace::allocate(ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x1f8 (metaspace.cpp:922)
      V [libjvm.so+0x491a10] MetaspaceObj::operator new(unsigned long, ClassLoaderData*, unsigned long, MetaspaceObj::Type, JavaThread*)+0x30 (allocation.cpp:83)
      V [libjvm.so+0x14f3b34] MethodData::allocate(ClassLoaderData*, methodHandle const&, JavaThread*)+0x54 (methodData.cpp:664)
      V [libjvm.so+0x14d1a18] Method::build_profiling_method_data(methodHandle const&, JavaThread*)+0x168 (method.cpp:598)
      V [libjvm.so+0x9682f0] CompilationPolicy::create_mdo(methodHandle const&, JavaThread*)+0x2a0 (compilationPolicy.cpp:967)
      V [libjvm.so+0x96a674] CompilationPolicy::event(methodHandle const&, methodHandle const&, int, int, CompLevel, CompiledMethod*, JavaThread*)+0x9e4 (compilationPolicy.cpp:1145)
      V [libjvm.so+0xf4fb38] InterpreterRuntime::frequency_counter_overflow_inner(JavaThread*, unsigned char*)+0x1a8 (interpreterRuntime.cpp:1038)
      V [libjvm.so+0xf4fc84] InterpreterRuntime::frequency_counter_overflow(JavaThread*, unsigned char*)+0x34 (interpreterRuntime.cpp:987)


      VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
      [0x00007fff900409e0] MethodData_lock - owner thread: 0x00007fff9035b7f0

            thartmann Tobias Hartmann
            rrich Richard Reingruber
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: