2011년 10월 21일 금요일

[JVM] Out of memory while reading in symbol table of /opt/WebSphere/AppServer/java/bin/../jre/lib/PA_RISC2.0/server/libjvm.sl

32bit JDK에서 발생할 수 있는 문제로 HP-UX에서 유사한 문제 log를 확인할 수 있다.
HP-UX 및 Sun에서는 IBM JDK가 아닌 sun jdk를 사용하므로 이에 맞는 option을 설정할 수 있다.

우선적으로 확인해야할 사항은 -Xmx 설정이 1GB보다 크게 설정되어 있다면
1GB 이하로 설정하도록 권고한다.
32bit JVM에서 process에 할당할 수 있는 메모리는 한계가 있기 때문에
JVM Heap memory + native memory에 대해서 같이 고려하여 heap size를 할당해야 한다.
자세한 사항은 아래 2개의 link에서 확인바란다.

관련 LOG
Out of memory while reading in symbol table of /opt/WebSphere/AppServer/java/bin/../jre/lib/PA_RISC2.0/server/libjvm.sl
............... skip ..................




Technote (troubleshooting) 
  
Problem(Abstract) 
When the IBM® WebSphere® Application Server security component is enabled, a Java™ exception similar to the following occurs: 
Exception in thread "CompileThread0" java.lang.OutOfMemoryError: requested 536870920 bytes 
This exception appears in the stdout or stderr file of the Java Virtual Manager (JVM) process that encountered the problem. The number of bytes requested is typically large, meaning greater than 64 MB. 
The problem does not occur If security is disabled. 
  
Cause 
Possible causes 
Not enough swap space left 
Kernel parameter MAXDSIZ is very small.


Stack_Trace: error while unwinding stack 
( 0) 0xcb030988 vm_exit_out_of_memory__FiPCc + 0x1e0 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 1) 0xcafaa0d0 grow__5ArenaFUl + 0x90 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 2) 0xcafaa440 Arealloc__5ArenaFPvUlT2 + 0xf8 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 3) 0xcb2d1460 grow__10Node_ArrayFUi + 0x80 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 4) 0xcb29b05c build_loop_late__14PhaseIdealLoopFP4NodeR9VectorSetR9Node_ListPC14PhaseIdealLoop + 0x36c [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 5) 0xcb299264 __ct__14PhaseIdealLoopFR12PhaseIterGVNPC14PhaseIdealLoop_2 + 0x9f0 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 6) 0xcb23cd14 Optimize__7CompileFv + 0x43c [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 7) 0xcb2399dc __ct__7CompileFP5ciEnvP7ciScopeP8ciMethodibT5_2 + 0x6a0 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 8) 0xcb22122c compile_method__10C2CompilerFP5ciEnvP7ciScopeP8ciMethodib + 0xec [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
( 9) 0xcb18e190 invoke_compiler_on_method__13CompileBrokerSFP11CompileTask + 0x1f0 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
(10) 0xcb18dc98 compiler_thread_loop__13CompileBrokerSFv + 0x190 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
(11) 0xcb157250 compiler_thread_entry__FP10JavaThreadP6Thread + 0x20 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
(12) 0xcb15452c run__10JavaThreadFv + 0x3d4 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
(13) 0xcb0f59e0 _start__FPv + 0xe8 [/opt1/WebSphere/AppServer/java/jre/bin/../lib/PA_RISC2.0/server/libjvm.sl] 
(14) 0xc0699df0 __pthread_create_system + 0x420 [/usr/lib/libpthread.1] 
  

Resolving the problem 
Alternatives for resolving the problem 
1.Disable security. 
2.Disable the HotShot compiler. The command line argument for doing this is -Xint. 
3.Use the Just in Time (JIT) compiler instead of the HotSpot compiler. The command line argument to do this is -classic. 
4.Upgrade the Developer Kit to Java 2 SDK 1.3.1_08 or later. 
5.Use the Sun JSSE libraries instead of the IBM JSSE libraries.

Notes:
Raising the -Xmx setting will probably not resolve this problem.
Switching to -client mode will probably not address this problem.
This is very similar to SunBug 4724509 for the Sun JDK and might be the same problem on the HP developer kit.

Cross Reference information 
Segment Product Component Platform Version Edition 
Application Servers Runtimes for Java Technology Java SDK 



java.lang.OutOfMemoryError: requested 793020 bytes for Chunk::new. Out of swap space?


Out of memory while reading in symbol table of /apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl
( 0)  0xc8461230     [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl]
( 1)  0xc80a5fec     [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl]
( 2)  0xc7f00420     [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl]
( 3)  0xc7f00ca0     [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl]
( 4)  0xc8368d08     [/apps/bea/weblogic92/jdk1.5.0.18/opt/java1.5/jre/lib/PA_RISC2.0/server/libjvm.sl]
( 5)  0xc005b2e4   __pthread_body + 0×44  [/usr/lib/libpthread.1]
( 6)  0xc0065574   __pthread_start + 0×14  [/usr/lib/libpthread.1]
Java out of memory messages are marked with pid: 13828 in /var/adm/syslog/syslog.log.

Possible causes:
- not enough swap space left, or
- kernel parameter MAXDSIZ is very small.

Solution:
Although it appears that an OutOfMemoryError is thrown this apparent exception is reported by the HotSpot VM code when an allocation from the native heap failed and the native heap may be close to exhaustion. The message indicates the size (in bytes) of the request that failed and also indicates what the memory is required for. In some cases the reason will be shown but in most cases the reason will be the name of a source module reporting the allocation failure. If an OutOfMemoryError with this error is thrown it may require using utilities on the operating system to diagnose the issue further. Examples of issues that may not be related to the application are when the operating system is configured with insufficient swap space, or when there is another process on the system that is consuming all memory resources. If neither of these issues is the cause then it is possible that the application is failed due to native leak; for example, application or library code is continuously allocating memory but is not releasing it to the operating system.
For more information: http://java.sun.com/j2se/1.5/pdf/jdk50_ts_guide.pdf

The recommendation for swap space size in the Solaris is that swap should be configured about 30% of physical RAM.

The following link has suggested a workaround to add ‘-XX:+UseDefaultStackSize -Xss256K’ parameter.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4916142

Add: -XX:CodeCacheMinimumFreeSpace=2M -XX:+ReservedCodeCacheSize=64M -XX:PermSize=128m -XX:MaxPermSize=384m (As per your other JVM settings)

Sun team needs to be involved for this issue. Usually such issues are solved by sun support.

댓글 없음:

댓글 쓰기