http://bugzilla.novell.com/show_bug.cgi?id=519137 Summary: java fails with "Could not reserve enough space for object heap" Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Normal Priority: P5 - None Component: Java AssignedTo: bnc-team-java@forge.provo.novell.com ReportedBy: R.Vickers@cs.rhul.ac.uk QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.11) Gecko/2009060214 Firefox/3.0.11 On some memory configurations Java will not start: $ java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. You can make it start by specifying a maximum memory allocation pool, e.g. $java -Xmx3600m -version java version "1.6.0_0" IcedTea6 1.4 (suse-24.5.2-x86_64) Runtime Environment (build 1.6.0_0-b14) OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode) This test was done on a machine with 32GB real memory but with a virtual memory limit of about 4GB. The same thing happens on a 24 GB machine, but on a 4GB machine you have to reduce the virtual memory limit to around 1GB to trigger the bug. So it appears that java decides how much virtual memory it needs by looking at the physical memory without checking the virtual memory limit. On a shared computer (for example an LTSP server) it makes sense for the virtual memory limit (per process) to be much smaller than the physical memory size. The workround above helps to a certain extent, but I haven't found a way of getting eclipse to work. The -Xmx parameter has to be very early in the command line, for example it is no use saying java -version -Xmx3600m The same thing happens with Sun Java: $ /usr/lib64/jvm/java-1.6.0-sun/bin/java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. $ /usr/lib64/jvm/java-1.6.0-sun/bin/java -Xmx3600m -version java version "1.6.0_13" Java(TM) SE Runtime Environment (build 1.6.0_13-b03) Java HotSpot(TM) 64-Bit Server VM (build 11.3-b02, mixed mode) Reproducible: Always Steps to Reproduce: 1. Type java -version 2. If it works then experiment with lower virtual memory limits until it fails, e.g. ulimit -S -v 4000000 java -version ulimit -S -v 2000000 java -version ulimit -S -v 1000000 java -version Actual Results: Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. Expected Results: java version "1.6.0_0" IcedTea6 1.4 (suse-24.5.2-x86_64) Runtime Environment (build 1.6.0_0-b14) OpenJDK 64-Bit Server VM (build 14.0-b08, mixed mode) I introduced the virtual memory limits because users were causing performance problems with very large jobs. I regard 4GB as a big limit, I don't think it is reasonable for Java to assume this is available without checking. -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.