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

8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails #16086

Closed
wants to merge 2 commits into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Oct 6, 2023

Creating a new libgraal isolate can fail for a number of reasons. Currently, all that one sees on such a failure is a numeric error code. For example:

   2096 20291       4       java.lang.CharacterData::of (136 bytes)
   2096 20291       4       java.lang.CharacterData::of (136 bytes)   COMPILE SKIPPED: Error attaching to libjvmci (err: -1000000024)

Native Image has been enhanced to return an error message along with an error code by a non-standard _createvm_errorstr argument passed to the CreateJavaVM JNI invocation interface function:

 |--------------------|-----------------------------------------------------------------------------------|
 | _createvm_errorstr | extraInfo is a "const char**" value.                                              |
 |                    | If CreateJavaVM returns non-zero, then extraInfo is assigned a newly malloc'ed    |
 |                    | 0-terminated C string describing the error if a description is available,         |
 |                    | otherwise extraInfo is set to null.                                               |
 |--------------------|-----------------------------------------------------------------------------------|

This PR updates JVMCI to take advantage of this Native Image enhancement.

This is sample -XX:+PrintCompilation output from testing this PR on libgraal:

   2096 20291       4       java.lang.CharacterData::of (136 bytes)
   2096 20291       4       java.lang.CharacterData::of (136 bytes)   COMPILE SKIPPED: Error attaching to libjvmci (err: -1000000024, Image page size is incompatible with run-time page size. Rebuild image with -H:PageSize=[pagesize] to set appropriately.)

Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails (Enhancement - P4)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/16086/head:pull/16086
$ git checkout pull/16086

Update a local copy of the PR:
$ git checkout pull/16086
$ git pull https://git.openjdk.org/jdk.git pull/16086/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16086

View PR using the GUI difftool:
$ git pr show -t 16086

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/16086.diff

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 6, 2023

👋 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.

@openjdk
Copy link

openjdk bot commented Oct 6, 2023

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

  • graal
  • hotspot

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

@openjdk openjdk bot added graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Oct 6, 2023
@dougxc dougxc marked this pull request as ready for review October 7, 2023 08:37
@openjdk openjdk bot added the rfr Pull request is ready for review label Oct 7, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 7, 2023

Webrevs

Copy link
Member

@TobiHartmann TobiHartmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable to me.

@openjdk
Copy link

openjdk bot commented Oct 23, 2023

@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:

8317689: [JVMCI] include error message when CreateJavaVM in libgraal fails

Reviewed-by: phofer, thartmann, never

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 224 new commits pushed to the master branch:

  • 69c0ae2: 8318124: JFR: Rewrite instrumentation to use Class-File API
  • c1aeac7: 8318445: More broken bailout chains in C2
  • d888b26: 8318071: IgnoreUnrecognizedVMOptions flag still causes failure in ArchiveHeapTestClass
  • bea2d48: 8312475: org.jline.util.PumpReader signed byte problem
  • 9f767aa: 8318109: Writing JFR records while a CHT has taken its lock asserts in rank checking
  • bd22d23: 8318027: Support alternative name to jdk.internal.vm.compiler
  • c2efd77: 8295795: hsdis does not build with binutils 2.39+
  • 99de9bb: 8317807: JAVA_FLAGS removed from jtreg running in JDK-8317039
  • 704c6ea: 8303525: Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java
  • 7c0a828: 8318649: G1: Remove unimplemented HeapRegionRemSet::add_code_root_locked
  • ... and 214 more: https://git.openjdk.org/jdk/compare/6c6beba2569a2f9f3fd5d6988360ffd8680de821...master

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 Pull request is ready to be integrated label Oct 23, 2023
@dougxc
Copy link
Member Author

dougxc commented Oct 24, 2023

Thanks for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Oct 24, 2023

Going to push as commit 8879c78.
Since your change was applied there have been 246 commits pushed to the master branch:

  • f9795d0: 8318222: RISC-V: C2 CmpU3
  • d1077d6: 8316046: x64 platforms unecessarily save xmm16-31 when UseAVX >= 3
  • 21d8a47: 8318701: Fix copyright year
  • d4b7612: 8318240: [AIX] Cleaners.java test failure
  • bf1a14e: 8316470: Incorrect error location for "invalid permits clause" depending on file order
  • 5224e97: 8293713: java/net/httpclient/BufferingSubscriberTest.java fails in timeout, blocked in submission publisher
  • 9bfa082: 8318646: Integer#parseInt("") throws empty NumberFormatException message
  • 3f446c5: 8318528: Rename TestUnstructuredLocking test
  • 0baa9ec: 8318474: Fix memory reporter for thread_count
  • 4a16d11: 8318455: Fix the compiler/sharedstubs/SharedTrampolineTest.java and SharedStubToInterpTest.java
  • ... and 236 more: https://git.openjdk.org/jdk/compare/6c6beba2569a2f9f3fd5d6988360ffd8680de821...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Oct 24, 2023
@openjdk openjdk bot closed this Oct 24, 2023
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Oct 24, 2023
@openjdk
Copy link

openjdk bot commented Oct 24, 2023

@dougxc Pushed as commit 8879c78.

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

@dougxc dougxc deleted the JDK-8317689 branch August 20, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
graal graal-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated
Development

Successfully merging this pull request may close these issues.

4 participants