0

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:

  1. How can I dump the dynamic libraries that the Java process is using?
  2. Is there any limit on the number of dynamic libraries that the JVM can control (similar to XMX)?
João Rebelo
  • 148
  • 9
  • ake a look at stack size. Maybe issue is related to the stack size in JVM. Note that each and every Thread has it's own stack: -Xss – Oo.oO Nov 11 '17 at 19:00
  • 1. Java process is not differnet in this sense from any other process. See https://stackoverflow.com/questions/5103443/how-to-check-what-shared-libraries-are-loaded-at-run-time-for-a-given-process – Alex Cohn Nov 12 '17 at 07:32
  • This issue seems related to the tuning suggested here: https://stackoverflow.com/questions/344203/maximum-number-of-threads-per-process-in-linux – João Rebelo Nov 13 '17 at 17:16

0 Answers0