Skip to content

Conversation

@dougxc
Copy link
Member

@dougxc dougxc commented Mar 3, 2023

JDK-8297431 added code for special handling of OutOfMemoryError when translating an exception between libjvmci and HotSpot[1].
Unfortunately, this code was deleted by JDK-8298099 when moving the exception translation mechanism to VMSupport[2].
This causes the VM to crash when an OOME occurs while translating an exception from HotSpot to libjvmci.
This PR revives the deleted code.

This bug was found by running test/jdk/java/util/concurrent/locks/Lock/OOMEInAQS.java on libgraal. The fix now makes the test pass.

Note that the code modified in src/java.base/share/classes/jdk/internal/vm/VMSupport.java is JVMCI specific and was original added by JDK-8298099.

[1] 952e100#diff-4d3a3b7e7e12e1d5b4cf3e4677d9e0de5e9df3bbf1bbfa0d8d43d12098d67dc4R222-R234
[2] 8b69a2e#diff-7292551772c27b7152a3333f03cbbad90a897c5e37c6a97d4026be835e6d8fe1R121-R125


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-8303577: [JVMCI] OOME causes crash while translating exceptions

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 12857

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

Using diff file

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

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 3, 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 Mar 3, 2023

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

  • core-libs
  • 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 hotspot hotspot-dev@openjdk.org core-libs core-libs-dev@openjdk.org labels Mar 3, 2023
@dougxc dougxc marked this pull request as ready for review March 3, 2023 17:54
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 3, 2023
@mlbridge
Copy link

mlbridge bot commented Mar 3, 2023

Webrevs

Copy link
Contributor

@vnkozlov vnkozlov left a comment

Choose a reason for hiding this comment

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

Good.

@openjdk
Copy link

openjdk bot commented Mar 3, 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:

8303577: [JVMCI] OOME causes crash while translating exceptions

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

  • 877ab65: 8303264: Refactor nsk/stress/strace to extract shared and remove redundant code
  • ae8730f: 8303486: [REDO] Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.
  • 5977f26: 8303604: Passing by-value structs whose size is not power of 2 doesn't work on all platforms (mainline)
  • dccfe8a: 8303582: Reduce duplication in jdk/java/foreign tests
  • 8e20145: 8300654: Remove JVMFlag::flag_error_str as it is unused
  • bdffe46: 8301222: Generalize check_release_entry in OopStorage
  • ec4e8aa: 8303244: G1: call CardTable::clear_MemRegion directly
  • 5753ab5: 8297454: javax/swing/JComponent/7154030/bug7154030.java failed with "Exception: Failed to show opaque button"
  • fa1cebe: 8303266: Prefer ArrayList to LinkedList in JImageTask
  • 5f153e0: 8302780: Add support for vectorized arraycopy GC barriers
  • ... and 22 more: https://git.openjdk.org/jdk/compare/c6de66c03f691469ff26c14923bf21bdefd5ae72...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 Mar 3, 2023
@dougxc
Copy link
Member Author

dougxc commented Mar 6, 2023

Thanks for the reviews @vnkozlov and @tkrodriguez .

/integrate

@openjdk
Copy link

openjdk bot commented Mar 6, 2023

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

  • 877ab65: 8303264: Refactor nsk/stress/strace to extract shared and remove redundant code
  • ae8730f: 8303486: [REDO] Update ProcessTools.startProcess(...) to exit early if process exit before linePredicate is printed.
  • 5977f26: 8303604: Passing by-value structs whose size is not power of 2 doesn't work on all platforms (mainline)
  • dccfe8a: 8303582: Reduce duplication in jdk/java/foreign tests
  • 8e20145: 8300654: Remove JVMFlag::flag_error_str as it is unused
  • bdffe46: 8301222: Generalize check_release_entry in OopStorage
  • ec4e8aa: 8303244: G1: call CardTable::clear_MemRegion directly
  • 5753ab5: 8297454: javax/swing/JComponent/7154030/bug7154030.java failed with "Exception: Failed to show opaque button"
  • fa1cebe: 8303266: Prefer ArrayList to LinkedList in JImageTask
  • 5f153e0: 8302780: Add support for vectorized arraycopy GC barriers
  • ... and 22 more: https://git.openjdk.org/jdk/compare/c6de66c03f691469ff26c14923bf21bdefd5ae72...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 6, 2023

@dougxc Pushed as commit cac81dd.

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

@dougxc dougxc deleted the JDK-8303577 branch August 20, 2024 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

3 participants