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

[TESTBUG] runtime/Unsafe/AllocateMemory.java fails with OOM during compilation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • b107

      AllocateMemory.java and ReallocateMemory.java limit the available memory to 100M. The tests fail with -Xcomp and -XX:-TieredCompilation because there is insufficient memory for the compiler:

      # There is insufficient memory for the Java Runtime Environment to continue.
      # Native memory allocation (malloc) failed to allocate 36288 bytes for Chunk::new

      Stack: [0x00007f0c9cf64000,0x00007f0c9d065000], sp=0x00007f0c9d05fc90, free space=1007k
      Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
      V [libjvm.so+0x13d4b85] VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x155;; VMError::report_and_die(int, char const*, char const*, __va_list_tag*, Thread*, unsigned char*, void*, void*, char const*, int, unsigned long)+0x155
      V [libjvm.so+0x13d58fb] VMError::report_and_die(Thread*, char const*, int, unsigned long, VMErrorType, char const*, __va_list_tag*)+0x2b;; VMError::report_and_die(Thread*, char const*, int, unsigned long, VMErrorType, char const*, __va_list_tag*)+0x2b
      V [libjvm.so+0x952438] report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*, ...)+0xd8;; report_vm_out_of_memory(char const*, int, unsigned long, VMErrorType, char const*, ...)+0xd8
      V [libjvm.so+0x555410] Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0x220;; Arena::grow(unsigned long, AllocFailStrategy::AllocFailEnum)+0x220
      V [libjvm.so+0xb470ce] PhaseCFG::global_code_motion()+0x141e;; PhaseCFG::global_code_motion()+0x141e
      V [libjvm.so+0xb48061] PhaseCFG::do_global_code_motion()+0x51;; PhaseCFG::do_global_code_motion()+0x51
      V [libjvm.so+0x8c5e4e] Compile::Code_Gen()+0x2ce;; Compile::Code_Gen()+0x2ce
      V [libjvm.so+0x8ca2ba] Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x145a;; Compile::Compile(ciEnv*, C2Compiler*, ciMethod*, int, bool, bool, bool, DirectiveSet*)+0x145a
      V [libjvm.so+0x72fa22] C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x2d2;; C2Compiler::compile_method(ciEnv*, ciMethod*, int, DirectiveSet*)+0x2d2
      V [libjvm.so+0x8d56b4] CompileBroker::invoke_compiler_on_method(CompileTask*)+0x554;; CompileBroker::invoke_compiler_on_method(CompileTask*)+0x554
      V [libjvm.so+0x8d6d28] CompileBroker::compiler_thread_loop()+0x458;; CompileBroker::compiler_thread_loop()+0x458
      V [libjvm.so+0x133ecc9] JavaThread::thread_main_inner()+0x1c9;; JavaThread::thread_main_inner()+0x1c9
      V [libjvm.so+0x133ef26] JavaThread::run()+0x1c6;; JavaThread::run()+0x1c6
      V [libjvm.so+0x10c6b52] java_start(Thread*)+0xd2;; java_start(Thread*)+0xd2
      C [libpthread.so.0+0x7851]

      This was already fixed by JDK-8071584 by increasing the available memory. Increasing it again from 100M to 120M seems to solve the problem.

            ctornqvi Christian Tornqvist
            thartmann Tobias Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: