Some issues regarding jcmd <pid> JavaThread.dump
Wenting Tan
wenting.tan at oracle.com
Wed May 12 00:33:55 UTC 2021
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.
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).
Thanks,
Wenting
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: jcmd_JavaThread_dump.txt
URL: <https://mail.openjdk.java.net/pipermail/loom-dev/attachments/20210512/e2978bbd/jcmd_JavaThread_dump.txt>
More information about the loom-dev
mailing list