RFR: 8257471: fatal error: Fatal exception in JVMCI: Exception during JVMCI compiler initialization

Doug Simon dnsimon at openjdk.java.net
Tue Dec 1 10:57:02 UTC 2020


Following on from JDK-8257220, this PR converts more JVMCI configuration error handling to avoid a hard VM crash.

For example, in a JDK build that excludes Graal, instead of:

Exception during JVMCI compiler initialization
jdk.vm.ci.common.JVMCIError: Cannot use JVMCI compiler: No JVMCI compiler found
	at jdk.vm.ci.hotspot.HotSpotJVMCICompilerConfig$DummyCompilerFactory.compileMethod(jdk.internal.vm.ci/HotSpotJVMCICompilerConfig.java:60)
	at jdk.vm.ci.hotspot.HotSpotJVMCICompilerConfig$DummyCompilerFactory.compileMethod(jdk.internal.vm.ci/HotSpotJVMCICompilerConfig.java:48)
	at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(jdk.internal.vm.ci/HotSpotJVMCIRuntime.java:799)
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (jvmciRuntime.cpp:1102), pid=62404, tid=41731
#  fatal error: Fatal exception in JVMCI: Exception during JVMCI compiler initialization
#
# JRE version: OpenJDK Runtime Environment (16.0) (build 16-internal+0-adhoc.dnsimon.open)
# Java VM: OpenJDK 64-Bit Server VM (16-internal+0-adhoc.dnsimon.open, mixed mode, tiered, jvmci, jvmci compiler, compressed oops, g1 gc, bsd-amd64)
# 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:
# /Users/dnsimon/jdk-jdk/open/hs_err_pid62404.log
#
# If you would like to submit a bug report, please visit:
#   https://bugreport.java.com/bugreport/crash.jsp
#
fish: 'build/macosx-x86_64-server-rele…' terminated by signal SIGABRT (Abort)

The VM now exits with:

Cannot use JVMCI compiler: No JVMCI compiler found

In both cases, the VM exits with non-zero exit code.

-------------

Commit messages:
 - avoid VM crash for JVMCI configuration errors

Changes: https://git.openjdk.java.net/jdk/pull/1535/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1535&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257471
  Stats: 40 lines in 3 files changed: 17 ins; 3 del; 20 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1535.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1535/head:pull/1535

PR: https://git.openjdk.java.net/jdk/pull/1535


More information about the hotspot-compiler-dev mailing list