Linux Support FAQ entry 18 Jan 2007, logged in as JanIven
LinuxSupportFAQForm
SupportProblem On 64bit SLC4, SUN Java gives an error message about missing virtual memory
SupportAnswer (Reminder: JAVA is not supported by CERN IT)

The full error message looks like:

java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

This appears to be similar to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6245770 (which is supposedly fixed in 1.5.0_07 but apparently isn't, since the issue is still present in 1.5.0_10). In other words, Java tries to grab a large chunk of virtual memory (1GB or so) on startup in case it later might want to do something useful with this.

On shared machines such as LX64SLC4, limits on virtual memory usage prevent it from doing so. And Java then falls over.

A wider discussion is at http://forum.java.sun.com/thread.jspa?threadID=651637 and http://forum.java.sun.com/thread.jspa?threadID=632411

Workarounds involve explicitly limiting memory usage from the command line, via combinations of parameters (XX:ReservedCodeCacheSize, XX:InitialCodeCacheSize, Xms, Xmx) For java, use one of

 java -XX:ReservedCodeCacheSize=128m -XX:InitialCodeCacheSize=48m -version
 java  -Xms64m -Xmx384m -version
For javac, use something like
 javac -J-Xmx32m -J-XX:ReservedCodeCacheSize=128m
You may have to experiment to find a useful comination that has allocates enough memory for you application to start, but little enough to actually suceed.

(Reminder: JAVA is not supported by CERN IT)

OsVersion SLC4
HardwareArchitecture x86_64 (Opteron/EM64T)
ApprovedBySupport SupportApproved
Edit | Attach | Watch | Print version | History: r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions...
Topic revision: r1 - 2007-01-18 - JanIven
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    LinuxSupport All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback