- Status Closed
- Percent Complete
- Task Type Bug Report
- Category Packages → Packages: Stable
-
Assigned To
Andreas Baumann - Operating System pentium4
- Severity Low
- Priority Medium
- Reported Version
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Attached to Project: Archlinux32
Opened by Andreas Baumann - 18.05.2019
Last edited by Andreas Baumann - 16.08.2019
Opened by Andreas Baumann - 18.05.2019
Last edited by Andreas Baumann - 16.08.2019
FS#75 - openjdk8/10/11/12 break with march=pentium4 optimization
This blocks ant, needed for building libreoffice.
Closed by Andreas Baumann
16.08.2019 13:55
Reason for closing: Fixed
Additional comments about closing:
16.08.2019 13:55
Reason for closing: Fixed
Additional comments about closing:
fixed for 8, 10, 11 and 12. Not for
7.
mmh. java is fine.
java -version
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-b01)
OpenJDK Server VM (build 25.212-b01, mixed mode)
javac
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (os_linux_x86.cpp:291), pid=124, tid=0xf6dc1b40
# fatal error: An irrecoverable SI_KERNEL SIGSEGV has occurred due to unstable signal handling in this distribution.
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b01) (build 1.8.0_212-b01)
# Java VM: OpenJDK Server VM (25.212-b01 mixed mode linux-x86 )
# Core dump written. Default location: /build/libreoffice-still/core or core.124
#
# An error report file with more information is saved as:
# /build/libreoffice-still/hs_err_pid124.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp #
Aborted (core dumped)
ant
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (os_linux_x86.cpp:291), pid=155, tid=0xf6d4fb40
# fatal error: An irrecoverable SI_KERNEL SIGSEGV has occurred due to unstable signal handling in this distribution.
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b01) (build 1.8.0_212-b01)
# Java VM: OpenJDK Server VM (25.212-b01 mixed mode linux-x86 )
# Core dump written. Default location: /build/libreoffice-still/core or core.155
#
# An error report file with more information is saved as:
# /build/libreoffice-still/hs_err_pid155.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp #
Aborted (core dumped)
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x897c76]
V [libjvm.so+0x36392a]
V [libjvm.so+0x71341f] JVM_handle_linux_signal+0x6bf
V [libjvm.so+0x70507f]
C [linux-gate.so.1+0x950] __kernel_rt_sigreturn+0x0
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j java.lang.System.nanoTime()J+0
j java.net.URLClassLoader.defineClass(Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+0
j java.net.URLClassLoader.access$100(Ljava/net/URLClassLoader;Ljava/lang/String;Lsun/misc/Resource;)Ljava/lang/Class;+3
j java.net.URLClassLoader$1.run()Ljava/lang/Class;+43
j java.net.URLClassLoader$1.run()Ljava/lang/Object;+1
v ~StubRoutines::call_stub
j java.security.AccessController.doPrivileged(Ljava/security/PrivilegedExceptionAction;Ljava/security/AccessControlContext;)Ljava/lang/Object;+0
j java.net.URLClassLoader.findClass(Ljava/lang/String;)Ljava/lang/Class;+13
j java.lang.ClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+70
j sun.misc.Launcher$AppClassLoader.loadClass(Ljava/lang/String;Z)Ljava/lang/Class;+81
j java.lang.ClassLoader.loadClass(Ljava/lang/String;)Ljava/lang/Class;+3
v ~StubRoutines::call_stub
j com.sun.tools.javac.main.Main.(Ljava/lang/String;Ljava/io/PrintWriter;)V+5
j com.sun.tools.javac.main.Main.(Ljava/lang/String;)V+13
j com.sun.tools.javac.Main.compile([Ljava/lang/String;)I+6
j com.sun.tools.javac.Main.main([Ljava/lang/String;)V+1
v ~StubRoutines::call_stub
well. Java errors, hard to debug..
Installing the i686 version in the pentium4 chroot also segfaults..
Java 686 doesn't segfault on a real i686 installed system. So, I fear, some library in pentium4
is causing java to segfault.
Event: 0.057 Thread 0xf6b07c00 Exception <a> (0xd7b86ea0) thrown at [/build/java
penjdk/src/jdk8u-jdk8u212-b01/hotspot/src/share/vm/prims/jni.cp
penjdk/src/jdk8u-jdk8u212-b01/hotspot/src/share/vm/prims/jni.cpp, line 4012]
penjdk/src/jdk8u-jdk8u212-b01/hotspot/src/share/vm/prims/jvm.cpp, line 1502]
Event: 0.057 Thread 0xf6b07c00 Exception </a><a> (0xd7b87170) thrown at [/build/java
Event: 0.231 Thread 0xf6b07c00 Exception </a><a> (0xd7cc0498) thrown at [/build/java
mmh. this sounds quite internal..
</a>
pentium$:
javac -version
javac 11.0.3
why is libreoffice built with java 8?
weird: on my pentium4 test machine with jdk 8 and 11 installed, I can switch to java 8
and everything is fine.
I remember issues with shared libraries and the way the Jvm is bootstrapping. For
instance not having a /proc causes trouble of this sort. But we have a /proc
(we are using arch-chroot and a bind mount point).
using java 11 and javac 11 on pentium4 works..
..and now we get to "find the 10 differences in this picture".
The only thing I can think of is a different kernel (with more protection enabled):
https://bugs.openjdk.java.net/browse/JDK-8023956 https://bugs.openjdk.java.net/browse/JDK-8181068
This cries for building it on a real Pentium4 or on a properly emulated one, not
in a chroot.
> using java 11 and javac 11 on pentium4 works..
why not simply pin the java version to 11, then?
When installing the i686 version of glibc and openjdk8 there is no segfault!
So this sounds more like a new glibc and optimization triggering something in java..
Actually also original SUN java 7 segfaults with this glibc.
Rebuilding glibc didn't help. So I'm pretty sure it's some protection thingy
getting into the way of old Java JDKs (because they always pushed their limits
and did funny tricks in the past).
Erich Eckner,
Ant is still broken with pentium4 build of java 11 (i686 works).
from the chat protocol: https://mirror.archlinux32.org/irc-logs/%23archlinux32/2019-06-19.html#19:39:59
See: https://src.fedoraproject.org/rpms/glibc/blob/master/f/glibc.spec
Thanks slacka123 for the hint. This seems to solve the java/javac crashes.
It's fixed now in staging and will soon hop into testing.
The segfaults persist through all pentium4 versions of the openjdk.
Additionally now also the 7 version of i686 and pentium4 are segfaulting.
jkd7 also cannot find libattr:
https://patchwork.openembedded.org/patch/110857/
On 64-bit it complains about ant:
error: target not found: apache-ant>=1.8.1
flagged out-of-date upstream, unusable currently for bootstrapping.
https://bugs.archlinux.org/task/63430
configure: Found potential Boot JDK using java© in PATH
penjdk is incorrect JDK version (#); ignoring
penjdk)
penjdk is incorrect JDK version (#); ignoring
configure: Potential Boot JDK found at /usr/lib/jvm/java-
configure: (Your Boot JDK must be version 7 or 8)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/java-
configure: Potential Boot JDK found at /usr/lib/jvm/java-
configure: (Your Boot JDK must be version 7 or 8)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/default-runtime)
configure: Potential Boot JDK found at /usr/lib/jvm/default-runtime is incorrect JDK version (#); ignoring
configure: (Your Boot JDK must be version 7 or 8)
configure: Found potential Boot JDK using well-known locations (in /usr/lib/jvm/default)
configure: Potential Boot JDK found at /usr/lib/jvm/default is incorrect JDK version (#); ignoring
configure: (Your Boot JDK must be version 7 or 8)
configure: Could not find a valid Boot JDK.
configure: This might be fixed by explicitely setting –with-boot-jdk
configure: error: Cannot continue
configure exiting with result code 1
building on i686 (where openjdk8 still works) and using makepkg.conf with pentium4
cflags gives a package with wrong architecture though, but running in a pentium4
chroot if installed.
Though when I try to rebuild it with the 'cross-compiled' package in a pentium4
chroot, I get:
Inside I have a hs_err_pid3361.log showing again the darn SI_KERNEL SIGSEGV.
This problem is over my head (and skills).
This sounds interesting:
https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3533
related question: is -march=pentium4 changing the stack layout?
Should we force stack alignment globally for all libraries which could potentially be
called from java with -mstack-alignment=16? This could break havock on other software..
Also interesting:
https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3533
Also: -mincoming-stack-boundary=2
https://bugs.gentoo.org/attachment.cgi?id=522650&action=diff
So -mstackrealign in the glibc flags helps to realign the stack, so that 4 and 16 byte stacks
penjdk), then see if it can rebuild itself in a pentium4
can coexist, but Java generates it's own executable code, which doesn't respect that?
Why should -mincoming-stack-boundary=2 help then?
I'll test again a double compilation via working i686 chroot to pentium4 (with -mincoming-stack-boundary=2 in the PKGBUILD of java
chroot.
Apparently this helps, thanks to the Gentoo guys.
Now to jdk10, jdk11 and jdk12 (weirdly enough there is no jdk9?).
a working JDK8 for pentium4 hit staging. now for the other versions..
This helps against GOT/PLT errors:
needs: