RFR: 8293989: [JVMCI] re-use cleared oop handles
Tom Rodriguez
never at openjdk.org
Mon Sep 19 16:23:48 UTC 2022
On Mon, 19 Sep 2022 12:07:50 GMT, Doug Simon <dnsimon at openjdk.org> wrote:
> 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 implemented in this PR is to clear and re-use entries in `JVMCIRuntime::__oop_handles`.
Marked as reviewed by never (Reviewer).
-------------
PR: https://git.openjdk.org/jdk/pull/10337
More information about the hotspot-compiler-dev
mailing list