Some issues regarding jcmd <pid> JavaThread.dump
Alan Bateman
Alan.Bateman at oracle.com
Wed May 12 05:57:27 UTC 2021
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
More information about the loom-dev
mailing list