Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8257220: [JVMCI] option validation should not result in a heavy-weight VM crash #1487

Closed
wants to merge 2 commits into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Nov 27, 2020

As a result of JDK-8253228, a heavy-weight VM crash occurs for incorrectly specified JVMCI options. For example:

> java -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI -XX:+UseJVMCICompiler -Djvmci.InitTiimer=true
Uncaught exception exiting JVMCIEnv scope entered at src/hotspot/share/jvmci/jvmciRuntime.cpp:626
java.lang.IllegalArgumentException: Could not find option jvmci.InitTiimer
Did you mean one of the following?
    jvmci.InitTimer=<value>
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime$Option.parse(jdk.internal.vm.ci/HotSpotJVMCIRuntime.java:405)
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.<init>(jdk.internal.vm.ci/HotSpotJVMCIRuntime.java:534)
at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.runtime(jdk.internal.vm.ci/HotSpotJVMCIRuntime.java:174)
at jdk.vm.ci.runtime.JVMCI.initializeRuntime(jdk.internal.vm.ci/Native Method)
at jdk.vm.ci.runtime.JVMCI.getRuntime(jdk.internal.vm.ci/JVMCI.java:65)
#
# A fatal error has been detected by the Java Runtime Environment:
#
# Internal Error (jvmciRuntime.cpp:1102), pid=55794, tid=7939
# fatal error: Fatal exception in JVMCI: Uncaught exception exiting JVMCIEnv scope entered at src/hotspot/share/jvmci/jvmciRuntime.cpp:626
#
# 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_pid55794.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)

This is too heavy-weight. This PR makes it similar to how incorrectly specified -XX options are reported:

>  java -XX:+UnlockExperimentalVMOptions -XX:+EagerJVMCI -XX:+UseJVMCICompiler -Djvmci.InitTiimer=true
Error parsing JVMCI options: Could not find option jvmci.InitTiimer
Did you mean one of the following?
    jvmci.InitTimer=<value>
Error: A fatal exception has occurred. Program will exit.

Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Testing

Linux additional Linux x64 Linux x86 Windows x64 macOS x64
Build ✔️ (8/8 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed) ✔️ (2/2 passed)
Test (tier1) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed) ✔️ (9/9 passed)

Issue

  • JDK-8257220: [JVMCI] option validation should not result in a heavy-weight VM crash

Reviewers

Download

$ git fetch https://git.openjdk.java.net/jdk pull/1487/head:pull/1487
$ git checkout pull/1487

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented Nov 27, 2020

👋 Welcome back dnsimon! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@dougxc dougxc marked this pull request as ready for review Nov 27, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 27, 2020

@dougxc The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added hotspot-compiler rfr labels Nov 27, 2020
@mlbridge
Copy link

@mlbridge mlbridge bot commented Nov 27, 2020

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Good.

@openjdk
Copy link

@openjdk openjdk bot commented Nov 27, 2020

@dougxc This change now passes all automated pre-integration checks.

ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8257220: [JVMCI] option validation should not result in a heavy-weight VM crash

Reviewed-by: kvn

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 7 new commits pushed to the master branch:

  • c2af27b: 8257148: Remove obsolete code in AWTView.m
  • 87f37aa: 8256726: Zero: print proper message in ArrayIndexOutOfBoundException
  • f4c15a9: 8256832: Zero: micro-optimize safepoint handling after JDK-8255384
  • 04eecf0: 8257233: Windows x86 build is broken by JDK-8252684
  • c93f0a0: 8252684: Move the AArch64 assember test under test/hotspot/gtest
  • 1241f80: 8196086: java/awt/image/DrawImage/IncorrectSourceOffset.java fails
  • 65137ff: 8253753: Enable default constructor warning in client modules

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Nov 27, 2020
@dougxc
Copy link
Member Author

@dougxc dougxc commented Nov 29, 2020

/integrate

@openjdk openjdk bot closed this Nov 29, 2020
@openjdk openjdk bot added integrated and removed ready rfr labels Nov 29, 2020
@openjdk
Copy link

@openjdk openjdk bot commented Nov 29, 2020

@dougxc Since your change was applied there have been 7 commits pushed to the master branch:

  • c2af27b: 8257148: Remove obsolete code in AWTView.m
  • 87f37aa: 8256726: Zero: print proper message in ArrayIndexOutOfBoundException
  • f4c15a9: 8256832: Zero: micro-optimize safepoint handling after JDK-8255384
  • 04eecf0: 8257233: Windows x86 build is broken by JDK-8252684
  • c93f0a0: 8252684: Move the AArch64 assember test under test/hotspot/gtest
  • 1241f80: 8196086: java/awt/image/DrawImage/IncorrectSourceOffset.java fails
  • 65137ff: 8253753: Enable default constructor warning in client modules

Your commit was automatically rebased without conflicts.

Pushed as commit c5d9507.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Nov 30, 2020

@dougxc I still got crash with -Xcomp:

java -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI -XX:+UseJVMCICompiler -Xcomp -version
Exception during JVMCI compiler initialization
jdk.vm.ci.common.JVMCIError: no JVMCI compiler selected: default compiler is not found
	at jdk.vm.ci.hotspot.HotSpotJVMCICompilerConfig$DummyCompilerFactory.compileMethod(jdk.internal.vm.ci@16-internal/HotSpotJVMCICompilerConfig.java:58)
	at jdk.vm.ci.hotspot.HotSpotJVMCICompilerConfig$DummyCompilerFactory.compileMethod(jdk.internal.vm.ci@16-internal/HotSpotJVMCICompilerConfig.java:48)
	at jdk.vm.ci.hotspot.HotSpotJVMCIRuntime.compileMethod(jdk.internal.vm.ci@16-internal/HotSpotJVMCIRuntime.java:807)
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/jvmciRuntime.cpp:1102
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/jdk_git/open/src/hotspot/share/jvmci/jvmciRuntime.cpp:1102), pid=3015811, tid=3015824
#  fatal error: Fatal exception in JVMCI: Exception during JVMCI compiler initialization
#
# JRE version: Java(TM) SE Runtime Environment (16.0) (fastdebug build 16-internal+0-2020-11-30-2007459.vkozlov...)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (fastdebug 16-internal+0-2020-11-30-2007459.vkozlov..., compiled mode, sharing, tiered, jvmci, jvmci compiler, compressed oops, g1 gc, linux-amd64)
# Problematic frame:
# V  [libjvm.so+0x116b950]  JVMCIRuntime::fatal_exception(JVMCIEnv*, char const*)+0x90
#
# Core dump will be written. Default location: Core dumps may be processed with "/usr/share/apport/apport %p %s %c %d %P %E" (or dumping to /jdk_git/core.3015811)
#
# An error report file with more information is saved as:
# /jdk_git/hs_err_pid3015811.log

@dougxc
Copy link
Member Author

@dougxc dougxc commented Nov 30, 2020

This PR was about improving the failure mode when incorrect -Djvmci properties are specified.
The case you are highlighting is when misconfiguration happens with JVMCI related VM flags. In this case, I guess JVMCI initialization could detect the conflict between -XX:+UseJVMCICompiler and the lack of a JVMCI compiler in the VM (now the default).

@TobiHartmann
Copy link
Member

@TobiHartmann TobiHartmann commented Dec 1, 2020

Looks related to JDK-8257471.

@vnkozlov
Copy link
Contributor

@vnkozlov vnkozlov commented Dec 1, 2020

Looks related to JDK-8257471.

Yes, it fixed this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot-compiler integrated
3 participants