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

GC heap memory usage does not take into consideration overcommit_memory setting

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • 9
    • 9
    • hotspot
    • None
    • gc
    • linux

      I ran into the following failure on one of our linux-x64 systems while running runThese:

      Java HotSpot(TM) 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f6f32000000, 1409286144, 0) failed; error='Cannot allocate memory' (errno=12)
      #
      # There is insufficient memory for the Java Runtime Environment to continue.
      # Native memory allocation (mmap) failed to map 1409286144 bytes for committing reserved memory.
      # An error report file with more information is saved as:
      # /scratch/local/aurora/sandbox/results/runThese/hs_err_pid2277.log

      Stafan K and Ioi helped determine that the overcommit_memory setting seems to be the trigger. If a system has /proc/sys/vm/overcommit_memory set to 2, it means:

      "Setting to 2, means that processes can only allocate upto (RAM+swap) and will start getting allocation failure or OOM messages when it goes beyond that amount."

      On the failing system we have:

      $ cat /proc/sys/vm/overcommit_memory
      2

            Unassigned Unassigned
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: