Hi !
We are currently experiencing a problem on both JRE-1.5.0_15 and JRE-1.6.0_7. We have a JEE application running with EJB2 on JBoss 423 that we have migrated to EJB3 on JBoss5. The server is Windows 2003 SP2 server running in 32 bits mode (with /3GB option in boot.ini) is set up with 4GB memory and 4GB paging.
Before migration, this app runs perfectly on JBoss 423 compiled on JDK5 with runtime JRE5 and JRE6 (not at the same time though) up to 50 simulatneous users on a single JBoss instance.
After migration to EJB3, we are experiencing this error as of 5 simultaneous users :
# java.lang.OutOfMemoryError: requested 2292728 bytes for Chunk::new. Out of swap space?
Current thread (0x54092800): JavaThread "CompilerThread0" daemon [_thread_in_native, id=4092, stack(0x54280000,0x542d0000)]
Stack: [0x54280000,0x542d0000]
[error occurred during error reporting (printing stack bounds), id 0x80000001]
Current CompileTask:
C2:4692 com.mycompany.myproduct ...
These are our JVM options for memory:
jvm_args: -Dprogram.name=pdm.bat -Xms1024m -Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=256m -XX:+DisableExplicitGC
We don't have this problem if we force JVM options so that it only runs in interpreted mode (-Xint). We also have created a file with the list of methods we want to keep out of the JIT. With this option, the server runs longer but it eventualy crashes.
So we reckon this is a JIT issue on the App Server. I have posted a thread on JBoss forum but they recommended me to open one here.
So I have modified the JVM options to increase the Perm size :
jvm_args: -Dprogram.name=pdm.bat -Xms1024m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+Dis
ableExplicitGC
In that case, JBoss crashes at startup time :
#
# An unexpected error has been detected by Java Runtime Environment:
#
# java.lang.OutOfMemoryError: requested 35608 bytes for Chunk::new. Out of swap space?
#
# Internal Error (allocation.cpp:218), pid=5756, tid=8176
# Error: Chunk::new
#
# Java VM: Java HotSpot(TM) Server VM (10.0-b23 mixed mode windows-x86)
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x64142800): JavaThread "CompilerThread0" daemon [_thread_in_native, id=8176, stack(0x64330000,0x64380000)]
Stack: [0x64330000,0x64380000]
[error occurred during error reporting (printing stack bounds), id 0x80000001]
Current CompileTask:
C2:1420 ! org.jboss.ejb3.Ejb3Deployment.deployElement(Ljava/io/InputStream;Lorg/jboss/ejb3/Ejb3Ha
ndlerFactory;Ljavax/naming/InitialContext;)V (66 bytes)
Heap
PSYoungGen total 217472K, used 176224K [0x539d0000, 0x639d0000, 0x639d0000)
eden space 170432K, 97% used [0x539d0000,0x5dbec148,0x5e040000)
from space 47040K, 21% used [0x60be0000,0x615dc210,0x639d0000)
to space 44672K, 0% used [0x5e040000,0x5e040000,0x60be0000)
PSOldGen total 786432K, used 200494K [0x239d0000, 0x539d0000, 0x539d0000)
object space 786432K, 25% used [0x239d0000,0x2fd9b9b0,0x539d0000)
PSPermGen total 524288K, used 39978K [0x039d0000, 0x239d0000, 0x239d0000)
object space 524288K, 7% used [0x039d0000,0x060da870,0x239d0000)
So I have reduced heap size
jvm_args: -Dprogram.name=pdm.bat -Xms768m -Xmx768m -XX:PermSize=512m -XX:MaxPermSize=512m -XX:+Dis
ableExplicitGC
and then it works much longer (can reach 20 users ...) before, again, eventually crashing.
I have reported the error to http://java.sun.com/webapps/bugreport/crash.jsp but I haven't heard from it as yet ...
Any recommendation to fix this issue ? Many thanks in advance for your help !