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

[JVMCI] re-use cleared oop handles

XMLWordPrintable

    • b16

      It's possible for a libgraal isolate to live long enough that JVMCIRuntime::__oop_handles grows so much that it overflows when trying to expand. This results in a VM crash something like:

      # There is insufficient memory for the Java Runtime Environment to continue.
      # Native memory allocation (malloc) failed to allocate 18446744056529682432 bytes for AllocateHeap

      V [libjvm.so+0xe1f441] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x1a1
      V [libjvm.so+0xe2006d] VMError::report_and_die(Thread*, char const*, int, unsigned long, VMErrorType, char const*, __va_list_tag*)+0x2d
      V [libjvm.so+0x5d8ed3] report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*, ...)+0xc3
      V [libjvm.so+0x39f7c2] AllocateHeap(unsigned long, MEMFLAGS, AllocFailStrategy::AllocFailEnum)+0x92
      V [libjvm.so+0x8303f2] GrowableArrayWithAllocator<_jobject*, GrowableArray<_jobject*> >::grow(int)+0x112
      V [libjvm.so+0x995385] JVMCIRuntime::make_global(Handle const&)+0x105

      The solution is to re-use cleared (i.e. NULL) entries in JVMCIRuntime::__oop_handles.

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

              Created:
              Updated:
              Resolved: