Question about pinned

qia nxiao zenghuichen1997 at gmail.com
Tue Sep 19 02:43:08 UTC 2023


Thank you for your reply. So, is the root cause of pinning related to the
monitor used in synchronized blocks? Could you please explain the specific
principle behind it?

I'm interested in this root cause, but I couldn't find any relevant
information online.

Alan Bateman <Alan.Bateman at oracle.com> 于2023年9月18日周一 15:02写道:

> On 18/09/2023 06:48, qia nxiao wrote:
> > Hello everyone,
> >
> > Recently, my application experienced a deadlock issue due to "pinned"
> > reasons. It was difficult to detect during testing because it occurred
> > within exception handling logic.The occurrence of "pinned" situations
> > has become the biggest issue for me when using virtual threads.
> >
> > The official documentation mentions the possibility of "pinned"
> > situations. I would like to ask what the root cause of the "pinned"
> > issue is in synchronized blocks or methods? Will there be a solution
> > in the upcoming JDK 21 or is it already being planned for resolution?
>
> The issue of pinning is described in JEP 444 [1], along with diagnostics
> that can help identify some of these cases.
>
> There is work underway to re-implement monitors in the longer term. For
> the shorter term, there is another effort under way to allow the carrier
> be released when blocking at monitor enter. No time frame / dates right
> not but not JDK 21 as that release is at GA.
>
> -Alan
>
> [1] https://openjdk.org/jeps/444
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/loom-dev/attachments/20230919/4c907cee/attachment-0001.htm>


More information about the loom-dev mailing list