[Bug 519137] New: java fails with "Could not reserve enough space for object heap"
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.
http://bugzilla.novell.com/show_bug.cgi?id=519137 User R.Vickers@cs.rhul.ac.uk added comment http://bugzilla.novell.com/show_bug.cgi?id=519137#c1 --- Comment #1 from Bob Vickers <R.Vickers@cs.rhul.ac.uk> 2009-07-09 04:52:01 MDT --- Extra information: the problem still occurs after recent Java upgrade. New version is 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) -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=519137 User mvyskocil@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=519137#c2 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO CC| |mvyskocil@novell.com Info Provider| |R.Vickers@cs.rhul.ac.uk --- Comment #2 from Michal Vyskocil <mvyskocil@novell.com> 2009-08-25 07:26:37 MDT --- Upstream knows about it - see bug#414462, but I'm going to move your bug to bugs.sun.com, because it seems that this issue is shared between Sun and openjdk Java. Can you get me an output of uname -a? -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=519137 User mvyskocil@novell.com added comment http://bugzilla.novell.com/show_bug.cgi?id=519137#c3 Michal Vyskocil <mvyskocil@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |RESOLVED Info Provider|R.Vickers@cs.rhul.ac.uk | Resolution| |UPSTREAM --- Comment #3 from Michal Vyskocil <mvyskocil@novell.com> 2009-08-25 07:42:12 MDT --- Well, I reproduced it on my machine, so I provided uname -a from it. Unfortunately Sun Bug database is somewhat hidden, so I don't have an url for you :( -- 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.
http://bugzilla.novell.com/show_bug.cgi?id=519137 User R.Vickers@cs.rhul.ac.uk added comment http://bugzilla.novell.com/show_bug.cgi?id=519137#c4 --- Comment #4 from Bob Vickers <R.Vickers@cs.rhul.ac.uk> 2009-08-25 07:51:00 MDT --- Here you go... $ ulimit -v -S 9000000 $ java -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) $ ulimit -S -v 4000000 $ java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. $ uname -a Linux zeno 2.6.27.29-0.1-default #1 SMP 2009-08-15 17:53:59 +0200 x86_64 x86_64 x86_64 GNU/Linux Bob -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=519137 https://bugzilla.novell.com/show_bug.cgi?id=519137#c5 --- Comment #5 from Bob Vickers <R.Vickers@cs.rhul.ac.uk> 2012-09-11 10:55:06 UTC --- Just to note that this bug is still present on Opensuse 12.1 with IcedTea6 1.11.3. The bug stops libreoffice working as well as user Java programs. Fortunately there is a workround which I was unaware of before: you can set an environment variable _JAVA_OPTIONS e.g. $ java -version Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine. $ _JAVA_OPTIONS=-Xmx1g java -version Picked up _JAVA_OPTIONS: -Xmx1g java version "1.6.0_24" OpenJDK Runtime Environment (IcedTea6 1.11.3) (suse-9.1-x86_64) OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode) -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com