United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6973402 C2 compiler requested 17179869200 bytes for Chunk::new, and ran out of swap space
6973402 : C2 compiler requested 17179869200 bytes for Chunk::new, and ran out of swap space

Details
Type:
Bug
Submit Date:
2010-07-30
Status:
Closed
Updated Date:
2011-06-28
Project Name:
JDK
Resolved Date:
2010-10-04
Component:
hotspot
OS:
windows_2003,solaris_10
Sub-Component:
compiler
CPU:
x86,sparc
Priority:
P2
Resolution:
Duplicate
Affected Versions:
6u18,6u19
Fixed Versions:

Related Reports
Duplicate:

Sub Tasks

Description
Java process running on 64-bit JRE 6 Update 18 failed with the following 
error message, after requesting 17179869200 bytes (= 16GB+16B) of memory.

# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 17179869200 bytes for Chunk::new. Out of swap space?
#
#  Internal Error (allocation.cpp:215), pid=4980, tid=1356
#  Error: Chunk::new
#
# JRE version: 6.0_18-b07
# Java VM: Java HotSpot(TM) 64-Bit Server VM (16.0-b13 mixed mode windows-amd64 )
Comment added by   ###@###.###  : 
The state of this bug is currently listed as "2-Incomplete, Need More Info". So here is information about how I am seeing this bug in production.

Following an upgrade from Java 1.5.0_06 to Java 1.6.0_20 (using the Server JVM in both instances), our production servers repeatedly crashed with this error.

Points of note:
* We're running Tomcat 5.5 on Windows 2000
* The compiler seems to be attempting to allocate 67M for the org.apache.velocity.runtime.directive.Foreach.render method
* There is plenty of free physical memory and address space (even though we're running 32-bit Windows)
* The heap size is nowhere near its configured maximum

Full details:

#
# A fatal error has been detected by the Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 67108872 bytes for Chunk::new. Out of swap space?
#
#  Internal Error (allocation.cpp:215), pid=4992, tid=3312
#  Error: Chunk::new
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Server VM (16.3-b01 mixed mode windows-x86 )
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

---------------  T H R E A D  ---------------

Current thread (0x5edb2c00):  JavaThread "CompilerThread0" daemon [_thread_in_native, id=3312, stack(0x5f0a0000,0x5f0e0000)]

Stack: [0x5f0a0000,0x5f0e0000],  sp=0x5f0de8fc,  free space=fa5f0de90ck
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x323f60]
V  [jvm.dll+0xff3dc]
V  [jvm.dll+0x3e35c]
V  [jvm.dll+0x3e5f3]
V  [jvm.dll+0x297649]
V  [jvm.dll+0x297c76]
V  [jvm.dll+0x299675]
V  [jvm.dll+0x298e8f]
V  [jvm.dll+0xde65d]
V  [jvm.dll+0xdf158]
V  [jvm.dll+0xa46b1]
V  [jvm.dll+0xe1359]
V  [jvm.dll+0xe1eef]
V  [jvm.dll+0x303d24]
V  [jvm.dll+0x27e2ac]
C  [MSVCR71.dll+0x9565]
C  [KERNEL32.dll+0xb3bc]


Current CompileTask:
C2:3889  !   org.apache.velocity.runtime.directive.Foreach.render(Lorg/apache/velocity/context/InternalContextAdapter;Ljava/io/Writer;Lorg/apache/velocity/runtime/parser/node/Node;)Z (529 bytes)


It would be useful to get some sort of response to this bug report - either an indication of what work is in progress to fix it, or an indication of what further information is required.

                                    

Comments
EVALUATION

Decoded call stack from provided additional information shows that it is duplicate of 6916062.

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V  [jvm.dll+0x323f60] ?report_and_die@VMError@@QAEXXZ+0x4c0
V  [jvm.dll+0xff3dc] ?report_vm_out_of_memory@@YAXPBDHI0@Z+0x3c
V  [jvm.dll+0x3e35c] ??2Chunk@@SAPAXII@Z+0x4c
V  [jvm.dll+0x3e5f3] ?grow@Arena@@IAEPAXI@Z+0x23
V  [jvm.dll+0x297649] ?grow@NodeHash@@QAEXXZ+0x59
V  [jvm.dll+0x297c76] ?hash_find_insert@NodeHash@@QAEPAVNode@@PAV2@@Z+0x126
V  [jvm.dll+0x299675] ?transform_old@PhaseIterGVN@@EAEPAVNode@@PAV2@@Z+0x105
V  [jvm.dll+0x298e8f] ?optimize@PhaseIterGVN@@QAEXXZ+0x7f
V  [jvm.dll+0xde65d] ?Optimize@Compile@@AAEXXZ+0x2dd
V  [jvm.dll+0xdf158] ??0Compile@@QAE@PAVciEnv@@PAVC2Compiler@@PAVciMethod@@H_N3@Z+0x728
V  [jvm.dll+0xa46b1] ?compile_method@C2Compiler@@UAEXPAVciEnv@@PAVciMethod@@H@Z+0x71
V  [jvm.dll+0xe1359] ?invoke_compiler_on_method@CompileBroker@@CAXPAVCompileTask@@@Z+0x259
V  [jvm.dll+0xe1eef] ?compiler_thread_loop@CompileBroker@@SAXXZ+0x2df
V  [jvm.dll+0x303d24] ?thread_main_inner@JavaThread@@QAEXXZ+0x34
V  [jvm.dll+0x27e2ac] ?park@Parker@@QAEX_N_J@Z+0x1cc
C [MSVCR71.dll+0x9565]
C [KERNEL32.dll+0xb3bc]
                                     
2010-10-04



Hardware and Software, Engineered to Work Together