Skip to content

Conversation

@RealFYang
Copy link
Member

@RealFYang RealFYang commented Mar 24, 2021

As shown on the bug, two JVM crashes are witnessed when running the provided test case after disabling match rule support for StrInflatedCopy.

The cause for the first JVM crash is that we are calling has_match_rule for Op_StrInflatedCopy in is_intrinsic_supported.
In this case, we have match rule for Op_StrInflatedCopy but that match rule is not supported.
Patch fixed the first crash by changing the use of has_match_rule into match_rule_supported. match_rule_supported will check has_match_rule at entry point.

In the case for the second JVM crash, the C2 code path is different when match rule for StrInflatedCopy is not supported.
In PhaseStringOpts::copy_latin1_string, we will call GraphKit::inflate_string_slow instread of GraphKit::inflate_string.
We emit one loop in GraphKit::inflate_string_slow, but the method is not marked may have some loops.
Looks like this is missed by JDK-8253923. Patch fixed the second crash by setting _has_loops to true in GraphKit::inflate_string_slow.

Testing: tier 1-3 tested with release & fastdebug build on x86_64 linux with match rule support for StrInflatedCopy explicitly disabled.


Progress

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

Issue

  • JDK-8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported

Reviewers

Contributors

  • Yadong Wang <yadonn.wang@huawei.com>

Download

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

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

@bridgekeeper
Copy link

bridgekeeper bot commented Mar 24, 2021

👋 Welcome back fyang! 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 openjdk bot added the rfr Pull request is ready for review label Mar 24, 2021
@openjdk
Copy link

openjdk bot commented Mar 24, 2021

@RealFYang 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 Mar 24, 2021
@openjdk
Copy link

openjdk bot commented Mar 24, 2021

@RealFYang Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@openjdk
Copy link

openjdk bot commented Mar 24, 2021

@RealFYang Could not parse yadonn.wang@huawei.com as a valid contributor.
Syntax: /contributor (add|remove) [@user | openjdk-user | Full Name <email@address>]. For example:

  • /contributor add @openjdk-bot
  • /contributor add duke
  • /contributor add J. Duke <duke@openjdk.org>

@RealFYang
Copy link
Member Author

/contributor add Yadong Wang yadonn.wang@huawei.com

@openjdk
Copy link

openjdk bot commented Mar 24, 2021

@RealFYang
Contributor Yadong Wang <yadonn.wang@huawei.com> successfully added.

@mlbridge
Copy link

mlbridge bot commented Mar 24, 2021

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.

@openjdk
Copy link

openjdk bot commented Mar 29, 2021

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

8264096: slowdebug jvm crashes when StrInflatedCopy match rule is not supported

Co-authored-by: Yadong Wang <yadonn.wang@huawei.com>
Reviewed-by: 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:

  • 447e0df: 8263769: simplify PhaseMacroExpand::extract_call_projections()
  • 99b4bab: 8263188: JSSE should fail fast if there isn't supported signature algorithm
  • 6678b01: 8264328: Broken license in javax/swing/JComboBox/8072767/bug8072767.java
  • 2fa6a3c: 8264006: Fix AOT library loading on CPUs with 256-byte dcache line
  • c986457: 8264329: Z cannot be 1 for Diffie-Hellman key agreement
  • a209ed0: 8263670: pmap and pstack in jhsdb do not work on debug server
  • 38e0a58: 8264273: macOS: zero VM is broken due to no member named 'is_cpu_emulated' after JDK-8261966
  • c9d2d02: 8263632: Improve exception handling of APIs in classLoader.cpp
  • 59ed1fa: 8264087: Use the blessed modifier order in jdk.jconsole
  • 054e0a4: 8264017: Correctly report inlined frame in JFR sampling
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/0b2aa1b6050eeeb4d13cbedfcfc86fb700e975a2...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 29, 2021
@RealFYang
Copy link
Member Author

Looks good to me.

Thanks Tobias for reviewing this :-) Merging.

@RealFYang
Copy link
Member Author

/integrate

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

openjdk bot commented Mar 29, 2021

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

  • 447e0df: 8263769: simplify PhaseMacroExpand::extract_call_projections()
  • 99b4bab: 8263188: JSSE should fail fast if there isn't supported signature algorithm
  • 6678b01: 8264328: Broken license in javax/swing/JComboBox/8072767/bug8072767.java
  • 2fa6a3c: 8264006: Fix AOT library loading on CPUs with 256-byte dcache line
  • c986457: 8264329: Z cannot be 1 for Diffie-Hellman key agreement
  • a209ed0: 8263670: pmap and pstack in jhsdb do not work on debug server
  • 38e0a58: 8264273: macOS: zero VM is broken due to no member named 'is_cpu_emulated' after JDK-8261966
  • c9d2d02: 8263632: Improve exception handling of APIs in classLoader.cpp
  • 59ed1fa: 8264087: Use the blessed modifier order in jdk.jconsole
  • 054e0a4: 8264017: Correctly report inlined frame in JFR sampling
  • ... and 63 more: https://git.openjdk.java.net/jdk/compare/0b2aa1b6050eeeb4d13cbedfcfc86fb700e975a2...master

Your commit was automatically rebased without conflicts.

Pushed as commit 1f54ed0.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@TobiHartmann
Copy link
Member

Although I would consider this change trivial, please note for future PRs, that non-trivial PRs require two reviews and a PR can only be considered trivial if that is stated explicitly and approved by a reviewer. See OpenJDK Developers’ Guide. Thanks.

@RealFYang
Copy link
Member Author

Although I would consider this change trivial, please note for future PRs, that non-trivial PRs require two reviews and a PR can only be considered trivial if that is stated explicitly and approved by a reviewer. See OpenJDK Developers’ Guide. Thanks.

D'oh. Sorry for missing the rule.
As I remembered, this was mentioned some time before.
Thanks for making this explicit.

@RealFYang RealFYang deleted the 8264096 branch April 10, 2021 02:44
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

Development

Successfully merging this pull request may close these issues.

2 participants