Skip to content

Conversation

@YaSuenag
Copy link
Member

@YaSuenag YaSuenag commented Dec 6, 2025

JDK-8371194 (PR #28284) has broken PStack (jstack --mixed) behavior on macOS. It affects both AMD64 and AArch64. See JBS for details.

This PR fixes it to implement CFrame::toFrame.


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

Warning

 ⚠️ Found leading lowercase letter in issue title for 8373110: jstack --mixed frames are broken on macOS after JDK-8371194

Issue

  • JDK-8373110: jstack --mixed frames are broken on macOS after JDK-8371194 (Bug - P3)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 28686

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 6, 2025

👋 Welcome back ysuenaga! 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 Dec 6, 2025

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

8373110: jstack --mixed frames are broken on macOS after JDK-8371194

Reviewed-by: cjplummer

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

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 serviceability serviceability-dev@openjdk.org label Dec 6, 2025
@openjdk
Copy link

openjdk bot commented Dec 6, 2025

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

  • serviceability

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.

@YaSuenag YaSuenag marked this pull request as ready for review December 7, 2025 01:38
@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 7, 2025
@mlbridge
Copy link

mlbridge bot commented Dec 7, 2025

Webrevs

Copy link
Member

@shipilev shipilev left a comment

Choose a reason for hiding this comment

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

Drive-by comment:

@plummercj
Copy link
Contributor

plummercj commented Dec 8, 2025

macosx-aarch64 looks fine, but it looks like there is still an issue on macosx-x64. Stack traces are empty:

"Reference Handler" #15 daemon prio=10 tid=0x00007f94c0820010 nid=29955 waiting on condition [0x000070000e080000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_blocked
0x00007ff803c3b6f6		????????

Before this change you at least got a partial stack followed by the UnsupportedPlatformException.

…sd/aarch64/BsdAARCH64CFrame.java

Co-authored-by: Aleksey Shipilëv <shipilev@amazon.de>
@YaSuenag
Copy link
Member Author

YaSuenag commented Dec 8, 2025

@plummercj

there is still an issue on macosx-x64. Stack traces are empty

Does it happen always? or intermittently?

Before this change you at least got a partial stack followed by the UnsupportedPlatformException.

I'm not sure, but I guess jstack could not unwind frame at some point(s) due to unwind info like DWARF on Linux - jstack might not handle call frame because the symbol could not be resolved.

@plummercj
Copy link
Contributor

Does it happen always? or intermittently?

Always. Every thread and with every run. All of the thread stack traces just have the one empty frame.

@YaSuenag
Copy link
Member Author

YaSuenag commented Dec 9, 2025

@plummercj Maybe it was fixed in the latest commit on this PR. Could you check again?

@plummercj
Copy link
Contributor

@plummercj Maybe it was fixed in the latest commit on this PR. Could you check again?

That seems to have fixed it. Thanks!

if ((fp == null) || fp.lessThan(rsp)) {
return null;
@Override
public CFrame sender(ThreadProxy thread, Address nextSP, Address nextFP, Address nextPC) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is it that for aarch64 these are all "next" arguments, but for AMD64 they are not?

Copy link
Member Author

Choose a reason for hiding this comment

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

I want to declare like sender(ThreadProxy th, Address sp, Address fp, Address pc) as defined in CFrame, however name of parameters (sp, fp, pc) have already declared as class members in BsdAARCH64CFrame. Thus I added next as a prefix of parameter name.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok. Looks like that was also the case with LunuxAARCH64CFrame.

@openjdk openjdk bot added the ready Pull request is ready to be integrated label Dec 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready Pull request is ready to be integrated rfr Pull request is ready for review serviceability serviceability-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

3 participants