Using the VM parameter -Djdk.tracePinnedThreads has a probability of causing the application to hang
Alan Bateman
Alan.Bateman at oracle.com
Thu Aug 3 11:28:07 UTC 2023
On 03/08/2023 12:04, qia nxiao wrote:
> It appears to be a similar issue. However, I have a question: why is
> there a high probability of reproducing deadlock when using the VM
> parameter -Djdk.tracePinnedThreads, while it is difficult to reproduce
> without using this VM parameter?
> This observation has also been confirmed in some of my practical
> applications, where adding the parameter leads to deadlocks after a
> few requests, while running without the parameter remains stable for a
> long time.
>
Right, it's towards the end of the thread that I linked to. When
-Djdk.tracePinnedThreads is set and a thread parks while pinned then it
will attempt to print to System.out and so it also deadlocks. We need to
fix this. In the mean-time, you can use the JFR event instead as it
doesn't have to write to System.out.
-Alan
More information about the loom-dev
mailing list