• Status New
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Packages → Packages: Stable
  • Assigned To No-one
  • 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

FS#75 - openjdk8 breaks with march=pentium4 optimization

This blocks ant, needed for building libreoffice.

Admin
Andreas Baumann commented on 18.05.2019 18:18

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

Admin
Andreas Baumann commented on 18.05.2019 18:19

well. Java errors, hard to debug..

Admin
Andreas Baumann commented on 18.05.2019 18:21

Installing the i686 version in the pentium4 chroot also segfaults..

Admin
Andreas Baumann commented on 18.05.2019 18:25

Java 686 doesn't segfault on a real i686 installed system. So, I fear, some library in pentium4
is causing java to segfault.

Admin
Andreas Baumann commented on 18.05.2019 18:36

Event: 0.057 Thread 0xf6b07c00 Exception <a> (0xd7b86ea0) thrown at [/build/java8-openjdk/src/jdk8u-jdk8u212-b01/hotspot/src/share/vm/prims/jni.cp
Event: 0.057 Thread 0xf6b07c00 Exception </a><a> (0xd7b87170) thrown at [/build/java8-openjdk/src/jdk8u-jdk8u212-b01/hotspot/src/share/vm/prims/jni.cpp, line 4012]
Event: 0.231 Thread 0xf6b07c00 Exception </a><a> (0xd7cc0498) thrown at [/build/java8-openjdk/src/jdk8u-jdk8u212-b01/hotspot/src/share/vm/prims/jvm.cpp, line 1502]

mmh. this sounds quite internal..
</a>

Admin
Andreas Baumann commented on 18.05.2019 18:50

pentium$:
javac -version
javac 11.0.3

why is libreoffice built with java 8?

Admin
Andreas Baumann commented on 18.05.2019 19:00

weird: on my pentium4 test machine with jdk 8 and 11 installed, I can switch to java 8
and everything is fine.

Admin
Andreas Baumann commented on 18.05.2019 19:03

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).

Admin
Andreas Baumann commented on 18.05.2019 19:07

using java 11 and javac 11 on pentium4 works..

Admin
Andreas Baumann commented on 18.05.2019 19:08

..and now we get to "find the 10 differences in this picture". :-)

Admin
Andreas Baumann commented on 18.05.2019 19:14

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.

Admin
Erich Eckner commented on 22.05.2019 04:34

&gt; using java 11 and javac 11 on pentium4 works..

why not simply pin the java version to 11, then?

Admin
Andreas Baumann commented on 06.06.2019 18:19

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..

Admin
Andreas Baumann commented on 07.06.2019 16:54

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).

Luke commented on 18.06.2019 18:27

Erich Eckner,
Ant is still broken with pentium4 build of java 11 (i686 works).

$ archlinux-java status
Available Java environments:
  java-11-openjdk (default)
Admin
Andreas Baumann commented on 19.06.2019 17:57
19:40 &lt; slacka123&gt; should use "-march=i686 -msse2 -mtune=generic -mfpmath=sse -mstackrealign" instead?
19:54 &lt; slacka123&gt; Yes, it does - https://bugs.documentfoundation.org/show_bug.cgi?id=108619 
19:54 &lt; phrik&gt; Title: 108619 – (32bitjavacrash) Java Crash on x86 in jfw_plugin_startJavaVirtualMachine 
               w/ recent linux kernels (at bugs.documentfoundation.org)
19:55 &lt; slacka123&gt; Fedora 30 also needs that kernel parameter, "stack_guard_gap=1" to run/build 
                   LibreOffice and other java apps
...
19:56 &lt; slacka123&gt; but i686 arch32 also needs it

from the chat protocol: https://mirror.archlinux32.org/irc-logs/%23archlinux32/2019-06-19.html#19:39:59

Admin
Andreas Baumann commented on 21.06.2019 12:23

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.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing