Java crash on JDK 1.6 update 26 due to escape analysis bug
Environment
- Oracle JDK 1.6 update 26
Issue
- JVM crashes with the following in the fatal error log:
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 1117056 bytes for Chunk::new
# 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:317), pid=54852, tid=17888
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) 64-Bit Server VM (20.1-b02 mixed mode windows-amd64 compressed oops)
--------------- T H R E A D ---------------
Current thread (0x0000000006b8b800): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=17888, stack(0x0000000007e60000,0x0000000007f60000)]
Stack: [0x0000000007e60000,0x0000000007f60000]
Current CompileTask:
C2:1920272 9532 ! org.jboss.util.propertyeditor.PropertyEditors.mapJavaBeanProperties(Ljava/lang/Object;Ljava/util/Properties;Z)V (483 bytes)
Resolution
- Upgrade to JDK 1.6 update 45 or later. If that is not possible, add
-XX:-DoEscapeAnalysisto disable escape analysis (enabled by default starting JDK 1.6 update 23). - To disable the option update "run.conf.bat" with following setting.
set "JAVA_OPTS=%JAVA_OPTS% -XX:-DoEscapeAnalysis"
Root Cause
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.