On Mon, 2018-04-16 at 12:01 +0200, Volker Simonis wrote: > On Mon, Apr 16, 2018 at 11:30 AM, Severin Gehwolf <sgehw...@redhat.com> wrote: > > Hi Andrew, > > > > On Mon, 2018-04-16 at 09:47 +0100, Andrew Haley wrote: > > > On 04/13/2018 02:40 PM, Severin Gehwolf wrote: > > > > ++ /usr/bin/tee > > > > /builddir/build/BUILD/java-9-openjdk-9.0.4.12-5.openjdk9.el7.s390/openjdk/build/jdk/modules/java.base/_the.java.base_batch.log > > > > ++ /usr/bin/tee > > > > /builddir/build/BUILD/java-9-openjdk-9.0.4.12-5.openjdk9.el7.s390/openjdk/build/jdk/modules/java.base/_the.java.base_batch.log > > > > Error occurred during initialization of VM > > > > Could not reserve enough space for 1048576KB object heap > > > > > > What is the root cause of this? Is it that the system on which the build > > > runs > > > cannot allocate all that memory? Does not have that much memory? > > > > The configure code in JDK 9+ has this: > > > > JVM_HEAP_LIMIT_32="1024" > > # Running a 64 bit JVM allows for and requires a bigger heap > > JVM_HEAP_LIMIT_64="1600" > > STACK_SIZE_32=768 > > STACK_SIZE_64=1536 > > JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2` > > if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then > > JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL > > fi > > if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then > > JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL > > fi > > if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then > > JVM_HEAP_LIMIT_32=512 > > JVM_HEAP_LIMIT_64=512 > > fi > > > > if test "x$BOOT_JDK_BITS" = "x32"; then > > STACK_SIZE=$STACK_SIZE_32 > > JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32 > > else > > STACK_SIZE=$STACK_SIZE_64 > > JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64 > > fi > > > > > > Here's my reasoning: > > > > If I read this right then -Xmx will be bound above by 1/2 the hardware > > memory size. The set heap limit for that build was 1024M. It then > > follows that 1024M was less than 1/2 the hardware memory. Yet, it still > > failed to allocate required memory. So to answer your question: It > > looks like it was that the system wasn't able to allocate that much > > memory at the time. > > > > Where do you get the "Before:" output from your initial mail:
>From a time-shared s390x box where I've created a s390 chroot manually. It's not the same system as where the builds run. I don't have access to systems running builds unfortunately. > Before: > checking flags for bootcycle boot jdk java command for big > workloads... -Xms64M -Xmx998M -XX:ThreadStackSize=768 > > with '-Xmx998M' if JVM_HEAP_LIMIT_32 was "1024" before your change ? Right. This particular system where I ran this on has 1997MB memory (according to free -m). Since 1997/2 ~= 998 and 998 < 1024 that's what's getting used. Does that make sense? Thanks, Severin