Integrated: 8293989: [JVMCI] re-use cleared oop handles

Doug Simon dnsimon at openjdk.org
Tue Sep 20 07:58:07 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`.

This pull request has now been integrated.

Changeset: fe541f05
Author:    Doug Simon <dnsimon at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/fe541f05cc4092752d9d33ea41002fe907283655
Stats:     191 lines in 9 files changed: 89 ins; 62 del; 40 mod

8293989: [JVMCI] re-use cleared oop handles

Reviewed-by: never

-------------

PR: https://git.openjdk.org/jdk/pull/10337


More information about the hotspot-compiler-dev mailing list