问题
I got this error on trying to get the Java search process UP(start a java process). I am setting the address space using the RLIMIT_AS
.
Please help me to get past this error.
I have doubts about the VM Arguements. (See below). Is there any way to get past this issue without changing the configurations. (VM Arguements)
A fatal error has been detected by the Java Runtime Environment:
java.lang.OutOfMemoryError: requested 16 bytes for CHeapObj-new. Out of swap space?
Internal Error (allocation.inline.hpp:39), pid=16994, tid=1097390400 Error: CHeapObj-new
JRE version: 6.0_21-b06 Java VM: Java HotSpot(TM) 64-Bit Server VM (17.0-b16 mixed mode linux-amd64 ) 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 (0x00000000489a7800): JavaThread "main" [_thread_in_vm, id=17043, stack(0x000000004158d000,0x000000004168e000)]
Stack: [0x000000004158d000,0x000000004168e000], sp=0x00000000416897f0, free space=3f10000000000000018k
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap PSYoungGen total 38208K, used 24989K [0x00002aaae8f80000, 0x00002aaaeba20000, 0x00002aab03a20000) eden space 32768K, 76% used [0x00002aaae8f80000,0x00002aaaea7e7518,0x00002aaaeaf80000) from space 5440K, 0% used [0x00002aaaeb4d0000,0x00002aaaeb4d0000,0x00002aaaeba20000) to space 5440K, 0% used [0x00002aaaeaf80000,0x00002aaaeaf80000,0x00002aaaeb4d0000) PSOldGen total 87424K, used 0K [0x00002aaab3a20000, 0x00002aaab8f80000, 0x00002aaae8f80000) object space 87424K, 0% used [0x00002aaab3a20000,0x00002aaab3a20000,0x00002aaab8f80000) PSPermGen total 21248K, used 10141K [0x00002aaaae620000, 0x00002aaaafae0000, 0x00002aaab3a20000) object space 21248K, 47% used [0x00002aaaae620000,0x00002aaaaf007410,0x00002aaaafae0000)
VM Arguments: jvm_args: -Xms128M -Xmx1280M -D.config=path -D.home=path1 -D .logfile=path2 java_command: com. .base.Server Launcher Type: SUN_STANDARD
OS:CentOS release 5.5 (Final)
uname:Linux 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 libc:glibc 2.5 NPTL 2.5 rlimit: STACK 10240k, CORE 1000001k, NPROC 24576, NOFILE 4096, AS 1835008k load average:1.87 0.45 0.22
CPU:total 2 (1 cores per cpu, 1 threads per core) family 6 model 46 stepping 6, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt
Memory: 4k page, physical 2959608k(2057540k free), swap 4096532k(4096532k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (17.0-b16) for linux-amd64 JRE (1.6.0_21-b06), built on Jun 22 2010 01:10:00 by "java_re" with gcc 3.2.2 (SuSE Linux)
time: Tue Mar 22 03:08:27 2011 elapsed time: 5 seconds
回答1:
What I did was google the Internal Error (allocation.inline.hpp:39)
mesage and found this page http://forums.oracle.com/forums/thread.jspa?messageID=5203404 suggesting the swap space limit was causing the problem (even it shouldn't do so) after removing the limit, the problem went away.
来源:https://stackoverflow.com/questions/5390563/java-lang-outofmemoryerror-requested-16-bytes-for-cheapobj-new-out-of-swap-spa