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

Failure with the -XX:+AggressiveHeap flag set on some Linux kernels

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 10
    • hotspot
    • gc
    • generic
    • linux

      Setting the -XX:+Aggressiveheap flag can cause a failure of the JVM to start up due to insufficient memory. This can happen on Linux systems with 64k pages set. This failure was caught with the JTReg test: TestAggressiveHeap.java.

      A simple run of java with the -XX:+AggressiveHeap flag set is shown below:

      $ java -XX:+AggressiveHeap -Xlog:os+container=trace
      [0.001s][trace][os,container] OSContainer::init: Initializing Container Support
      [0.002s][trace][os,container] Path to /memory.limit_in_bytes is /sys/fs/cgroup/memory/memory.limit_in_bytes
      [0.002s][trace][os,container] Memory Limit is: 9223372036854710272
      [0.002s][trace][os,container] Path to /memory.limit_in_bytes is /sys/fs/cgroup/memory/memory.limit_in_bytes
      [0.002s][trace][os,container] Memory Limit is: 9223372036854710272
      [0.002s][trace][os,container] Path to /cpu.shares is /sys/fs/cgroup/cpu,cpuacct/cpu.shares
      [0.002s][trace][os,container] CPU Shares is: 1024
      [0.002s][trace][os,container] Path to /cpu.cfs_quota_us is /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us
      [0.002s][trace][os,container] CPU Quota is: -1
      [0.002s][trace][os,container] Path to /cpu.cfs_period_us is /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_period_us
      [0.002s][trace][os,container] CPU Period is: 100000
      [0.002s][trace][os,container] OSContainer::active_processor_count: 48
      [0.003s][trace][os,container] Path to /memory.limit_in_bytes is /sys/fs/cgroup/memory/memory.limit_in_bytes
      [0.003s][trace][os,container] Memory Limit is: 9223372036854710272
      [0.005s][trace][os,container] Path to /cpu.shares is /sys/fs/cgroup/cpu,cpuacct/cpu.shares
      [0.005s][trace][os,container] CPU Shares is: 1024
      [0.005s][trace][os,container] Path to /cpu.cfs_quota_us is /sys/fs/cgroup/cpu,cpuacct/cpu.cfs_quota_us
      [0.005s][trace][os,container] CPU Quota is: -1
      [0.005s][trace][os,container] CPU Period is: 100000
      [0.005s][trace][os,container] OSContainer::active_processor_count: 48
      Error occurred during initialization of VM
      Could not reserve enough space for 4503599627370496KB object heap

            dstewart Daniel Stewart
            dstewart Daniel Stewart
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: