-
Bug
-
Resolution: Fixed
-
P4
-
openjdk8u292, 11, 12, 13
-
b10
-
aarch64
-
generic
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8220537 | 12.0.2 | Fei Yang | P4 | Resolved | Fixed | b01 |
JDK-8248594 | 11.0.9-oracle | Fei Yang | P4 | Resolved | Fixed | b01 |
JDK-8220535 | 11.0.4 | Fei Yang | P4 | Resolved | Fixed | b01 |
One example:
On AArch64 LSE instructions is not supported on ARMv8 platform.
SIGILL is triggered on ARMv8 platform by the following command:
$ java -XX:+UseLSE -version
OpenJDK 64-Bit Server VM warning: UseLSE specified, but not supported on this CPU
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x0000ffff76b76088, pid=6950, tid=6951
#
# JRE version: (13.0) (build )
# Java VM: OpenJDK 64-Bit Server VM (13-internal+0-adhoc.yangfei.jdk-jdk, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# j java.lang.ThreadGroup.add(Ljava/lang/ThreadGroup;)V+0 java.base
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/yangfei/hs_err_pid6950.log
Could not load hsdis-aarch64.so; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted
Simple fix:
diff -r 1ee9149df76f src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Mon Feb 25 16:05:06 2019 -0800
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Wed Feb 27 10:44:59 2019 +0800
@@ -258,8 +258,10 @@
if (FLAG_IS_DEFAULT(UseCRC32)) {
UseCRC32 = (auxv & HWCAP_CRC32) != 0;
}
+
if (UseCRC32 && (auxv & HWCAP_CRC32) == 0) {
warning("UseCRC32 specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseCRC32, false);
}
if (FLAG_IS_DEFAULT(UseAdler32Intrinsics)) {
@@ -277,6 +279,7 @@
} else {
if (UseLSE) {
warning("UseLSE specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseLSE, false);
}
}
@@ -291,9 +294,11 @@
} else {
if (UseAES) {
warning("UseAES specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseAES, false);
}
if (UseAESIntrinsics) {
warning("UseAESIntrinsics specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
}
On AArch64 LSE instructions is not supported on ARMv8 platform.
SIGILL is triggered on ARMv8 platform by the following command:
$ java -XX:+UseLSE -version
OpenJDK 64-Bit Server VM warning: UseLSE specified, but not supported on this CPU
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0x0000ffff76b76088, pid=6950, tid=6951
#
# JRE version: (13.0) (build )
# Java VM: OpenJDK 64-Bit Server VM (13-internal+0-adhoc.yangfei.jdk-jdk, mixed mode, sharing, tiered, compressed oops, g1 gc, linux-aarch64)
# Problematic frame:
# j java.lang.ThreadGroup.add(Ljava/lang/ThreadGroup;)V+0 java.base
#
# No core dump will be written. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# /home/yangfei/hs_err_pid6950.log
Could not load hsdis-aarch64.so; library not loadable; PrintAssembly is disabled
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
#
Aborted
Simple fix:
diff -r 1ee9149df76f src/hotspot/cpu/aarch64/vm_version_aarch64.cpp
--- a/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Mon Feb 25 16:05:06 2019 -0800
+++ b/src/hotspot/cpu/aarch64/vm_version_aarch64.cpp Wed Feb 27 10:44:59 2019 +0800
@@ -258,8 +258,10 @@
if (FLAG_IS_DEFAULT(UseCRC32)) {
UseCRC32 = (auxv & HWCAP_CRC32) != 0;
}
+
if (UseCRC32 && (auxv & HWCAP_CRC32) == 0) {
warning("UseCRC32 specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseCRC32, false);
}
if (FLAG_IS_DEFAULT(UseAdler32Intrinsics)) {
@@ -277,6 +279,7 @@
} else {
if (UseLSE) {
warning("UseLSE specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseLSE, false);
}
}
@@ -291,9 +294,11 @@
} else {
if (UseAES) {
warning("UseAES specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseAES, false);
}
if (UseAESIntrinsics) {
warning("UseAESIntrinsics specified, but not supported on this CPU");
+ FLAG_SET_DEFAULT(UseAESIntrinsics, false);
}
}
- backported by
-
JDK-8220535 aarch64: SIGILL triggered when specifying unsupported hardware features
- Resolved
-
JDK-8220537 aarch64: SIGILL triggered when specifying unsupported hardware features
- Resolved
-
JDK-8248594 aarch64: SIGILL triggered when specifying unsupported hardware features
- Resolved