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

8318895: Deoptimization results in incorrect lightweight locking stack #16568

Closed
wants to merge 3 commits into from

Conversation

rkennke
Copy link
Contributor

@rkennke rkennke commented Nov 8, 2023

See JBS issue for details.

I basically:

  • took the test-modification and turned it into its own test-case
  • added test runners for lightweight- and legacy-locking, so that we keep testing both, no matter what is the default
  • added Axels fix (mentioned in the JBS issue) with the modification to only inflate when exec_mode == Unpack_none, as explained by Richard.

Testing:

  • EATests.java
  • tier1
  • tier2

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-8318895: Deoptimization results in incorrect lightweight locking stack (Bug - P3)

Reviewers

Contributors

  • Axel Boldt-Christmas <aboldtch@openjdk.org>
  • Richard Reingruber <rrich@openjdk.org>

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 16568

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

Using diff file

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

Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 8, 2023

👋 Welcome back rkennke! 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 Nov 8, 2023
@openjdk
Copy link

openjdk bot commented Nov 8, 2023

@rkennke The following labels will be automatically applied to this pull request:

  • hotspot
  • serviceability

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 serviceability serviceability-dev@openjdk.org hotspot hotspot-dev@openjdk.org labels Nov 8, 2023
@mlbridge
Copy link

mlbridge bot commented Nov 8, 2023

Webrevs

@rkennke
Copy link
Contributor Author

rkennke commented Nov 8, 2023

/contributor add @xmas92

@openjdk
Copy link

openjdk bot commented Nov 8, 2023

@rkennke
Contributor Axel Boldt-Christmas <aboldtch@openjdk.org> successfully added.

@openjdk
Copy link

openjdk bot commented Nov 9, 2023

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

8318895: Deoptimization results in incorrect lightweight locking stack

Co-authored-by: Axel Boldt-Christmas <aboldtch@openjdk.org>
Co-authored-by: Richard Reingruber <rrich@openjdk.org>
Reviewed-by: dlong, rrich

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

  • c9657ca: 8319882: SequenceLayout::toString throws ArithmeticException
  • 6b21ff6: 8319828: runtime/NMT/VirtualAllocCommitMerge.java may fail if mixing interpreted and compiled native invocations
  • a64fc48: 8319174: Enhance robustness of some j.m.BigInteger constructors
  • 9cce9fe: 8319256: Print more diagnostic information when an unexpected user is found in a Phi
  • a95062b: 8319670: Improve comments describing system properties for TLS server and client for max chain length
  • 38745ec: 8319649: inline_boxing_calls unused gvn variable
  • 636a351: 8319429: Resetting MXCSR flags degrades ecore
  • d7b0ba9: 8319554: Select LogOutput* directly for stdout and stderr
  • 68110b7: 8319574: Exec/process tests should be marked as flagless
  • 7b971c1: 8319705: RISC-V: signumF/D intrinsics fails compiler/intrinsics/math/TestSignumIntrinsic.java
  • ... and 16 more: https://git.openjdk.org/jdk/compare/7d25f1c6cb770e21cfad8096c1637a24e65fab8c...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 Nov 9, 2023
@reinrich
Copy link
Member

reinrich commented Nov 9, 2023

Hi Roman,

thanks for opening the pr.

I've implemented another test case that demonstrates why relocking should be done before an object reference with eliminated locking is passed to a JVMTI agent. Would it be ok to include it in your pr?
(This is a version where relocking is delayed until the compiled frame is deoptimized. The new test fails with -XX:+UseNewCode).

I will put the change through our CI testing.

Cheers, Richard.

Copy link
Member

@reinrich reinrich left a comment

Choose a reason for hiding this comment

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

Fix and new test case look good to me.
Local testing was clean.
Thanks, Richard.

test/jdk/com/sun/jdi/EATests.java Outdated Show resolved Hide resolved
Co-authored-by: Richard Reingruber <richard.reingruber@sap.com>
@rkennke
Copy link
Contributor Author

rkennke commented Nov 10, 2023

/contributor add @reinrich

@openjdk
Copy link

openjdk bot commented Nov 10, 2023

@rkennke
Contributor Richard Reingruber <rrich@openjdk.org> successfully added.

@rkennke
Copy link
Contributor Author

rkennke commented Nov 10, 2023

Thanks, all!

/integrate

@openjdk
Copy link

openjdk bot commented Nov 10, 2023

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

  • c9657ca: 8319882: SequenceLayout::toString throws ArithmeticException
  • 6b21ff6: 8319828: runtime/NMT/VirtualAllocCommitMerge.java may fail if mixing interpreted and compiled native invocations
  • a64fc48: 8319174: Enhance robustness of some j.m.BigInteger constructors
  • 9cce9fe: 8319256: Print more diagnostic information when an unexpected user is found in a Phi
  • a95062b: 8319670: Improve comments describing system properties for TLS server and client for max chain length
  • 38745ec: 8319649: inline_boxing_calls unused gvn variable
  • 636a351: 8319429: Resetting MXCSR flags degrades ecore
  • d7b0ba9: 8319554: Select LogOutput* directly for stdout and stderr
  • 68110b7: 8319574: Exec/process tests should be marked as flagless
  • 7b971c1: 8319705: RISC-V: signumF/D intrinsics fails compiler/intrinsics/math/TestSignumIntrinsic.java
  • ... and 16 more: https://git.openjdk.org/jdk/compare/7d25f1c6cb770e21cfad8096c1637a24e65fab8c...master

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Nov 10, 2023

@rkennke Pushed as commit ea1ffa3.

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

@dholmes-ora
Copy link
Member

dholmes-ora commented Jan 30, 2024

This PR calls code that expects to be passed a reference to the current thread, but is instead passed the deoptee_thread! See https://bugs.openjdk.org/browse/JDK-8324881

There may be an issue here but it is pre-existing (at least to some extent).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hotspot hotspot-dev@openjdk.org integrated Pull request has been integrated serviceability serviceability-dev@openjdk.org
4 participants