Backtrace for Java thread at early JVM startup - was: Hotspot segfaulting on Linux SPARC

Michael Dardis me at md-5.net
Sun Apr 15 12:39:14 UTC 2018


Adrian,

The invalid value is 0xabababab in hexadecimal.
In debug builds this option is set:
https://github.com/md-5/OpenJDK/blob/1415df45a29a0a0c56adf1271786e41d5f93ca57/src/hotspot/share/runtime/globals.hpp#L905
Which causes freed memory to be filled with 0xabababab upon clearing.

Probably a memory bounds issue with access above or below the correct
memory chunk.
Unfortunately I can't provide further help, but hopefully that answers your
question of where it's coming from.

Michael

On 15 April 2018 at 07:50, John Paul Adrian Glaubitz <
glaubitz at physik.fu-berlin.de> wrote:

> Hi!
>
> I am still trying to fix Hotspot on Linux/SPARC and it seems that the
> problem is related to a HashMap which is created during VM startup.
>
> From studying the code, I found that the following exception:
>
> glaubitz at deb4g:/srv/glaubitz/hs$ ./build/linux-sparcv9-normal-server-fastdebug/jdk/bin/java
> --version
> Error occurred during initialization of boot layer
> java.lang.module.FindException: Error reading module:
> /srv/glaubitz/hs/build/linux-sparcv9-normal-server-fastdebug
> /jdk/modules/java.sql
> Caused by: java.lang.module.InvalidModuleDescriptorException: Illegal
> load factor: -1.2197928E-12
> glaubitz at deb4g:/srv/glaubitz/hs$
>
> is thrown in this constructor:
>
>     public HashMap(int initialCapacity, float loadFactor)
>
> in src/java.base/share/classes/java/util/HashMap.java.
>
> Now, if I hard-wire the load factor to the default value of 0.75f:
>
> diff -r 46dc568d6804 src/java.base/share/classes/java/util/HashMap.java
> --- a/src/java.base/share/classes/java/util/HashMap.java        Fri Apr
> 13 14:06:39 2018 +0200
> +++ b/src/java.base/share/classes/java/util/HashMap.java        Sun Apr
> 15 00:48:11 2018 +0300
> @@ -448,6 +448,7 @@
>          if (initialCapacity < 0)
>              throw new IllegalArgumentException("Illegal initial
> capacity: " +
>                                                 initialCapacity);
> +       loadFactor = 0.75f;
>          if (initialCapacity > MAXIMUM_CAPACITY)
>              initialCapacity = MAXIMUM_CAPACITY;
>          if (loadFactor <= 0 || Float.isNaN(loadFactor))
>
> the JVM seems to startup normally:
>
> glaubitz at deb4g:/srv/glaubitz/hs$ ./build/linux-sparcv9-normal-server-fastdebug/jdk/bin/java
> --version
> openjdk 11-internal 2018-09-25
> OpenJDK Runtime Environment (fastdebug build 11-internal+0-adhoc.glaubitz.h
> s)
> OpenJDK 64-Bit Server VM (fastdebug build 11-internal+0-adhoc.glaubitz.hs,
> mixed mode)
> glaubitz at deb4g:/srv/glaubitz/hs$
>
> Now, in order to figure out what's actually wrong, it would be handy to get
> a backtrace of the Java thread to understand where the invalid value for
> loadFactor, -1.2197928E-12, comes from.
>
> Any suggestions?
>
> Thanks,
> Adrian
>
> --
>  .''`.  John Paul Adrian Glaubitz
> : :' :  Debian Developer - glaubitz at debian.org
> `. `'   Freie Universitaet Berlin - glaubitz at physik.fu-berlin.de
>   `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
>


More information about the hotspot-dev mailing list