On Mon, 13 Oct 2025 08:31:05 GMT, Yasumasa Suenaga <[email protected]> wrote:

>> test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixedWithVirtualThread.java
>>  line 39:
>> 
>>> 37:  * @test
>>> 38:  * @bug 8369505
>>> 39:  * @requires (os.family == "linux") & (vm.hasSA)
>> 
>> I think it would be good to run this on macosx also, but it can't be run 
>> --mixed. I did reproduce the exception on macosx without --mixed. It doesn't 
>> however produce the "<StubRoutines (continuation stubs)>" frame. The test 
>> would need to be modified to instead check for the exception.
>> 
>> Probably we should run this on Windows also.
>
> I updated testcase to run this on other platforms - runs `jhsdb jstack` 
> without `--mixed` and checks stderr.
> 
> I tested on Windows, but I didn't see any errors - I guess `jhsdb jstack` 
> couldn't unwind stacks on Windows, thus it did not reach continuation stub. 
> But it is different problem.

On Windows I am seeing the exception (with your fix disabled):


"ForkJoinPool-1-worker-1" #30 daemon prio=5 tid=0x000001567d6bcdc0 nid=2588 
runnable [0x00000002d35fe000]
   java.lang.Thread.State: RUNNABLE
   JavaThread state: _thread_in_native
 - java.lang.invoke.LambdaForm$MH+0x0000000026047800.invoke(java.lang.Object, 
long, int) @bci=10 (Interpreted frame)
 - 
java.lang.invoke.LambdaForm$MH+0x000000002604e400.invokeExact_MT(java.lang.Object,
 long, int, java.lang.Object) @bci=21 (Interpreted frame)
 - 
jdk.internal.foreign.abi.DowncallStub+0x0000000026048800.invoke(java.lang.foreign.SegmentAllocator,
 java.lang.foreign.MemorySegment, int) @bci=44 (Interpreted frame)
 - 
java.lang.invoke.LambdaForm$DMH+0x0000000026048c00.invokeStaticInit(java.lang.Object,
 java.lang.Object, java.lang.Object, int) @bci=14 (Interpreted frame)
 - java.lang.invoke.LambdaForm$MH+0x000000002604d800.invoke(java.lang.Object, 
int) @bci=44 (Interpreted frame)
 - 
java.lang.invoke.LambdaForm$MH+0x000000002604d400.invoke_MT(java.lang.Object, 
int, java.lang.Object) @bci=18 (Interpreted frame)
 - LingeredAppWithVirtualThread.run() @bci=15, line=65 (Interpreted frame)

Error occurred during stack walking:
sun.jvm.hotspot.utilities.AssertionFailure: must have non-zero frame size

With your fix enabled, I see the full expected stack, so it seems to be working.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/27728#discussion_r2427225103

Reply via email to