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

[JVMCI] OutOfMemoryError thrown when attaching the libgraal isolate causes HotSpot to crash.

XMLWordPrintable

    • b13
    • Not verified

      If the libgraal isolate does not have enough heap memory available and its memory is exhausted, this can cause the entire virtual machine to crash.
      ...
      # Internal Error (jvmciRuntime.cpp:1121), pid=689738, tid=689776
      # fatal error: Fatal error in JVMCI shared library JavaVM[1] owned by JVMCI runtime 0
      ...
      Current thread (0x00007fc5e8022800): JavaThread "JVMCI-native CompilerThread1" daemon [_thread_in_native, id=689776, stack(0x00007fc6102e6000,0x00007fc6104e7000)]
      Current CompileTask:
      JVMCI-native: 9962 4257 4 java.util.RegularEnumSet::add (40 bytes)Stack: [0x00007fc6102e6000,0x00007fc6104e7000], sp=0x00007fc6104e52b0, free space=2044k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0xe28374] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x194
      V [libjvm.so+0x6722d4] report_fatal(VMErrorType, char const*, int, char const*, ...)+0x104
      V [libjvm.so+0x9c1230] _fatal()+0x70
      C [libjvmcicompiler.so+0x6a4443] FunctionPointerLogHandler_fatalError_45f632dec0d6a0795524f3a791e61bc3381552ca+0x53
      C [libjvmcicompiler.so+0x677b1d] CEntryPointSnippets_reportException_d215e35dd9567af49a7eb4aba62909cbef6f7862+0x3d
      C [libjvmcicompiler.so+0x62e812] IsolateEnterStub_JNIInvocationInterface_AttachCurrentThread_29883937914c419714881fd5ebb1b75dbb58d331_ac0376f5f1c4519caaa32ad8c4c7a6d7c1515b3c+0x122
      V [libjvm.so+0x9c47de] JVMCIRuntime::AttachCurrentThread(JavaThread*, void**, void*)+0xde
      V [libjvm.so+0x969810] JVMCIEnv::init_env_mode_runtime(JavaThread*, JNIEnv_*)+0x240
      V [libjvm.so+0x621e0d] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x108d
      V [libjvm.so+0x622378] CompileBroker::compiler_thread_loop()+0x3f8
      V [libjvm.so+0xdc2e4f] JavaThread::thread_main_inner()+0x10f
      V [libjvm.so+0xdbfb50] Thread::call_run()+0x140
      V [libjvm.so+0xc2aa76] thread_native_entry(Thread*)+0xf6
      ...

      A possible solution is to abort a compilation when the `AttachCurrentThread` fails with `JNI_ENOMEM`.

            tzezula Tomáš Zezula
            tzezula Tomáš Zezula
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: