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

8262298 : G1BarrierSetC2::step_over_gc_barrier fails with assert "bad barrier shape" #3029

Closed
wants to merge 1 commit into from

Conversation

neliasso
Copy link

@neliasso neliasso commented Mar 16, 2021

During eliminate_macro_nodes an allocation and a tightly coupled arraycopy is eliminated. The gc barrier is still there but the entry condition is always false. During the subsequent igvn we can hit an assert depending on what order the barrier nodes are removed.

If the entry to the gc barrier is removed first - the exit region node will have Parm-control as in(2). This is a sign that it is a barrier during teardown. I add a check for that in this patch.


Progress

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

Issue

  • JDK-8262298: G1BarrierSetC2::step_over_gc_barrier fails with assert "bad barrier shape"

Reviewers

Download

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

To update a local copy of the PR:
$ git checkout pull/3029
$ git pull https://git.openjdk.java.net/jdk pull/3029/head

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 16, 2021

👋 Welcome back neliasso! 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 16, 2021

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

  • hotspot

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 hotspot-dev@openjdk.org label Mar 16, 2021
@neliasso
Copy link
Author

/label add hotspot-compiler
/label remove hotspot

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

openjdk bot commented Mar 16, 2021

@neliasso
The hotspot-compiler label was successfully added.

@openjdk
Copy link

openjdk bot commented Mar 16, 2021

@neliasso
The hotspot label was successfully removed.

@openjdk openjdk bot removed the hotspot hotspot-dev@openjdk.org label Mar 16, 2021
@neliasso neliasso marked this pull request as ready for review March 16, 2021 13:08
@openjdk openjdk bot added the rfr Pull request is ready for review label Mar 16, 2021
@mlbridge
Copy link

mlbridge bot commented Mar 16, 2021

Webrevs

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.

Will the barrier be eliminated eventually in this case?

@openjdk
Copy link

openjdk bot commented Mar 16, 2021

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

8262298: G1BarrierSetC2::step_over_gc_barrier fails with assert "bad barrier shape"

Reviewed-by: kvn, vlivanov

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

  • 5d87a21: 8263361: Incorrect arraycopy stub selected by C2 for SATB collectors
  • e152cc0: 8263677: Improve Character.isLowerCase/isUpperCase lookups
  • b63b5d4: 8263732: ProblemList serviceability/sa/ClhsdbSymbol.java on ZGC
  • 000012a: 8148937: (str) Adapt StringJoiner for Compact Strings
  • a707fcb: 8263723: [BACKOUT] MoveAndUpdateClosure::do_addr calls function with side-effects in an assert
  • 86e9cd9: 8263667: Avoid running GitHub actions on branches named pr/*
  • 41276eb: 8259863: doc: JShell snippet doesn't compile
  • f9f2eef: 8263434: Dangling references after MethodComparator::methods_EMCP
  • 23fc2a4: 8263688: Coordinate equals, hashCode and compareTo of JavacFileManager.PathAndContainer
  • d1baed6: 8263672: fatal error: no reachable node should have no use
  • ... and 44 more: https://git.openjdk.java.net/jdk/compare/8afec70c283ee549795996031e3a53a3212bf35a...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 Mar 16, 2021
@neliasso
Copy link
Author

Will the barrier be eliminated eventually in this case?

Yes - it will disappear in the same igvn pass.

Thanks for the review!

Copy link

@iwanowww iwanowww 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.

@neliasso
Copy link
Author

Looks good.

Thanks for the review!

@neliasso
Copy link
Author

/integrate

@openjdk openjdk bot closed this Mar 17, 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 Mar 17, 2021
@openjdk
Copy link

openjdk bot commented Mar 17, 2021

@neliasso Since your change was applied there have been 56 commits pushed to the master branch:

  • 7674da4: 8262398: Shenandoah: Disable nmethod barrier and stack watermark when running with passive mode
  • 4f4ca0e: 8261671: X86 I2L conversion can be skipped for certain masked positive values
  • 5d87a21: 8263361: Incorrect arraycopy stub selected by C2 for SATB collectors
  • e152cc0: 8263677: Improve Character.isLowerCase/isUpperCase lookups
  • b63b5d4: 8263732: ProblemList serviceability/sa/ClhsdbSymbol.java on ZGC
  • 000012a: 8148937: (str) Adapt StringJoiner for Compact Strings
  • a707fcb: 8263723: [BACKOUT] MoveAndUpdateClosure::do_addr calls function with side-effects in an assert
  • 86e9cd9: 8263667: Avoid running GitHub actions on branches named pr/*
  • 41276eb: 8259863: doc: JShell snippet doesn't compile
  • f9f2eef: 8263434: Dangling references after MethodComparator::methods_EMCP
  • ... and 46 more: https://git.openjdk.java.net/jdk/compare/8afec70c283ee549795996031e3a53a3212bf35a...master

Your commit was automatically rebased without conflicts.

Pushed as commit cdf78e4.

💡 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