Skip to content

Conversation

@mgronlun
Copy link

@mgronlun mgronlun commented Mar 24, 2025

Greetings,

In debug builds, we can sometimes assert because C2's Escape Analysis does not recognize a pattern where one input of memory Phi node is a MergeMem node, and another is a RAW store.

This pattern is created by the jdk.jfr.internal.JVM.commit() intrinsic, which is inlined because of inlining JFR events, for example jdk.VirtualThreadStart.

As a result, EA complains about a strange memory graph.

Testing: jdk_jfr

Thanks
Markus


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-8352696: JFR: assert(false): EA: missing memory path (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 24192

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 24, 2025

👋 Welcome back mgronlun! 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 24, 2025

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

8352696: JFR: assert(false): EA: missing memory path

Reviewed-by: thartmann, shade, 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 19 new commits pushed to the master branch:

  • 17dc30c: 8352414: JFR: JavaMonitorDeflateEvent crashes when deflated monitor object is dead
  • 6bc4803: 8351277: Remove pipewire from AIX build
  • c94bc74: 8352595: Regression of JDK-8314999 in IR matching
  • 48fac66: 8347406: [REDO] C1/C2 don't handle allocation failure properly during initialization (RuntimeStub::new_runtime_stub fatal crash)
  • 99c8a6e: 8350463: AArch64: Add vector rearrange support for small lane count vectors
  • b2da0d3: 8352289: [macos] Review skipped tests in tools/jpackage/macosx/SigningPackage*
  • ba658a7: 8349522: AArch64: Add backend implementation for new unsigned and saturating vector operations
  • 5625b43: 8350429: runtime/NMT/CheckForProperDetailStackTrace.java should only run for debug JVM
  • 2c60fc5: 8352176: Automate setting up environment for mac signing tests
  • 6e6a39d: 8347321: [ubsan] CGGlyphImages.m:553:30: runtime error: nan is outside the range of representable values of type 'unsigned long'
  • ... and 9 more: https://git.openjdk.org/jdk/compare/a8757332667df3fe41a29a7eedb2a7234d23c2a0...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 rfr Pull request is ready for review label Mar 24, 2025
@openjdk
Copy link

openjdk bot commented Mar 24, 2025

@mgronlun 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 Mar 24, 2025
@mgronlun
Copy link
Author

/remove hotspot

@mgronlun
Copy link
Author

/label remove hotspot

@mgronlun
Copy link
Author

/label remove graal

@openjdk
Copy link

openjdk bot commented Mar 24, 2025

@mgronlun Unknown command remove - for a list of valid commands use /help.

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Mar 24, 2025
@openjdk
Copy link

openjdk bot commented Mar 24, 2025

@mgronlun
The hotspot label was successfully removed.

@openjdk openjdk bot removed the graal graal-dev@openjdk.org label Mar 24, 2025
@openjdk
Copy link

openjdk bot commented Mar 24, 2025

@mgronlun
The graal label was successfully removed.

@mgronlun
Copy link
Author

/label add hotspot-jfr

@mgronlun
Copy link
Author

/label add hotspot-compiler

@openjdk openjdk bot added the hotspot-jfr hotspot-jfr-dev@openjdk.org label Mar 24, 2025
@openjdk
Copy link

openjdk bot commented Mar 24, 2025

@mgronlun
The hotspot-jfr label was successfully added.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Mar 24, 2025
@openjdk
Copy link

openjdk bot commented Mar 24, 2025

@mgronlun
The hotspot-compiler label was successfully added.

@mlbridge
Copy link

mlbridge bot commented Mar 24, 2025

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

* @requires vm.flagless
* @requires vm.hasJFR & vm.debug
* @library /test/lib /test/jdk
* @run main/othervm jdk.jfr.jvm.TestJvmCommitIntrinsicAndEA
Copy link
Member

Choose a reason for hiding this comment

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

Maybe use -Xbatch?

Copy link
Author

Choose a reason for hiding this comment

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

What would it give?

Copy link
Author

Choose a reason for hiding this comment

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

Disabling background compilation makes it more deterministic?

Copy link
Member

Choose a reason for hiding this comment

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

Yes and you might need fewer runs to trigger compilation and wait for it to finish.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed ready Pull request is ready to be integrated labels Mar 24, 2025
@mgronlun
Copy link
Author

Looks good to me otherwise.

Thanks so much for taking a look @TobiHartmann !

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

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed ready Pull request is ready to be integrated labels Mar 24, 2025
@openjdk openjdk bot added the ready Pull request is ready to be integrated label Mar 25, 2025
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.

@mgronlun
Copy link
Author

Thank you @TobiHartmann, @shipilev and @vnkozlov for your reviews!

@mgronlun
Copy link
Author

/integrate

@openjdk
Copy link

openjdk bot commented Mar 25, 2025

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

  • c002b97: 8352676: Opensource JMenu tests - series1
  • bdcac98: 8347459: C2: missing transformation for chain of shifts/multiplications by constants
  • 3d3b782: 8352607: RISC-V: use cmove in min/max when Zicond is supported
  • 9f582e5: 8320997: RISC-V: C2 ReverseV
  • 6879c44: 8351405: G1: Collection set early pruning causes suboptimal region selection
  • aee4d69: 8348829: Remove ObjectMonitor perf counters
  • f9bcef4: 8351627: C2 AArch64 ROR/ROL: assert((1 << ((T>>1)+3)) > shift) failed: Invalid Shift value
  • 17dc30c: 8352414: JFR: JavaMonitorDeflateEvent crashes when deflated monitor object is dead
  • 6bc4803: 8351277: Remove pipewire from AIX build
  • c94bc74: 8352595: Regression of JDK-8314999 in IR matching
  • ... and 16 more: https://git.openjdk.org/jdk/compare/a8757332667df3fe41a29a7eedb2a7234d23c2a0...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Mar 25, 2025

@mgronlun Pushed as commit 721ef76.

💡 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

hotspot-compiler hotspot-compiler-dev@openjdk.org hotspot-jfr hotspot-jfr-dev@openjdk.org integrated Pull request has been integrated

Development

Successfully merging this pull request may close these issues.

4 participants