C2 compiler gets SIGILL/ILL_ILLOPC
John Neffenger
john at status6.com
Sun Feb 21 16:45:26 UTC 2021
On 2/19/21 1:14 AM, Matthias Klose wrote:
> yes, but apparently JDK-8222825 is missing from jdk11u. Attaching a backport for
> that. Does this look reasonable?
I tested the back-ported patch, and Matthias asked me to post my results
to the public mailing list. I tested the build on Ubuntu 14.04 LTS, the
most recent release that can still run on my old ARM Cortex-A8 device.
Note: A long power outage prevented me from running the overnight test,
but I'll try again today now that I have electricity again.
Below are the results I sent to Matthias, minus the large HotSpot error
log attachments.
> see https://people.debian.org/~doko/tmp/trusty-armhf/
Looks good to me! Thank you, Matthias. It's great to see Ubuntu
back-porting fixes like this to OpenJDK 11. What follows are the details
of my tests.
My first test was to build and run the project below, which contains two
simple "Hello World" programs -- a console application and a Java Swing
application:
Hello Java!
https://github.com/jgneff/hello-java
First, I reproduced the error in OpenJDK 11 using the following two builds:
AdoptOpenJDK OpenJDK 11 for Linux on arm32
https://adoptopenjdk.net/releases.html
BellSoft OpenJDK 11 for Linux on 32-bit ARM (Standard JDK)
https://bell-sw.com/pages/downloads/#/java-11-lts
Both builds failed to compile the programs. When I compiled on another
system and copied over the JAR files, both builds ran the console
application fine but failed to run the Java Swing application. I
attached the HotSpot crash logs to this message in case we ever want to
verify that a PLDW instruction caused the ILL_ILLOPC error.
For example, compiling with the BellSoft build:
------------------------------------------------------------------------
$ export JAVA_HOME=$HOME/opt/jdk-11.0.10
$ make
mkdir -p dist
/home/ubuntu/opt/jdk-11.0.10/bin/javac --release 11 -d build/classes
--module-source-path "./*/src/main/java" --module org.status6.hello.world
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x2bc4c4a0, pid=4911, tid=4912
# ...
------------------------------------------------------------------------
And running with the AdoptOpenJDK build:
------------------------------------------------------------------------
$ export JAVA_HOME=$HOME/opt/jdk-11.0.10+9
$ make run
/home/ubuntu/opt/jdk-11.0.10+9/bin/java -jar dist/hello-world-1.0.0.jar
Hello World!
/home/ubuntu/opt/jdk-11.0.10+9/bin/java -jar dist/hello-swing-1.0.0.jar
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x2bc5f34c, pid=5525, tid=5526
# ...
------------------------------------------------------------------------
Both of these builds of OpenJDK could build and run the sample programs
when I added the "-XX:-AssumeMP" workaround to all of the JDK tools in
the Makefile.
I installed the four Debian packages that you built as follows:
$ sudo dpkg -i openjdk-11-jre-headless_11.0.11+3-3_armhf.deb
$ sudo dpkg -i openjdk-11-jdk-headless_11.0.11+3-3_armhf.deb
$ sudo dpkg -i openjdk-11-jre_11.0.11+3-3_armhf.deb
$ sudo dpkg -i openjdk-11-jdk_11.0.11+3-3_armhf.deb
Using those packages, everything built and ran just fine, with no need
for the "-XX:-AssumeMP" workaround:
------------------------------------------------------------------------
$ export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armhf
$ make
mkdir -p dist
/usr/lib/jvm/java-11-openjdk-armhf/bin/javac --release 11 -d
build/classes --module-source-path "./*/src/main/java" --module
org.status6.hello.world
/usr/lib/jvm/java-11-openjdk-armhf/bin/jar --create --file
dist/hello-world-1.0.0.jar --main-class org.status6.hello.world.Hello
--module-version 1.0.0 -C build/classes/org.status6.hello.world .
/usr/lib/jvm/java-11-openjdk-armhf/bin/javac --release 11 -d
build/classes --module-source-path "./*/src/main/java" --module
org.status6.hello.swing
/usr/lib/jvm/java-11-openjdk-armhf/bin/jar --create --file
dist/hello-swing-1.0.0.jar --main-class org.status6.hello.swing.Hello
--module-version 1.0.0 -C build/classes/org.status6.hello.swing .
$ make run
/usr/lib/jvm/java-11-openjdk-armhf/bin/java -jar dist/hello-world-1.0.0.jar
Hello World!
/usr/lib/jvm/java-11-openjdk-armhf/bin/java -jar dist/hello-swing-1.0.0.jar
Hello World!
Hello World!
------------------------------------------------------------------------
I then ran the JavaFX animation program from the following project using
the new packages:
JavaFX on E-Paper
https://github.com/jgneff/epd-javafx
And it works great:
------------------------------------------------------------------------
$ sudo bin/run.sh --pattern=3 --loops=0
openjdk 11.0.11-ea 2021-04-20
OpenJDK Runtime Environment (build 11.0.11-ea+3-post-Ubuntu-3)
OpenJDK Server VM (build 11.0.11-ea+3-post-Ubuntu-3, mixed mode)
FINE: EPD system properties: {monocle.epd.waveformMode=4}
FINE: Frame buffer geometry: 800 600 800 640 32
FINE: Frame buffer rgba: 8/16,8/8,8/0,8/24
FINE: Frame buffer grayscale: 0
FINE: Native screen geometry: 800 px x 600 px x 32 bpp
FINE: Mapping frame buffer: 1,920,000 bytes
FINE: Using native cursor: SoftwareCursor
...
------------------------------------------------------------------------
I'll let the animation program run overnight, just to be sure.
By the way, as I suspected, I cannot reproduce the error on my Raspberry
Pi 2 Model B Rev 1.1 with its ARM Cortex-A7 processor. I can't find
anything definitive, but it seems that only the Cortex-A8 is missing the
Multiprocessor (MP) Extensions with the PLDW instruction.
Thank you again,
John
More information about the aarch32-port-dev
mailing list