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

8318940: [JVMCI] do not set HotSpotNmethod oop for a default HotSpotNmethod #16386

Closed
wants to merge 1 commit into from

Conversation

dougxc
Copy link
Member

@dougxc dougxc commented Oct 26, 2023

The code in c2v_translate for translating a HotSpotNmethod object from the libgraal heap to the HotSpot heap has a bug where it is setting the oop slot in an nmethod that ties the lifetime of the HotSpotNmethod object to the associated nmethod. Roughly speaking, when the HotSpotNmethod object becomes garbage, the nmethod is unloaded.

This relationship is only maintained for non-default HotSpotNmethods. For a default HotSpotNmethod, no such oop slot exists and so it must not be set. This PR makes that fix.


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-8318940: [JVMCI] do not set HotSpotNmethod oop for a default HotSpotNmethod (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16386

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

Using diff file

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

Webrev

Link to Webrev Comment

@dougxc dougxc marked this pull request as ready for review October 26, 2023 22:07
@bridgekeeper
Copy link

bridgekeeper bot commented Oct 26, 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 openjdk bot added the rfr Pull request is ready for review label Oct 26, 2023
@openjdk
Copy link

openjdk bot commented Oct 26, 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 Oct 26, 2023
@mlbridge
Copy link

mlbridge bot commented Oct 26, 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.

Would it be feasible to add a test?

@dougxc
Copy link
Member Author

dougxc commented Oct 30, 2023

Would it be feasible to add a test?

Not until libgraal is part of OpenJDK as this code path is specific to libgraal. There is already a test in Truffle but it did not fail since it was never run with a non-product VM (which is why I converted some assertions to guarantees).

@TobiHartmann
Copy link
Member

Okay, thanks for the clarification.

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 good to me.

@openjdk
Copy link

openjdk bot commented Oct 30, 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:

8318940: [JVMCI] do not set HotSpotNmethod oop for a default HotSpotNmethod

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

  • 1ca2cfa: 8310933: Copying from runtime image to application image should not follow symlinks
  • d3534b0: 8318677: (ch) Add implNote about minBufferCap to main variant of Channels.newWriter
  • 864a876: 8313621: test/jdk/jdk/internal/math/FloatingDecimal/TestFloatingDecimal should use RandomFactory
  • 4679e9a: 8310239: Add missing cross modifying fence in nmethod entry barriers
  • b9983c7: 8318961: increase javacserver connection timeout values and max retry attempts
  • a581897: 8317507: C2 compilation fails with "Exceeded _node_regs array"
  • c4c66ab: 8316271: JfrJvmtiAgent::retransformClasses failed: JVMTI_ERROR_FAILS_VERIFICATION
  • 88b9cda: 8318981: compiler/compilercontrol/TestConflictInlineCommands.java fails intermittent with 'disallowed by CompileCommand' missing from stdout/stderr
  • c9d23c3: 8315532: Compiler Implementation for Unnamed Variables & Patterns
  • 3934127: 8318709: Improve System.nanoTime performance on Windows
  • ... and 20 more: https://git.openjdk.org/jdk/compare/4a142c3b0831d60b3d5540f58973e8ad3d1304bf...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 30, 2023
@dougxc
Copy link
Member Author

dougxc commented Oct 31, 2023

Thanks for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Oct 31, 2023

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

  • 3e39d7b: 8319136: Skip pkcs11 tests on linux-aarch64
  • ee6f25b: 8319120: Unbound ScopedValue.get() throws the wrong exception
  • e05cafd: 8318467: [jmh] tests concurrent.Queues and concurrent.ProducerConsumer hang with 101+ threads
  • d3c3f0e: 8317951: Refactor loading of zip library to help resolve JDK-8315220
  • 576c9bc: 8318492: Http2ClientImpl should attempt to close and remove connection in stop()
  • 5411ad2: 8319106: Remove unimplemented TaskTerminator::do_delay_step
  • 75ce02f: 8318951: Additional negative value check in JPEG decoding
  • 328b381: 8009550: PlatformPCSC should load versioned so
  • d051f22: 8318410: jdk/java/lang/instrument/BootClassPath/BootClassPathTest.sh fails on Japanese Windows
  • 1ca2cfa: 8310933: Copying from runtime image to application image should not follow symlinks
  • ... and 29 more: https://git.openjdk.org/jdk/compare/4a142c3b0831d60b3d5540f58973e8ad3d1304bf...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Oct 31, 2023

@dougxc Pushed as commit 7452d50.

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

@dougxc dougxc deleted the JDK-8318940 branch August 20, 2024 06:22
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
Development

Successfully merging this pull request may close these issues.

3 participants