Skip to content

Conversation

@mhaessig
Copy link
Contributor

@mhaessig mhaessig commented Nov 3, 2025

Problem Analysis

The stress test compiler/valhalla/inlinetypes/TestAcmpWithUnstableIf.java, which uses the StressUnstableIfTrap flag, failed intermittently with the assert "no node with a side effect" during C2 compilation. I tracked down the origin of the failure to the raw store of the unstable if trap stress counter that was missing a memory edge to the backedge phi and thus had no side effect in the loop, which lead to the aforementioned assert. During parsing, the missing memory edge gets discarded with as vestigial parsing state when do_if() ends up stopped(). However, the effect of the stress counter should still be wired back into the backedge since it will be incremented in the next iteration.

Patch Description

To prevent the stress counters memory state being lost to PreserveJVMState, I pass it to the caller over an out-parameter and set_memory with that node, similar to what is already done for control. This is only necessary for the two last invocation of do_if() in do_acmp() where they are actually allowed to trap. Further, this PR reenables StressUnstableIfTrap in compiler/valhalla/inlinetypes/TestAcmpWithUnstableIf.java.

Testing

  • tier1,tier2,tier3 plus internal stress testing

Progress

  • Change must not contain extraneous whitespace

Issue

  • JDK-8367244: [lworld] C2 compilation fails with assert "no node with a side effect" (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1716

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/valhalla/pull/1716.diff

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 3, 2025

👋 Welcome back mhaessig! A progress list of the required criteria for merging this PR into lworld 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 Nov 3, 2025

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

8367244: [lworld] C2 compilation fails with assert "no node with a side effect"

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 2 new commits pushed to the lworld branch:

  • 7b5f105: 8370484: [lworld] PhaseOutput::FillLocArray asserts with Unexpected type: anyptr
  • 88f413d: [lworld] Don't run TestMethodHandles.java with -Xcomp

Please see this link for an up-to-date comparison between the source branch of this pull request and the lworld 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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change.

➡️ To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@mhaessig mhaessig marked this pull request as ready for review November 3, 2025 14:30
@openjdk openjdk bot added ready Pull request is ready to be integrated rfr Pull request is ready for review labels Nov 3, 2025
@mlbridge
Copy link

mlbridge bot commented Nov 3, 2025

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

1 participant