Skip to content

Conversation

@tkrodriguez
Copy link
Contributor

@tkrodriguez tkrodriguez commented Oct 28, 2024

Graal unit testing uses ResolvedJavaMethod.reprofile to reset profiles between test but the current code rewrites the layout in a non-atomic way which can break other readers. Instead perform the reinitialization at a safepoint which should protect all readers from seeing any transient initialization states.


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-8338007: [JVMCI] ResolvedJavaMethod.reprofile can crash ciMethodData (Bug - P4)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 21746

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Oct 28, 2024

👋 Welcome back never! 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 28, 2024

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

8338007: [JVMCI] ResolvedJavaMethod.reprofile can crash ciMethodData

Reviewed-by: dnsimon, 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 no new commits pushed to the master branch. If another commit should be pushed before you perform the /integrate command, your PR will be automatically rebased. If you prefer to avoid any potential 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 rfr Pull request is ready for review label Oct 28, 2024
@openjdk
Copy link

openjdk bot commented Oct 28, 2024

@tkrodriguez 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 28, 2024
@mlbridge
Copy link

mlbridge bot commented Oct 28, 2024

Webrevs

Copy link
Member

@dougxc dougxc left a comment

Choose a reason for hiding this comment

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

LGTM.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 28, 2024
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.

Looks fine, just one question.

temp._header._bits = (intptr_t)0;
temp._header._struct._tag = tag;
temp._header._struct._bci = bci;
_header = temp._header; // Write the cell atomtically
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we use Atomic::store() here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't think it's necessary. It just needs to write the whole value once instead of performing 3 writes of differing sizes to the same cell. The value being written is always that same as the value that was already there from the original initialization. Maybe atomically is the wrong comment. Maybe Write the cell as an intptr_t unit?

@openjdk openjdk bot removed the ready Pull request is ready to be integrated label Oct 30, 2024
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Oct 30, 2024
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.

@tkrodriguez
Copy link
Contributor Author

The automatic check failure seems to be a configuration problem with macos so that looks good. I reran the mach5 testing against latest master so it all looks good. Thanks for the reviews.

/integrate

@openjdk
Copy link

openjdk bot commented Nov 12, 2024

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

  • 81752c4: 8338565: Test crashed: assert(is_path_empty()) failed: invariant
  • e5eaa7f: 8343946: JFR: Wildcard should only work with COUNT for 'jfr view'
  • 2989d87: 8343805: RISC-V: JVM crashes on startup when disabling compressed instructions
  • 78b8015: 8338383: Implement JEP 491: Synchronize Virtual Threads without Pinning
  • 8a2a75e: 8339892: Several security shell tests don't set TESTJAVAOPTS
  • 50b6e41: 8300732: Whitebox functions for Metaspace test should use byte size
  • 67d1ef1: 8344018: Remove unlimited memory setting from TestScalarReplacementMaxLiveNodes
  • 5729227: 8343250: ArrayBlockingQueue serialization not thread safe
  • 2c1e4c3: 8343600: RISC-V: enable CRC32 intrinsic when either Zba or RVV are supported
  • 3727f40: 8343745: Only update Last Value Assertion Predicates in Loop Unrolling
  • ... and 38 more: https://git.openjdk.org/jdk/compare/2fb0c1dd62f1c690cf6b78f5cdfe18b10c991886...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 12, 2024

@tkrodriguez Pushed as commit c12b386.

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

Development

Successfully merging this pull request may close these issues.

3 participants