Skip to content

Conversation

@YaSuenag
Copy link
Member

@YaSuenag YaSuenag commented Jan 2, 2026

When we run jhsdb jstack --mixed on Windows, we can see top of call frames only as following:

----------------- 4 -----------------
"main" #3 prio=5 tid=0x0000021ee0357e90 nid=22356 waiting on condition [0x0000004ae7eff000]
   java.lang.Thread.State: TIMED_WAITING (sleeping)
   JavaThread state: _thread_blocked
0x00007ffca3c41c44 ntdll!NtWaitForSingleObject + 0x14
----------------- 5 -----------------

This is long standing bugs since JDK 9 at least (maybe this includes older JDK releases).
We cannot depend on base pointer to unwind call frames, but SA do that.

This PR use GetStackTrace to find caller frame, then native call frames would be unwinded.

However it has still problems for JIT'ed frames because it does not have a hint for unwinder like RtlAddFunctionTable. But it would affect entire of JIT compilers, so I've limited the change to SA.

This change passed serviceability/sa tests on Windows 11.


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-8374469: Mixed jstack does not work on Windows (Bug - P4)

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 29019

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Jan 2, 2026

👋 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 Jan 2, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot added the serviceability serviceability-dev@openjdk.org label Jan 2, 2026
@openjdk
Copy link

openjdk bot commented Jan 2, 2026

@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 January 2, 2026 15:34
@openjdk openjdk bot added the rfr Pull request is ready for review label Jan 2, 2026
@mlbridge
Copy link

mlbridge bot commented Jan 2, 2026

Webrevs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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

Development

Successfully merging this pull request may close these issues.

1 participant