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

8270886: Crash in PhaseIdealLoop::verify_strip_mined_scheduling #4911

Closed
wants to merge 3 commits into from

Conversation

rwestrel
Copy link
Contributor

@rwestrel rwestrel commented Jul 27, 2021

The crash occurs because an OuterStripMinedLoopEnd has only a single
projection. The root cause is that an IfNode has a single
projection. When the condition of that If constant folds, the IfNode
ends up with no use which causes it to be removed. The
OuterStripMinedLoopEnd projection is removed as a consequence.

When the If is constructed, it does have 2 projections. One of the
projections lead to an infinite loop. That infinite loop has a
safepoint node that's input to the Root node. When
remove_root_to_sfpts_edges() executes in Compile::Optimize(), that
edge is removed. But because PhaseRenumberLive runs next (a subclass
of PhaseRemoveUseless), the infinite loop is removed.

The fix is to simply move the call to remove_root_to_sfpts_edges()
after PhaseRemoveUseless.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8270886: Crash in PhaseIdealLoop::verify_strip_mined_scheduling

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/4911/head:pull/4911
$ git checkout pull/4911

Update a local copy of the PR:
$ git checkout pull/4911
$ git pull https://git.openjdk.java.net/jdk pull/4911/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 4911

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/4911.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Jul 27, 2021

👋 Welcome back roland! 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 Jul 27, 2021

@rwestrel The following label will be automatically applied to this pull request:

  • hotspot-compiler

When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command.

@openjdk openjdk bot added the hotspot-compiler hotspot-compiler-dev@openjdk.org label Jul 27, 2021
@openjdk openjdk bot added the rfr Pull request is ready for review label Jul 27, 2021
@mlbridge
Copy link

mlbridge bot commented Jul 27, 2021

Webrevs

// safepoints
remove_root_to_sfpts_edges(igvn);

// Perform escape analysis
Copy link
Contributor

Choose a reason for hiding this comment

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

Indent is wrong for this line. Please, fix it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

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. What testing you did?

@rwestrel
Copy link
Contributor Author

Looks good. What testing you did?

Thanks for the review.
hotspot/jtreg/compiler hotspot/jtreg/gc hotspot/jtreg/runtime jdk/java/lang jdk/java/util jtreg tests with -Xcomp -XX:CompileThreshold=100
hotspot/jtreg/compiler with no extra opton
some CTW testing.

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 Jul 28, 2021

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

8270886: Crash in PhaseIdealLoop::verify_strip_mined_scheduling

Reviewed-by: kvn, thartmann

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

  • a0504cf: Merge
  • 20d2dc1: 8271403: mark hotspot runtime/memory tests which ignore external VM flags
  • e593e3d: 8271402: mark hotspot runtime/os tests which ignore external VM flags
  • 7bf72ce: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java
  • 6878b05: 8271251: JavaThread::java_suspend() fails with "fatal error: Illegal threadstate encountered: 6"
  • c8ae7e5: 8271174: runtime/ClassFile/UnsupportedClassFileVersion.java can be run in driver mode
  • 5fcf720: 8271352: Extend jcc erratum mitigation to additional processors
  • 6e1da64: 8270908: TestParallelRefProc fails on single core machines
  • 2ec45dc: 8225082: Remove IdenTrust certificate that is expiring in September 2021
  • 25f00d7: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/fb85960015dfbd8e1d95d5fd7fdb65819828a317...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 Jul 28, 2021
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.

@rwestrel
Copy link
Contributor Author

@vnkozlov @TobiHartmann thanks for the reviews.

@rwestrel
Copy link
Contributor Author

/integrate

@openjdk
Copy link

openjdk bot commented Jul 29, 2021

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

  • a0504cf: Merge
  • 20d2dc1: 8271403: mark hotspot runtime/memory tests which ignore external VM flags
  • e593e3d: 8271402: mark hotspot runtime/os tests which ignore external VM flags
  • 7bf72ce: 8271412: ProblemList javax/sound/midi/Sequencer/Looping.java
  • 6878b05: 8271251: JavaThread::java_suspend() fails with "fatal error: Illegal threadstate encountered: 6"
  • c8ae7e5: 8271174: runtime/ClassFile/UnsupportedClassFileVersion.java can be run in driver mode
  • 5fcf720: 8271352: Extend jcc erratum mitigation to additional processors
  • 6e1da64: 8270908: TestParallelRefProc fails on single core machines
  • 2ec45dc: 8225082: Remove IdenTrust certificate that is expiring in September 2021
  • 25f00d7: 8269851: OperatingSystemMXBean getProcessCpuLoad reports incorrect process cpu usage in containers
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/fb85960015dfbd8e1d95d5fd7fdb65819828a317...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jul 29, 2021
@openjdk openjdk bot added integrated Pull request has been integrated and removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jul 29, 2021
@openjdk
Copy link

openjdk bot commented Jul 29, 2021

@rwestrel Pushed as commit 6afcf5f.

💡 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 integrated Pull request has been integrated
3 participants