JVM crash failing native memory allocation(malloc)
Issue
After increasing JVM heapsize from 1G to 2G, the JVM was crashed with following hs_err log.
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32744 bytes for ChunkPool::allocate
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:211), pid=2536, tid=38
#
# JRE version: Java(TM) SE Runtime Environment (7.0_80-b15) (build 1.7.0_80-b15)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.80-b11 mixed mode solaris-amd64 compressed oops)
# Core dump written. Default location: $EAP_HOME/domain/core or core.2536
#
...
OS: Oracle Solaris 10 1/13 s10x_u11wos_24a X86
uname:SunOS 5.10 Generic_Virtual i86pc
Memory: 4k page, physical 268299192k(246435252k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (24.80-b11) for solaris-amd64 JRE (1.7.0_80-b15), built on Apr 10 2015 11:47:02 by "" with Sun Studio 12u1
...
Native memory allocation (mmap) failed to mapin the fatal error log:
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 262144 bytes for committing reserved memory
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap.
...
# Out of Memory Error (os_solaris.cpp:2563), pid=8544, tid=0x0000000000004813
#
# JRE version: Java(TM) SE Runtime Environment (8.0_231-b11) (build 1.8.0_231-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.231-b11 mixed mode solaris-sparc compressed oops)
Out of swap space to map in thread stackin the fatal error log:
# There is insufficient memory for the Java Runtime Environment to continue.
# Out of swap space to map in thread stack.
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
...
#
# Out of Memory Error (os_solaris_sparc.cpp:570), pid=1129, tid=0x0000000000008488
#
# JRE version: Java(TM) SE Runtime Environment (8.0_231-b11) (build 1.8.0_231-b11)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.231-b11 mixed mode solaris-sparc compressed oops)
Environment
- OpenJDK
- Red Hat build of OpenJDK
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.