OpenVZ Forum


Home » General » Support » Java heap problem on Centos 5.2
Java heap problem on Centos 5.2 [message #33375] Thu, 09 October 2008 16:14 Go to next message
anthonysales is currently offline  anthonysales
Messages: 1
Registered: October 2008
Location: Philippines
Junior Member
I know people have been getting this error before. I solved it by setting the privvmpages higher and higher until i reached the same amount of memory as my host machine. But then, even with guest having the same amount of memory as my host, I still get the same error. This is what i get when trying to run my app

[root@VE102 ]# bin/javaapp
Error occurred during initialization of VM
Could not reserve enough space for object heap
*** glibc detected *** /usr/local/jdk1.6.0_07//bin/java: free(): invalid pointer: 0xb7dea290 ***
======= Backtrace: =========
/lib/libc.so.6[0xb7e7bb16]
/lib/libc.so.6(cfree+0x90)[0xb7e7f070]
/usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so[0x63d3c 23]
/usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so[0x63902 60]
/usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so[0x6391e 9d]
/usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so[0x63953 19]
/usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so(JNI_Cre ateJavaVM+0x53)[0x6245543]
/usr/local/jdk1.6.0_07//bin/java[0x804afcc]
/usr/local/jdk1.6.0_07//bin/java(JavaMain+0x72)[0x8049942]
/lib/libpthread.so.0[0xb7f6846b]
/lib/libc.so.6(clone+0x5e)[0xb7ee3dbe]
======= Memory map: ========
06000000-0641b000 r-xp 00000000 fd:03 6547287 /usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so
0641b000-06435000 rwxp 0041a000 fd:03 6547287 /usr/local/jdk1.6.0_07/jre/lib/i386/client/libjvm.so
06435000-06855000 rwxp 06435000 00:00 0
08048000-08052000 r-xp 00000000 fd:03 6548277 /usr/local/jdk1.6.0_07/bin/java
08052000-08053000 rwxp 00009000 fd:03 6548277 /usr/local/jdk1.6.0_07/bin/java
09eb7000-09ed8000 rwxp 09eb7000 00:00 0 [heap]
b5b00000-b5b21000 rwxp b5b00000 00:00 0
b5b21000-b5c00000 ---p b5b21000 00:00 0
b5c8d000-b5c98000 r-xp 00000000 fd:03 6091137 /lib/libgcc_s-4.1.2-20080102.so.1
b5c98000-b5c99000 rwxp 0000a000 fd:03 6091137 /lib/libgcc_s-4.1.2-20080102.so.1
b5c99000-b5c9a000 rwxp b5c99000 00:00 0
b5c9a000-b5d19000 rwxp b5c9a000 00:00 0
b5d19000-b5d41000 rwxp b5d19000 00:00 0
b5d41000-b7d19000 rwxp b5d41000 00:00 0
b7d19000-b7d28000 r-xp 00000000 fd:03 6547298 /usr/local/jdk1.6.0_07/jre/lib/i386/libzip.so
b7d28000-b7d2a000 rwxp 0000e000 fd:03 6547298 /usr/local/jdk1.6.0_07/jre/lib/i386/libzip.so
b7d2a000-b7d4d000 r-xp 00000000 fd:03 6547294 /usr/local/jdk1.6.0_07/jre/lib/i386/libjava.so
b7d4d000-b7d4f000 rwxp 00023000 fd:03 6547294 /usr/local/jdk1.6.0_07/jre/lib/i386/libjava.so
b7d4f000-b7d5a000 r-xp 00000000 fd:03 6547293 /usr/local/jdk1.6.0_07/jre/lib/i386/libverify.so
b7d5a000-b7d5b000 rwxp 0000b000 fd:03 6547293 /usr/local/jdk1.6.0_07/jre/lib/i386/libverify.so
b7d5b000-b7d63000 rwxs 00000000 fd:03 6842506 (deleted) /tmp/hsperfdata_root/16129
b7d63000-b7d6c000 r-xp 00000000 fd:03 6089620 /lib/libnss_files-2.5.so
b7d6c000-b7d6d000 r-xp 00008000 fd:03 6089620 /lib/libnss_files-2.5.so
b7d6d000-b7d6e000 rwxp 00009000 fd:03 6089620 /lib/libnss_files-2.5.so
b7d6e000-b7d81000 r-xp 00000000 fd:03 6089671 /lib/libnsl-2.5.so
b7d81000-b7d82000 r-xp 00012000 fd:03 6089671 /lib/libnsl-2.5.so
b7d82000-b7d83000 rwxp 00013000 fd:03 6089671 /lib/libnsl-2.5.so
b7d83000-b7d85000 rwxp b7d83000 00:00 0
b7d8a000-b7d90000 r-xp 00000000 fd:03 6547280 /usr/local/jdk1.6.0_07/jre/lib/i386/native_threads/libhpi.so
b7d90000-b7d91000 rwxp 00006000 fd:03 6547280 /usr/local/jdk1.6.0_07/jre/lib/i386/native_threads/libhpi.so
b7d91000-b7d98000 r-xp 00000000 fd:03 6089651 /lib/librt-2.5.so
b7d98000-b7d99000 r-xp 00006000 fd:03 6089651 /lib/librt-2.5.so
b7d99000-b7d9a000 rwxp 00007000 fd:03 6089651 /lib/librt-2.5.so
b7d9a000-b7d9d000 ---p b7d9a000 00:00 0
b7d9d000-b7deb000 rwxp b7d9d000 00:00 0
b7deb000-b7e10000 r-xp 00000000 fd:03 6089624 /lib/libm-2.5.so
b7e10000-b7e11000 r-xp 00024000 fd:03 6089624 /lib/libm-2.5.so
b7e11000-b7e12000 rwxp 00025000 fd:03 6089624 /lib/libm-2.5.so
b7e12000-b7e13000 rwxp b7e12000 00:00 0
b7e13000-b7f50000 r-xp 00000000 fd:03 6089511 /lib/libc-2.5.so
b7f50000-b7f52000 r-xp 0013c000 fd:03 6089511 /lib/libc-2.5.so
b7f52000-b7f53000 rwxp 0013e000 fd:03 6089511 /lib/libc-2.5.so
b7f53000-b7f56000 rwxp b7f53000 00:00 0
b7f56000-b7f58000 r-xp 00000000 fd:03 6089672 /lib/libdl-2.5.so
b7f58000-b7f59000 r-xp 00001000 fd:03 6089672 /lib/libdl-2.5.so
b7f59000-b7f5a000 rwxp 00002000 fd:03 6089672 /lib/libdl-2.5.so
b7f5a000-b7f61000 r-xp 00000000 fd:03 6547296 /usr/local/jdk1.6.0_07/jre/lib/i386/jli/libjli.so
b7f61000-b7f63000 rwxp 00006000 fd:03 6547296 /usr/local/jdk1.6.0_07/jre/lib/i386/jli/libjli.so
b7f63000-b7f76000 r-xp 00000000 fd:03 6089495 /lib/libpthread-2.5.so
b7f76000-b7f77000 r-xp 00012000 fd:03 6089495 /lib/libpthread-2.5.so
b7f77000-b7f78000 rwxp 00013000 fd:03 6089495 /lib/libpthread-2.5.so
b7f78000-b7f7b000 rwxp b7f78000 00:00 0
b7f7e000-b7f7f000 rwxp b7f7e000 00:00 0
b7f7f000-b7f80000 r-xp b7f7f000 00:00 0
b7f80000-b7f81000 r-xp b7f80000 00:00 0 [vdso]
b7f81000-b7f9b000 r-xp 00000000 fd:03 6089635 /lib/ld-2.5.so
b7f9b000-b7f9c000 r-xp 00019000 fd:03 6089635 /lib/ld-2.5.so
b7f9c000-b7f9d000 rwxp 0001a000 fd:03 6089635 /lib/ld-2.5.so
bfc4d000-bfc84000 rwxp bfc4d000 00:00 0 [stack]
Aborted

I've tried running the same amount of apps on a weaker machine, and I get to run all the apps with no problems at all. My current host is running on 2 Xeon 5160 procs with 4gb of ram. My weaker machine is a Sempron 2800+ with only 1GB of ram. I'm getting confused as to why my Sempron out performs my 2 Xeons.. any suggestions?

I'm currently using the following vz packages on CentOS 5.2:

vzquota-3.0.11-1
vzctl-lib-3.0.22-1
vzpkg-2.7.0-18
ovzkernel-PAE-devel-2.6.18-92.1.1.el5.028stab057.2
vzyum-2.4.0-11
vzctl-3.0.22-1
vzdump-1.0-2
ovzkernel-PAE-2.6.18-92.1.1.el5.028stab057.2

my CentOS 5.2 container has the following settings:

102:        kmemsize        9827674   16880967   21080363   21080363          0
            lockedpages           0          0        256        256          0
            privvmpages      448820     767858    1048576    1048576       1390
            shmpages           2605      12221      21504      21504          0
            dummy                 0          0          0          0          0
            numproc             215        320        720        720          0
            physpages         31718      55164     384000     384000          0
            vmguarpages           0          0     524288     524288          0
            oomguarpages      31718      55164     524288     524288          0
            numtcpsock           63         83       3200       3200          0
            numflock              6         15        188        206          0
            numpty                6         12         30         30          0
            numsiginfo            0        242        256        256          0
            tcpsndbuf        214408     273588    1720320    2703360          0
            tcprcvbuf        210316    1157372    1720320    2703360          0
            othersockbuf      15224      58408    1126080    2097152          0
            dgramrcvbuf           0       8380     262144     262144          0
            numothersock         54        136       3200       3200          0
            dcachesize            0          0    3409920    3624960          0
            numfile            3900       6450      15000      15000          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            14         14        128        128          0



as you can see, i only get failcounts on privvmpages.Sad any suggestions? thanks in advance for the replies! Smile
Re: Java heap problem on Centos 5.2 [message #33492 is a reply to message #33375] Fri, 17 October 2008 08:31 Go to previous message
azagzin is currently offline  azagzin
Messages: 38
Registered: May 2008
Location: Vilnius
Member
hello,
try to increase PRIVVMPAGES
Previous Topic: Maximum Execution
Next Topic: Best limits values for numbers of processes and cpu_limit
Goto Forum:
  


Current Time: Sun Jul 27 11:51:40 GMT 2025

Total time taken to generate the page: 0.59288 seconds