RFR: 8374469: Mixed jstack does not work on Windows [v2]
Chris Plummer
cjplummer at openjdk.org
Thu Jan 15 04:55:37 UTC 2026
On Thu, 15 Jan 2026 02:23:54 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
>> "NoFramePointerJNIFib" #28 prio=5 tid=0x0000023fa4432290 nid=20612 runnable [0x000000d0370fe000]
>> java.lang.Thread.State: RUNNABLE
>> JavaThread state: _thread_in_native
>> 0x00007ffbe5fd10a8 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xa8
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xd0
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10db NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI + 0xdb
>> 0x00007ffbe5fd10d0 NoFramePointer!Java_LingeredAppWi...
>
> I don't know why these call stacks were produced... It's strange.
> I tested this PR with cl.exe 19.50.35721 by VS 2026 18.1.1, I didn't see such call stacks.
>
> `callJNI()` makes recursive call, but it should include Java upcall (you can see it as LingeredAppWithNativeMethod.callback()`)
>
> Top of call stacks is `callJNI()`, thus I believe it has valid RSP/RBP/RIP (passed by `WindbgCDebugger::topFrameForThread`). `callJNI` is JNI function in NoFramePointer.dll generated by cl.exe (in usual (I believe) on OpenJDK build environment), thus I think `GetStackTrace` API works.
> Each `NoFramePointer!Java_LingeredAppWithNativeMethod_callJNI` has instruction address, it means they were unwinded by the API, thus I think we need to investigate assembly code in NoFramePointer.dll to know what happens...
The binary I have was built with VS2022-17.13.2.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/29019#discussion_r2692993002
More information about the serviceability-dev
mailing list