Backtrace for Java thread at early JVM startup - was: Hotspot segfaulting on Linux SPARC
John Paul Adrian Glaubitz
glaubitz at physik.fu-berlin.de
Sat Apr 14 21:50:49 UTC 2018
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.hs)
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