My process is running C++ calls to Java by JNI running at a Suse. After some days working I'm having a memory issue regarding the JVM:
There is insufficient memory for the Java Runtime Environment to continue.
Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.
With the following trace:
V [libjvm.so+0xaba71a] VMError::report_and_die()+0x2ba
V [libjvm.so+0x4f9ecb] report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*)+0x8b
V [libjvm.so+0x91b553] os::Linux::commit_memory_impl(char*, unsigned long, bool)+0x103
V [libjvm.so+0x91b61c] os::pd_commit_memory(char*, unsigned long, bool)+0xc
V [libjvm.so+0x9150da] os::commit_memory(char*, unsigned long, bool)+0x2a
V [libjvm.so+0x9197ef] os::pd_create_stack_guard_pages(char*, unsigned long)+0x7f
V [libjvm.so+0xa603ce] JavaThread::create_stack_guard_pages()+0x5e
V [libjvm.so+0x6cd4e4] attach_current_thread+0xb4
The machine has plenty of memory (a few Terabytes) so its quite impossible that this is caused by a normal machine going out of memory and not being able to grow the reserved java heap.
By seeing the remaining of the report I can see that I have 65535 entries for dynamic libraries like this:
7326707ff000-732670801000 ---p 00000000 00:00 0
732670801000-732671000000 rwxp 00000000 00:00 0
732671000000-73269d400000 rw-p 00000000 00:00 0
73269d5ff000-73269d602000 ---p 00000000 00:00 0
My questions:
- How can I dump the dynamic libraries that the Java process is using?
- Is there any limit on the number of dynamic libraries that the JVM can control (similar to XMX)?