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

8350412: [21u] AArch64: Ambiguous frame layout leads to incorrect traces in JFR #1418

Closed
wants to merge 1 commit into from

Conversation

dchuyko
Copy link
Member

@dchuyko dchuyko commented Feb 20, 2025

This change fixes incorrect stack traces sometimes reported by JFR (non-deterministic stack walking). It is technically a clean backport of 'Make the anchor frame walkable' changes of aarch64_enc_java_to_runtime() from https://github.com/openjdk/jdk/pull/21565/files#diff-018aa61d1a7aafcf70a535fcd40a318a4bd6511fd40ac39ce4be90cc52216749

I propose to cherry pick those into older releases after JDK 24 is out, starting from 21u.

Testing: tier1,2 on linux-aarch64.


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
  • JDK-8350412 needs maintainer approval

Issue

  • JDK-8350412: [21u] AArch64: Ambiguous frame layout leads to incorrect traces in JFR (Bug - P4 - Approved)

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk21u-dev.git pull/1418/head:pull/1418
$ git checkout pull/1418

Update a local copy of the PR:
$ git checkout pull/1418
$ git pull https://git.openjdk.org/jdk21u-dev.git pull/1418/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1418

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk21u-dev/pull/1418.diff

Using Webrev

Link to Webrev Comment

Sorry, something went wrong.

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 20, 2025

👋 Welcome back dchuyko! 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 Feb 20, 2025

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

8350412: [21u] AArch64: Ambiguous frame layout leads to incorrect traces in JFR

Reviewed-by: phh

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

  • 544b111: 8338064: Give better error for ConcurrentHashTable corruption
  • 8faa7b6: 8350211: CTW: Attempt to preload all classes in constant pool
  • 6c1e127: 8338202: Shenandoah: Improve handshake closure labels
  • 7a25ef2: 8340784: Remove PassFailJFrame constructor with screenshots
  • 7dd8c8c: 8348107: test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java fails intermittently
  • 5b0f3a6: 8347286: (fs) Remove some extensions from java/nio/file/Files/probeContentType/Basic.java
  • 4dbb0c9: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux
  • 4881735: 8334644: Automate javax/print/attribute/PageRangesException.java
  • e654a53: 8337221: CompileFramework: test library to conveniently compile java and jasm sources for fuzzing
  • a498e0e: 8341637: java/net/Socket/UdpSocket.java fails with "java.net.BindException: Address already in use" (macos-aarch64)
  • ... and 74 more: https://git.openjdk.org/jdk21u-dev/compare/6cc0ec2fdc56150df361a31861a36cc8518f4cb6...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.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@phohensee) but any other Committer may sponsor as well.

➡️ 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).

@openjdk openjdk bot changed the title JDK-8350412 8350412: [21u] AArch64: Ambiguous frame layout leads to incorrect traces in JFR Feb 20, 2025
@openjdk openjdk bot added the rfr Pull request is ready for review label Feb 20, 2025
@mlbridge
Copy link

mlbridge bot commented Feb 20, 2025

Webrevs

@openjdk
Copy link

openjdk bot commented Feb 20, 2025

⚠️ @dchuyko This change is now ready for you to apply for maintainer approval. This can be done directly in each associated issue or by using the /approval command.

@openjdk
Copy link

openjdk bot commented Feb 24, 2025

@dchuyko usage: /approval [<id>] (request|cancel) [<text>]

@dchuyko
Copy link
Member Author

dchuyko commented Feb 24, 2025

/approval request This change fixes the stack layout that leads to non-deterministic stack walking, which at least turns into incorrect traces reported by JFR, other profiling tools also loose samples or require special workarounds.

It is technically a clean backport of a tiny aarch64.ad change cherry picked from JEP 491. With a constant frame size JFR stops reporting incorrect traces on aarch64.

In a case of approval I'll defer the integration to 21u till JDK 24 is out (or a defer label can be used).

@openjdk
Copy link

openjdk bot commented Feb 24, 2025

@dchuyko
8350412: The approval request has been created successfully.

@openjdk openjdk bot added approval ready Pull request is ready to be integrated and removed approval labels Feb 24, 2025
@dchuyko
Copy link
Member Author

dchuyko commented Mar 19, 2025

/integrate

@openjdk openjdk bot added the sponsor Pull request is ready to be sponsored label Mar 19, 2025
@openjdk
Copy link

openjdk bot commented Mar 19, 2025

@dchuyko
Your change (at version 304306d) is now ready to be sponsored by a Committer.

@phohensee
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 19, 2025

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

  • d8291f5: 8316580: HttpClient with StructuredTaskScope does not close when a task fails
  • 544b111: 8338064: Give better error for ConcurrentHashTable corruption
  • 8faa7b6: 8350211: CTW: Attempt to preload all classes in constant pool
  • 6c1e127: 8338202: Shenandoah: Improve handshake closure labels
  • 7a25ef2: 8340784: Remove PassFailJFrame constructor with screenshots
  • 7dd8c8c: 8348107: test/jdk/java/net/httpclient/HttpsTunnelAuthTest.java fails intermittently
  • 5b0f3a6: 8347286: (fs) Remove some extensions from java/nio/file/Files/probeContentType/Basic.java
  • 4dbb0c9: 8346581: JRadioButton/ButtonGroupFocusTest.java fails in CI on Linux
  • 4881735: 8334644: Automate javax/print/attribute/PageRangesException.java
  • e654a53: 8337221: CompileFramework: test library to conveniently compile java and jasm sources for fuzzing
  • ... and 75 more: https://git.openjdk.org/jdk21u-dev/compare/6cc0ec2fdc56150df361a31861a36cc8518f4cb6...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 19, 2025
@openjdk openjdk bot closed this Mar 19, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review sponsor Pull request is ready to be sponsored labels Mar 19, 2025
@openjdk
Copy link

openjdk bot commented Mar 19, 2025

@phohensee @dchuyko Pushed as commit 47aafc2.

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

Successfully merging this pull request may close these issues.

None yet

2 participants