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

8315369: [JVMCI] failure to attach to a libgraal isolate during shutdown should not be fatal #15542

Closed
wants to merge 2 commits into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Sep 1, 2023

This PR moves handling of errors in some JVMCIEnv constructors to the caller. This avoids VM crashes in contexts where errors are recoverable, such as the problem of running out of file descriptors described in the JBS issue for this PR.


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-8315369: [JVMCI] failure to attach to a libgraal isolate during shutdown should not be fatal (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 15542

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Sep 1, 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.

@dougxc
Copy link
Member Author

dougxc commented Sep 1, 2023

I have tested this fix with libgraal and it fixes the ruby crash mentioned in https://bugs.openjdk.org/browse/JDK-8315369.

@openjdk
Copy link

openjdk bot commented Sep 1, 2023

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

  • graal
  • hotspot-compiler

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-compiler hotspot-compiler-dev@openjdk.org labels Sep 1, 2023
@dougxc dougxc marked this pull request as ready for review September 1, 2023 17:09
@openjdk openjdk bot added the rfr Pull request is ready for review label Sep 1, 2023
@mlbridge
Copy link

mlbridge bot commented Sep 1, 2023

Webrevs

Copy link
Contributor

@tkrodriguez tkrodriguez left a comment

Choose a reason for hiding this comment

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

looks ok to me.

@@ -44,6 +44,7 @@ class JNIAccessMark : public StackObj {
inline JNIAccessMark(JVMCIEnv* jvmci_env, JavaThread* thread=JavaThread::current()) :
_ttnfv(thread), _hm(thread) {
_env = jvmci_env->_env;
assert(jvmci_env->init_error() == JNI_OK, "invalid JVMCIEnv (err: %d)", jvmci_env->init_error());
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe this should be a guarantee?

@openjdk
Copy link

openjdk bot commented Sep 4, 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:

8315369: [JVMCI] failure to attach to a libgraal isolate during shutdown should not be fatal

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

  • 3094fd1: 8314662: jshell shows duplicated signatures of javap
  • 0d52c82: 8310220: IGV: dump graph after each IGVN step at level 4
  • adfc1d6: 8313323: javac -g on a java file which uses unnamed variable leads to ClassFormatError when launching that class
  • 2dc930d: 8314997: Missing optimization opportunities due to missing try_clean_mem_phi() calls
  • ab12c5d: 8315549: CITime misreports code/total nmethod sizes
  • ba8d5c2: 8315582: Exclude compiler/codecache/CodeCacheFullCountTest.java with Xcomp
  • 75d4ac2: 8311775: [TEST] duplicate verifyHeapDump in several tests
  • 4f90aba: 8311585: Add JRadioButtonMenuItem to bug8031573.java
  • 2a11bc4: 8314837: 5 compiled/codecache tests ignore VM flags
  • 2f7c65e: 8303427: Fixpath confused if unix root contains "/jdk"

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

dougxc commented Sep 4, 2023

Thanks for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Sep 4, 2023

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

  • d1cabe4: 8315566: [JVMCI] deadlock in JVMCI startup when bad option specified
  • 94a74a0: 8315534: Incorrect warnings about implicit annotation processing
  • 84425a6: 8315452: Erroneous AST missing modifiers for partial input
  • 3094fd1: 8314662: jshell shows duplicated signatures of javap
  • 0d52c82: 8310220: IGV: dump graph after each IGVN step at level 4
  • adfc1d6: 8313323: javac -g on a java file which uses unnamed variable leads to ClassFormatError when launching that class
  • 2dc930d: 8314997: Missing optimization opportunities due to missing try_clean_mem_phi() calls
  • ab12c5d: 8315549: CITime misreports code/total nmethod sizes
  • ba8d5c2: 8315582: Exclude compiler/codecache/CodeCacheFullCountTest.java with Xcomp
  • 75d4ac2: 8311775: [TEST] duplicate verifyHeapDump in several tests
  • ... and 3 more: https://git.openjdk.org/jdk/compare/e9e0c5699b8d0fbd1bd3a6caa3e0182a2e5bdda3...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Sep 4, 2023

@dougxc Pushed as commit d7e4087.

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

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-compiler hotspot-compiler-dev@openjdk.org integrated Pull request has been integrated
2 participants