JRockit Native OutOfMemory When Loading Class (Doc ID 1386938.1)

Last updated on OCTOBER 21, 2016

Applies to:

Oracle JRockit - Version R28 and later
Information in this document applies to any platform.

Symptoms


Environment description:

  1. WebLogic Server and OS: WebLogic Server 10.3 on Windows 2003R2 64 Bits. (+ patch 9884941 , see <<Note 1209624.1>>)
  2. Oracle JRockit(R) Version R28.1.5-20-146757-1.6.0_29-20111004-1748-windows-x86_64.
JVM options: -Xms2048m -Xmx2048m -XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnCtrlBreak -Xverbose:gc -Xverboselog:gclog/%SERVER_NAME%gc.log -Xverbosetimestamp

OutOfMemoryError occured many times in one hour after starting normally. Below is a example of weblogic server log entry:

####<2011-12-10 10:12:23’ CST> <Error> <HTTP> <tgb-18> <tgb1> <[STANDBY] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1323497675235> <BEA-101017> <[weblogic.servlet.internal.WebAppServletContext@124d9ade - appName: 'bea_wls_cluster_internal', name: 'bea_wls_cluster_internal.war', context-path: '/bea_wls_cluster_internal', spec-version: 'null'] Root cause of ServletException.
java.lang.OutOfMemoryError: class allocation, 24947976 loaded, 24M footprint in check_alloc (src/jvm/model/classload/classalloc.c:215) 268 bytes requested.
Java heap 2G reserved, 2G committed
Paged memory=8585239636K/23294392K.
Your Java heap size might be set too high.
Try to reduc
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at weblogic.cluster.ClusterService.checkRequest(ClusterService.java:428)



Try to decrease heap size to 1536M, and disable compressed reference by set option -XXcompressedRefs:enable=false. But the OutOfMemoryError is still occuring. Example of log entry as below:

####<2011-12-15 13:23:12 CST> <Warning> <DeploymentService> <tgb-18> <tgb1> <[ACTIVE] ExecuteThread: '40' for queue: 'weblogic.kernel.Default (self-tuning)'> <> <> <> <1323931224394> <BEA-290064> <Deployment service servlet encountered an Exception while handling the deployment service message for request id "-1" from server "AdminServer". Exception is: "java.lang.OutOfMemoryError: class allocation, 27270664 loaded, 19968K footprint in check_alloc (src/jvm/model/classload/classalloc.c:215) 268 bytes requested.
Java heap 1536M reserved, 1536M committed
Paged memory=8585719356K/23294392K.
Your Java heap size might be set too high.
Try
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
at sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator.java:381)
at sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator.java:377)
at sun.reflect.MethodAccessorGenerator.generateSerializationConstructor(MethodAccessorGenerator.java:95)
at sun.reflect.ReflectionFactory.newConstructorForSerialization(ReflectionFactory.java:313)
at java.io.ObjectStreamClass.getSerializableConstructor(ObjectStreamClass.java:1327)


Stack trace indicates OutOfMemoryError raised when JVM is loading class. All other OutOfMemoryError log entry are also show stack trace of class loading.

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms