Created attachment 1329125 [details]
Description of problem:
Executing a simple Java program that uses the Apache commons-math3 library leads to a JVM crash (segmentation fault). The crash seems to occur while JIT compiling commons-math3 classes. The bug could only be reproduced when using the Fedora package of OpenJDK.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Install JDK: sudo dnf install -y java-1.8.0-openjdk-devel
2. Get commons-math3 jar: wget https://repo1.maven.org/maven2/org/apache/commons/commons-math3/3.6.1/commons-math3-3.6.1.jar
3. Create Main.java source file (see attachements)
4. Compile program: javac -cp commons-math3-3.6.1.jar Main.java
5. Execute program: java -cp .:commons-math3-3.6.1.jar Main
The program crashes instantly with output:
# A fatal error has been detected by the Java Runtime Environment:
# SIGSEGV (0xb) at pc=0x00007f3a264d8b81, pid=805, tid=0x00007f3a0bdfd700
# JRE version: OpenJDK Runtime Environment (8.0_144-b01) (build 1.8.0_144-b01)
# Java VM: OpenJDK 64-Bit Server VM (25.144-b01 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# V [libjvm.so+0x807b81]
# Core dump written. Default location: /home/vagrant/core or core.805
# An error report file with more information is saved as:
# Compiler replay data is saved as:
# If you would like to submit a bug report, please visit:
(see attachments for core/log files)
The program runs indefinitely.
Tested on several versions of Oracle JDK without reproducing:
Created attachment 1329126 [details]
Created attachment 1329127 [details]
Created attachment 1329128 [details]
Created attachment 1329129 [details]
While this doesn't crash with oracle's jdk, I can trigger a similar failure with a custom test case. Current jdk development branch is affected. Upstream bug:
One workaround is to run with: -XX:ConditionalMoveLimit=0
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora 'version'
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.
Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.
This should be fixed with java-1.8.0-openjdk-126.96.36.199-16.b11 and better. I for one, cannot longer reproduce it using Roland's upstream reproducer:
$ rpm -q java-1.8.0-openjdk
$ java -XX:-TieredCompilation -XX:-UseOnStackReplacement -XX:-BackgroundCompilation -XX:CICompilerCount=1 -XX:CompileCommand=dontinline,TestCMovSplitThruPhi::not_inlined -XX:CompileOnly=TestCMovSplitThruPhi::test -XX:-LoopUnswitching TestCMovSplitThruPhi
CompilerOracle: dontinline TestCMovSplitThruPhi.not_inlined
$ echo $?
It crashed with SEGV with an earlier build.
Thus, I'm closing this bug with resolution current release. F27, F28, F29, F30 should all be fixed. Please re-open if you can still reproduce the issue.