32bit windows VM cannot be started with 1GB heap?

Thomas Stüfe thomas.stuefe at gmail.com
Tue Dec 13 15:06:52 UTC 2016


Hi Claes,

On Tue, Dec 13, 2016 at 3:28 PM, Claes Redestad <claes.redestad at oracle.com>
wrote:

> Hi Thomas,
>
> do you configure the build with the client or server VM?
>
>
I do not explicitly specify anything on the configure line, so I use the
default, which seems to be the server VM. At least I see the jvm.dll from
the server directory in the address space.

The former is not going to be supported by Oracle in JDK 9 and the latter is
> known to have issues with allocating too many threads and using too much
> memory for code cache etc on large machines, effectively starving the
> available space for the java heap.
>
> A solution to this is actively being worked on, see
> https://bugs.openjdk.java.net/browse/JDK-8166002
>
>
Good to know that a solution is in work, but I am not sure this would help
in my case. Just saw that right in the middle of the address space a Virus
scanner placed his dll. Without this dll the address hole would be *just*
enough to place a 1gb heap. However, unfortunately I cannot easily disable
the scanner on this machine. I think this problem may be common on 32bit
windows, unfortunately, and if the dll is placed badly enough, reducing the
memory footprint of the VM may not be enough.

Note that my immediate problem is solved - I just wanted to execute some
gtests on 32bit to make sure they run on 32bit. I found out that I can run
the gtests on the jdk in the output directory and do not need to have a
complete image directory built sucessfully.

Thank you for helping!

Thomas



> Thanks!
>
> /Claes
>
>
> On 12/13/2016 02:52 PM, Thomas Stüfe wrote:
>
>> Hi all,
>>
>> I try to build a 32bit VM (from the jdk9/hs repository) on Windows.
>>
>> The build fails when it tries to run the freshly built VM during the
>> build:
>>
>> /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/configure-
>> support/bin/fixpath.exe
>> -c /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/jdk/bin/java -Xms64M
>> -Xmx1024M -XX:ThreadStackSize=768 -esa -ea -cp
>> /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/buildtools
>> /tools_jigsaw_classes
>> --add-exports jdk.jdeps/com.sun.tools.classfile=ALL-UNNAMED
>> build.tools.jigsaw.ModuleSummary -o
>> /cygdrive/c/d031900/openjdk/jdk9-hs2/output-32bit/images/gen
>> graphs/module-summary.html
>> --module-path /cygdrive/c/d031900/openjdk/jd
>> k9-hs2/output-32bit/images/jmods
>> Error occurred during initialization of VM
>> Could not reserve enough space for 1048576KB object heap
>>
>> Basically, the VM under <output>/jdk cannot be started with 1GB heap. I
>> assume the same would be true for the build result VM, but cannot verify
>> this as the build does not finish.
>>
>> Drilling down I found that when trying to allocate the java heap,
>> VirtualAlloc fails with ERROR_NOT_ENOUGH_MEMORY.
>>
>> Drilling further down I found - when looking at the address space with
>> VMMap - that there is indeed no adress space hole large enough to hold
>> 1GB.
>> But no culprit stands out immediately.
>>
>> Does anyone else experience similar problems? Would it be ok to reduce the
>> -Xmx setting for the 32bit build on windows?
>>
>> Thank you, Thomas
>>
>
>


More information about the hotspot-dev mailing list