Some issues regarding jcmd <pid> JavaThread.dump
Wenting Tan
wenting.tan at oracle.com
Thu May 13 00:40:41 UTC 2021
Hi Alan,
Thank you. For 2, the attached file is disassembled code generated from javap. The LineNumberTable seems to be consistent with source code, so this is not a javac issue?
- Wenting
> On May 11, 2021, at 10:57 PM, Alan Bateman <alan.bateman at oracle.com> wrote:
>
> On 12/05/2021 01:33, Wenting Tan wrote:
>> Hi,
>>
>> When I try to use jcmd <pid> JavaThread.dump with a small test program (VirtualThreadTest.java), there are two issues with virtual thread dump (jcmd_JavaThread_dump.txt).
>>
>> 1. Virtual threads are running with busy loop, and jcmd process is stuck. After I force stop the processes, thread dump for some virtual threads are not captured. In my case, 10 virtual threads are created, and my Mac has 8 virtual cores, so 2 virtual threads are not captured. Not sure if this behavior is expected.
> Thanks, there's enough here to see that there is a bug with the async stack trace for virtual threads that have been scheduled to start but never get to run because all carrier threads are busy.
>
>> 2. When lambda instead of method reference is used, the line number is not correct in the stack traces for those virtual threads. Note the three lines in the dump: VirtualThreadTest.lambda$main$0(VirtualThreadTest.java:26).
> This may not be a loom issue. Can you send something here that shows the issue? I can't tell if this is a javac issue or something else.
>
> -Alan
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: VirtualThreadTest_class.txt
URL: <https://mail.openjdk.java.net/pipermail/loom-dev/attachments/20210513/5fd2164a/VirtualThreadTest_class.txt>
More information about the loom-dev
mailing list