| I'm experiencing recurring Jenkins crashes due to memory allocations problems. I'm looking at the JVM Hotspot error file retrieved via Jenkins's Monitoring page, but I can't understand why the JVM crashed if the available memory was still MemAvailable: 3802204 kB. Can you please help me to understand what's wrong? Environment info:
Operating System: Red Hat Enterprise Linux Server release 7.6 (Maipo)
openjdk version "1.8.0_191"
OpenJDK Runtime Environment (build 1.8.0_191-b12)
OpenJDK 64-Bit Server VM (build 25.191-b12, mixed mode)
OS Memory info:
free -hm
total used free shared buff/cache available
Mem: 17G 7.4G 2.8G 572K 7.3G 9.5G
Swap: 4.0G 1.6G 2.4G
Start script:
export JAVA_ARGS='-Xms1024M -Xmx10144M -server -XX:+UseParallelGC -Djava.awt.headless=true -Djava.security.egd=file:/dev/./urandom -Dhttp.auth.preference="basic'
export JENKINS_HOME='/ec/local/jenkins/jenkinshome'
export HOME='/ec/local/jenkins'
java $JAVA_ARGS -jar /ec/local/jenkins/jenkins.war --httpPort=8080 1>/ec/local/jenkins/logs/jenkins.out 2>/ec/local/jenkins/logs/error.out &
Error message at the moment of the crash:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 12288 bytes for committing reserved memory.
...
...
--------------- S Y S T E M ---------------OS:Red Hat Enterprise Linux Server release 7.6 (Maipo)uname:Linux 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 15 17:36:42 UTC 2018 x86_64
libc:glibc 2.17 NPTL 2.17
rlimit: STACK 8192k, CORE 0k, NPROC 71512, NOFILE 4096, AS infinity
load average:11.30 9.65 9.05/proc/meminfo:
MemTotal: 18330356 kB
MemFree: 218688 kB
MemAvailable: 3802204 kB
Buffers: 18252 kB
Cached: 2799972 kB
SwapCached: 350564 kB
Active: 13681800 kB
Inactive: 2573284 kB
Active(anon): 12081396 kB
Inactive(anon): 1356280 kB
Active(file): 1600404 kB
Inactive(file): 1217004 kB
Unevictable: 0 kB
Mlocked: 0 kB
SwapTotal: 4194300 kB
|