openjdk,icedtea - Xmx option mandatory
Roberto Mannai
robermann at gmail.com
Fri Aug 8 16:33:53 PDT 2008
In the while, I downloaded from:
https://api.opensuse.org/build/openSUSE:Factory/standard/i586/java-1_6_0-openjdk/java-1_6_0-openjdk-1.2_b09-18.16.src.rpm
the last factory opensuse java version.
If I'm not wrong, the Xmx setting is done into the file:
openjdk-6-src-b09-11_apr_2008-fedora/openjdk/jdk/make/docs/Makefile
Where the default size should be:
MAX_VM_MEMORY = 512
That default value makes the process crash on my PC, which has 512 mb
of RAM (java -Xmx512m -version crashes, too).
I think the SUN default value was 384 - see:
https://jdk-jrl-sources.dev.java.net/source/browse/jdk-jrl-sources/jdk6u3/trunk/j2se/make/docs/Makefile?view=markup
In my PC, I can run successfully:
java -Xmx384m -version
If this discussion of default value was correct would mean that
default openjdk / icedtea RPM
versions will not work out of the box (without patches) on PCs with
scarce RAM like mine. What do you think?
Ciao
Roberto
On Fri, Aug 8, 2008 at 11:41 PM, Roberto Mannai <robermann at gmail.com> wrote:
> Hi
> Where (or how) can I find the default Xmx size?
>
> If I try a -Xmx400m I get the same error, so I'm thinking the default
> max size could be greater than my free RAM + SWAP.
>
> In this moment:
> linux:~ # free -m
> total used free shared buffers cached
> Mem: 503 495 7 0 63 183
> -/+ buffers/cache: 248 254
> Swap: 127 0 127
> linux:~ #
> 254 + 127= 381 mega
>
> Now I can create a java virtual machine with at max -Xmx390m.
>
> So I'd much helped on knowing what is the default xmx value - googling
> it does not help: I found only:
> http://www.nabble.com/changeset-in--hg-icedtea:-*-patches-icedtea-cacao-Compiler-gcc-g...-td14884869.html
>
> Please if you're aware of a more suitable mailing list, tell me it.
>
> Best regards
> Roberto
>
>
> On Mon, Aug 4, 2008 at 9:47 PM, Roberto Mannai <robermann at gmail.com> wrote:
>> In order to get some feedback, I wrote to the
>> opensuse-java at opensuse.org mailing list. At least one user was
>> successful running the command, it seems, on a 64bit processor.
>>
>> In order to get more feedback, I open the following bug:
>> https://bugzilla.novell.com/show_bug.cgi?id=414462
>>
>> Coping below for your convenience:
>>
>> When running the java process, I get the following error:
>>
>> linux:~/.eclipse # java -version
>> Error occurred during initialization of VM
>> Could not reserve enough space for object heap
>> *** glibc detected *** java: free(): invalid pointer: 0xb7737254 ***
>> ======= Backtrace: =========
>> /lib/libc.so.6[0xb7f86fc4]
>> /lib/libc.so.6(cfree+0x9c)[0xb7f8895c]
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a94fb1]
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a580a2]
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a59860]
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so[0xb7a5dc85]
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so(JNI_CreateJavaVM+0x5c)[0xb78faccc]
>> java(JavaMain+0x9e)[0x804a4de]
>> /lib/libpthread.so.0[0xb806e175]
>> /lib/libc.so.6(clone+0x5e)[0xb7fe8dce]
>> ======= Memory map: ========
>> 08048000-08050000 r-xp 00000000 08:01 1379425
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java
>> 08050000-08051000 r--p 00008000 08:01 1379425
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java
>> 08051000-08052000 rw-p 00009000 08:01 1379425
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/bin/java
>> 08052000-08073000 rw-p 08052000 00:00 0 [heap]
>> b5400000-b5421000 rw-p b5400000 00:00 0
>> b5421000-b5500000 ---p b5421000 00:00 0
>> b55ca000-b55cb000 rwxp b55ca000 00:00 0
>> b55cb000-b564a000 rwxp b55cb000 00:00 0
>> b564a000-b5672000 rwxp b564a000 00:00 0
>> b5672000-b764a000 rwxp b5672000 00:00 0
>> b764a000-b766e000 r-xp 00000000 08:01 3915
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so
>> b766e000-b766f000 r--p 00023000 08:01 3915
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so
>> b766f000-b7671000 rw-p 00024000 08:01 3915
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libjava.so
>> b7671000-b76a6000 r--s 00000000 08:01 4401 /var/run/nscd/passwd
>> b76a6000-b76b9000 r-xp 00000000 08:01 1100751 /lib/libnsl-2.8.so
>> b76b9000-b76ba000 r--p 00012000 08:01 1100751 /lib/libnsl-2.8.so
>> b76ba000-b76bb000 rw-p 00013000 08:01 1100751 /lib/libnsl-2.8.so
>> b76bb000-b76bd000 rw-p b76bb000 00:00 0
>> b76c7000-b76d3000 r-xp 00000000 08:01 24423 /lib/libgcc_s.so.1
>> b76d3000-b76d4000 r--p 0000b000 08:01 24423 /lib/libgcc_s.so.1
>> b76d4000-b76d5000 rw-p 0000c000 08:01 24423 /lib/libgcc_s.so.1
>> b76d5000-b76dc000 r-xp 00000000 08:01 3938
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so
>> b76dc000-b76dd000 r--p 00006000 08:01 3938
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so
>> b76dd000-b76de000 rw-p 00007000 08:01 3938
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libzip.so
>> b76de000-b76e5000 r-xp 00000000 08:01 1218520 /lib/librt-2.8.so
>> b76e5000-b76e6000 r--p 00006000 08:01 1218520 /lib/librt-2.8.so
>> b76e6000-b76e7000 rw-p 00007000 08:01 1218520 /lib/librt-2.8.so
>> b76e7000-b76ea000 ---p b76e7000 00:00 0
>> b76ea000-b7738000 rw-p b76ea000 00:00 0
>> b7738000-b775c000 r-xp 00000000 08:01 1034658 /lib/libm-2.8.so
>> b775c000-b775d000 r--p 00023000 08:01 1034658 /lib/libm-2.8.so
>> b775d000-b775e000 rw-p 00024000 08:01 1034658 /lib/libm-2.8.so
>> b775e000-b7adc000 r-xp 00000000 08:01 3898
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so
>> b7adc000-b7aef000 r--p 0037e000 08:01 3898
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so
>> b7aef000-b7afb000 rw-p 00391000 08:01 3898
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/client/libjvm.so
>> b7afb000-b7f1b000 rw-p b7afb000 00:00 0
>> b7f1b000-b8058000 r-xp 00000000 08:01 145156 /lib/libc-2.8.so
>> b8058000-b805a000 r--p 0013d000 08:01 145156 /lib/libc-2.8.so
>> b805a000-b805b000 rw-p 0013f000 08:01 145156 /lib/libc-2.8.so
>> b805b000-b805e000 rw-p b805b000 00:00 0
>> b805e000-b8060000 r-xp 00000000 08:01 996292 /lib/libdl-2.8.so
>> b8060000-b8061000 r--p 00001000 08:01 996292 /lib/libdl-2.8.so
>> b8061000-b8062000 rw-p 00002000 08:01 996292 /lib/libdl-2.8.so
>> b8062000-b8066000 r-xp 00000000 08:01 3903
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so
>> b8066000-b8067000 r--p 00003000 08:01 3903
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so
>> b8067000-b8068000 rw-p 00004000 08:01 3903
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/jli/libjli.so
>> b8068000-b807c000 r-xp 00000000 08:01 1100778 /lib/libpthread-2.8.so
>> b807c000-b807d000 r--p 00013000 08:01 1100778 /lib/libpthread-2.8.so
>> b807d000-b807e000 rw-p 00014000 08:01 1100778 /lib/libpthread-2.8.so
>> b807e000-b8080000 rw-p b807e000 00:00 0
>> b8080000-b8092000 r-xp 00000000 08:01 146523 /lib/libz.so.1.2.3
>> b8092000-b8093000 r--p 00011000 08:01 146523 /lib/libz.so.1.2.3
>> b8093000-b8094000 rw-p 00012000 08:01 146523 /lib/libz.so.1.2.3
>> b8094000-b80a0000 r-xp 00000000 08:01 3937
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so
>> b80a0000-b80a1000 r--p 0000c000 08:01 3937
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so
>> b80a1000-b80a2000 rw-p 0000d000 08:01 3937
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/libverify.so
>> b80a2000-b80aa000 rw-s 00000000 08:01 4291 /tmp/hsperfdata_root/5298
>> (deleted)
>> b80aa000-b80b1000 r-xp 00000000 08:01 3940
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so
>> b80b1000-b80b2000 r--p 00006000 08:01 3940
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so
>> b80b2000-b80b3000 rw-p 00007000 08:01 3940
>> /usr/lib/jvm/java-1.6.0-openjdk-1.2_b09/jre/lib/i386/native_threads/libhpi.so
>> b80b3000-b80b4000 rw-p b80b3000 00:00 0
>> b80b4000-b80b5000 r--p b80b4000 00:00 0
>> b80b5000-b80b6000 rw-p b80b5000 00:00 0
>> b80b6000-b80d1000 r-xp 00000000 08:01 115121 /lib/ld-2.8.so
>> b80d1000-b80d2000 r--p 0001a000 08:01 115121 /lib/ld-2.8.so
>> b80d2000-b80d3000 rw-p 0001b000 08:01 115121 /lib/ld-2.8.so
>> bfebe000-bfed3000 rw-p bffeb000 00:00 0 [stack]
>> ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso]
>> Aborted
>>
>>
>> In order to work, I must set the Xmx option, for example:
>> linux:~/.eclipse # java -Xmx1m -version
>> java version "1.6.0"
>> IcedTea Runtime Environment (build 1.6.0-b09)
>> OpenJDK Client VM (build 1.6.0-b09, mixed mode)
>>
>> RPM version:
>> linux:~/.eclipse # rpm -q java-1_6_0-openjdk
>> java-1_6_0-openjdk-1.2_b09-9.1
>>
>> Opensuse version: 11.0
>> Kernel version:
>> linux:~/.eclipse # uname -r
>> 2.6.25.11-0.1-pae
>>
>>
>> Ciao
>> Roberto
>>
>>
>> On Mon, Aug 4, 2008 at 2:35 PM, Mark Wielaard <mark at klomp.org> wrote:
>>> Hi Roberto,
>>>
>>> On Mon, 2008-08-04 at 14:23 +0200, Roberto Mannai wrote:
>>>> On 8/4/08, Andrew Haley <aph at redhat.com> wrote:
>>>> > Roberto Mannai wrote:
>>>> >
>>>> > > For a test I've just installed:
>>>> > > java-1_7_0-icedtea
>>>> > > on my opensuse11 box.
>>>> > >
>>>> > > "java -version" command crashes with an error. In order to work, I
>>>> > > must use the -Xmx option, also with 1m:
>>>> > >
>>>> > > java -Xmx1m -version
>>>> > >
>>>> > > Any reason for it? Is it a bug?
>>>> >
>>>> > It must be. How much memory have you got?
>>>>
>>>> My system has 512 mb of RAM, on a 32 bit processor.
>>>>
>>>> If I try to set the Xms option, java complains it is larger than max
>>>> size, so in my opinion the jvm does not allocate any default xmx
>>>> parameter.
>>>>
>>>> The error is:
>>>> "Could not reserve enough space for object heap''
>>>>
>>>> The same message occurs also with java-1_6_0-openjdk.
>>>
>>> That is strange. Can you give us some more information?
>>>
>>> How exactly did you install icedtea/openjdk?
>>>
>>> Was is it a precompiled package, if so from where?
>>> If not, how did you configure and compile from source?
>>>
>>> Do other opensuse users have the same issue?
>>>
>>> What is the exact command given and output?
>>> Both for the failing and the working -Xmx1m -version case?
>>> (Best to copy/paste the command line completely, any output, including
>>> errors, stacktraces and the output of -version is interesting.)
>>>
>>> Thanks,
>>>
>>> Mark
>>>
>>>
>>
>
More information about the distro-pkg-dev
mailing list