• Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Packages → Packages: Build-list
  • 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: Arch Linux 32
Opened by Admin - 15.11.2019
Last edited by Admin - 15.11.2019

FS#75 - openjdk8/10/11/12 break with march=pentium4 optimization

Attached to Project: Archlinux32
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:

fixed for 8, 10, 11 and 12. Not for 7.

  Comments (34)
  Related Tasks (0/0)

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+0×950] __kernel_rt_sigreturn+0×0

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 08:29

See: https://src.fedoraproject.org/rpms/glibc/blob/master/f/glibc.spec 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.
Admin
Andreas Baumann commented on 11.08.2019 06:03

The segfaults persist through all pentium4 versions of the openjdk.
Additionally now also the 7 version of i686 and pentium4 are segfaulting.
Admin
Andreas Baumann commented on 11.08.2019 07:11

jkd7 also cannot find libattr:

https://patchwork.openembedded.org/patch/110857/ Admin
Andreas Baumann commented on 11.08.2019 07:13

On 64-bit it complains about ant:

error: target not found: apache-ant&gt;=1.8.1

flagged out-of-date upstream, unusable currently for bootstrapping.
Admin
Andreas Baumann commented on 11.08.2019 07:56

https://bugs.archlinux.org/task/63430 Admin
Andreas Baumann commented on 11.08.2019 07:56

configure: Found potential Boot JDK using java© in PATH
configure: Potential Boot JDK found at /usr/lib/jvm/java-8-openjdk 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/java-8-openjdk)
configure: Potential Boot JDK found at /usr/lib/jvm/java-8-openjdk 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-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
Admin
Andreas Baumann commented on 11.08.2019 18:02

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:

checking headful support… include support for both headful and headless
configure: Found potential Boot JDK using configure arguments
configure: Potential Boot JDK found at /usr/lib/jvm/java-8-openjdk is incorrect JDK version (#); ignoring
configure: (Your Boot JDK must be version 7 or 8)
configure: error: The path given by –with-boot-jdk does not contain a valid Boot JDK configure exiting with result code 1

Inside I have a hs_err_pid3361.log showing again the darn SI_KERNEL SIGSEGV.

This problem is over my head (and skills).
Admin
Andreas Baumann commented on 12.08.2019 15:26

This sounds interesting:

https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3533

related question: is -march=pentium4 changing the stack layout?
Admin
Andreas Baumann commented on 12.08.2019 15:28

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..
Admin
Andreas Baumann commented on 12.08.2019 15:28

Also interesting:

https://icedtea.classpath.org/bugzilla/show_bug.cgi?id=3533 Admin
Andreas Baumann commented on 12.08.2019 15:30

Also: -mincoming-stack-boundary=2

https://bugs.gentoo.org/attachment.cgi?id=522650&amp;action=diff Admin
Andreas Baumann commented on 12.08.2019 16:00

So -mstackrealign in the glibc flags helps to realign the stack, so that 4 and 16 byte stacks
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 java8-openjdk), then see if it can rebuild itself in a pentium4
chroot.
Admin
Andreas Baumann commented on 13.08.2019 04:48

Apparently this helps, thanks to the Gentoo guys. :-) Admin
Andreas Baumann commented on 13.08.2019 05:05

Now to jdk10, jdk11 and jdk12 (weirdly enough there is no jdk9?).
Admin
Andreas Baumann commented on 15.08.2019 07:32

a working JDK8 for pentium4 hit staging. now for the other versions..
Admin
Andreas Baumann commented on 15.08.2019 11:40

This helps against GOT/PLT errors:

if test ${CARCH} = i686 -o ${CARCH} = pentium4; then
  echo "Removing '-fno-plt' from CFLAGS and CXXFLAGS to prevent build fail with th
  _CFLAGS=${CFLAGS/-fno-plt/}
  _CXXFLAGS=${CXXFLAGS/-fno-plt/}
fi

Admin
Andreas Baumann commented on 15.08.2019 12:03

Finished building targets ‘images docs’ in configuration ‘linux-x86-normal-server-release’ find: &lt;80&gt;&lt;98&gt;../jdk10u-jdk-10.0.2+13/build/linux-i386-normal-server-release/images&lt;80&gt;&lt;99&gt;: No such file or directory
ESC[1mESC[31m==&gt; ERROR:ESC[m^OESC[1m A failure occurred in build().ESC[m^O
ESC[1m Aborting…ESC[m^O
==&gt; ERROR: Build failed, check /var/lib/archbuild/staging-i686/abaumann/build
(END)

needs:

case “${CARCH}” in

x86_64) _JARCH='x86_64';;
i486|i686|pentium4)   _JARCH='x86';;

esac

Google Cache

Closed by  Admin
15.11.2019 08:42
Reason for closing:  Fixed
Additional comments about closing:  

fixed for 8, 10, 11 and 12. Not for 7.

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing