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

StressWrapper_suspendthrd003.java fails with Native memory allocation (mmap) failed to map 16384 bytes. Error detail: committing reserved memory

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      I use a special wrapper, StressWrapper_suspendthrd003.java, to
      execute the vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003.java
      test with specific options for a specific time slice (6646 seconds):

      $ cat test/hotspot/jtreg/StressWrapper_suspendthrd003.java
      /*
       * @test
       *
       * @requires vm.jvmti
       * @library /vmTestbase
       * /test/lib
       * @compile/timeout=270 vmTestbase/nsk/jvmti/SuspendThread/suspendthrd003.java
       * @run main/othervm/native/timeout=6946
       * -XX:+HeapDumpOnOutOfMemoryError
       * -Xmx128m
       * -agentlib:suspendthrd003=-waittime=5
       * nsk.jvmti.SuspendThread.suspendthrd003 6646
       */

      Twice in the JDK22 project, this test has failed during a stress run.

      Here are my notes:

      # jdk-22+28_2_linux-x64 - observed in jdk-22+28 testing on 2023.12.16 on
      # linux-x64 in fastdebug config:
      # - # There is insufficient memory for the Java Runtime Environment to continue.
      # # Native memory allocation (mmap) failed to map 16384 bytes. Error detail: committing reserved memory.
      # - /proc/meminfo:
      # MemTotal: 131940948 kB
      # MemFree: 37676596 kB
      # MemAvailable: 78794604 kB
      # - Memory info from bottom of the hs_err_pid file:
      # Memory: 4k page, physical 131940948k(78785524k free), swap 1953513468k(1953505276k free)
      # - The stack trace shows we're trying to create stack guard pages:
      # V [libjvm.so+0x14a2801] os::pd_commit_memory(char*, unsigned long, bool)+0xb1
      # V [libjvm.so+0x1498ea8] os::commit_memory(char*, unsigned long, bool)+0x38
      # V [libjvm.so+0x165a7c7] StackOverflow::create_stack_guard_pages()+0x67
      # V [libjvm.so+0xec0102] JavaThread::run()+0x22
      # V [libjvm.so+0x179c476] Thread::call_run()+0xb6
      # V [libjvm.so+0x14a69a7] thread_native_entry(Thread*)+0x127


      # jdk-22+35_1_linux-x64 - observed in jdk-22+35 testing on 2024.02.09 on
      # linux-x64 in fastdebug config:
      # - # There is insufficient memory for the Java Runtime Environment to continue.
      # # Native memory allocation (mmap) failed to map 16384 bytes. Error detail: committing reserved memory.
      # - /proc/meminfo:
      # MemTotal: 131940952 kB
      # MemFree: 30557576 kB
      # MemAvailable: 79969308 kB
      # - Memory info from bottom of the hs_err_pid file:
      # Memory: 4k page, physical 131940952k(79929552k free), swap 1953513468k(1953507056k free)
      # - The stack trace shows we're trying to create stack guard pages:
      # V [libjvm.so+0x14a70c1] os::pd_commit_memory(char*, unsigned long, bool)+0xb1
      # V [libjvm.so+0x149d768] os::commit_memory(char*, unsigned long, bool)+0x38
      # V [libjvm.so+0x165f227] StackOverflow::create_stack_guard_pages()+0x67
      # V [libjvm.so+0xec23c2] JavaThread::run()+0x22

            dcubed Daniel Daugherty
            dcubed Daniel Daugherty
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: