-
Bug
-
Resolution: Fixed
-
P3
-
hs25, 6u29
-
b85
-
x86
-
linux_redhat_5.0
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8142466 | 7u101 | Shafi Ahmad | P3 | Resolved | Fixed | b01 |
JDK-8180953 | openjdk7u | Thomas Schatzl | P3 | Resolved | Fixed | master |
JDK-8142465 | 6u115 | Shafi Ahmad | P3 | Resolved | Fixed | b01 |
JDK-8011053 | hs25 | Thomas Schatzl | P3 | Resolved | Fixed | b26 |
./bin/java -Xmx256M -version
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux wn-car-027.farm.nikhef.nl 2.6.18-274.3.1.el5 #1 SMP Tue Sep 6 20:13:52 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
(CentOS 5.7)
EXTRA RELEVANT SYSTEM CONFIGURATION :
Oracle Java 6u29
(same bug applies to OpenJDK 1.6.0)
A DESCRIPTION OF THE PROBLEM :
the latest&greatest worker nodes have 12 cores and 48 GB of RAM ; we
offer a maximum 12 jobs slots on these worker nodes, in order to
accomodate small and large jobs (users can requests 1 - 12 cores). To
ensure that the different jobs don't interfere with each other we also
set a VMEM limit for each job slot. The current VMEM limit is 48 / 12 =
4 GB RAM per job slot. Each single core job that starts has a 'ulimit
-v' of 4,000,000 .
On these boxes java refuses to start:
$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
After some debugging I found that this is caused by the default maximum
heap size which java allocates: it scans /proc/meminfo to extrac the
amount of RAM installed and divides it by 4 ; an 'strace' shows that
indeed 'java' tries to do an 'mmap' call for 12 GB of RAM !
A work around is to always specify '-Xmx2GB' or something similar but
this does not work for all software that we use , plus , I find it
annoying that I have to tell this to all my users.
What I would like to see is a system-wide setting for the initial
maximum heap size, so that
java -version
"just works" . Is this possible?
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
- take a box with 8 GB of ram or more
- set
ulimit -v 1600000
- run
java -version
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
java version "1.6.0_29"
Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot(TM) 64-Bit Server VM (build 20.4-b02, mixed mode)
ACTUAL -
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
always specify
-Xmx<number>
this is not always possible , however.
- backported by
-
JDK-8011053 Message "Error occurred during initialization of VM" on boxes with lots of RAM
- Resolved
-
JDK-8142465 Message "Error occurred during initialization of VM" on boxes with lots of RAM
- Resolved
-
JDK-8142466 Message "Error occurred during initialization of VM" on boxes with lots of RAM
- Resolved
-
JDK-8180953 Message "Error occurred during initialization of VM" on boxes with lots of RAM
- Resolved
- duplicates
-
JDK-6817189 Observe user'ss ulimit's in setting default heap size.
- Closed
- relates to
-
JDK-8043516 After "ulimit -v", the JVM can not start without extra GC command line args.
- Closed