<div class="__aliyun_email_body_block"><div style="clear:both;"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;">is it possible to make the `unparker` plugable ?</span></div><div style="clear:both;"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;"><br ></span></div><div style="clear:both;"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;"><br ></span></div><div style="clear:both;"><span style="font-family:Tahoma,Arial,STHeiti,SimSun;"><br ></span></div><blockquote style="margin-right:.0px;margin-top:.0px;margin-bottom:.0px;font-family:Tahoma,Arial,STHeiti,SimSun;font-size:14.0px;color:#000000;"><div style="clear:both;">------------------------------------------------------------------</div><div style="clear:both;">发件人:Danny Thomas <dannyt@netflix.com></div><div style="clear:both;">发送时间:2024年6月26日(星期三) 13:37</div><div style="clear:both;">收件人:Alan Bateman<Alan.Bateman@oracle.com></div><div style="clear:both;">抄 送:"loom-dev"<loom-dev@openjdk.org></div><div style="clear:both;">主 题:Re: Real-world Pinning/ReentrantLock deadlock</div><div style="clear:both;"><br ></div><div >Working on looking at the scheduler, poller and locking changes as we speak. </div><div ><br ><div class="gmail_quote"><div class="gmail_attr">On Tue, 25 Jun 2024 at 4:21 PM, Alan Bateman <<a href="mailto:Alan.Bateman@oracle.com" target="_blank">Alan.Bateman@oracle.com</a>> wrote:<br ></div><div style="margin:14.0px 40.0px;"><br ><br >
On 25/06/2024 02:13, Danny Thomas wrote:<br >
> Hi folks,<br >
><br >
> We ran into a real-world deadlock with virtual threads and Micrometer, <br >
> Brave/Zipkin. In short, there are two paths to <br >
> CountBoundedQueue.offer[1] for finishing a span. RealSpan.finish[2] <br >
> has a synchronized block, RealScopedSpan.finish[3] doesn't. If a <br >
> virtual thread using RealScopedSpan is next line for the lock, but all <br >
> carriers are currently occupied by pinned VTs in RealSpan.finish, the <br >
> application will deadlock:<br >
><br >
> <a href="https://gist.github.com/DanielThomas/dddd850f7e491cac3a2dd734978f4267" target="_blank">https://gist.github.com/DanielThomas/dddd850f7e491cac3a2dd734978f4267</a><br >
><br >
> Looking forward to the locking improvements!<br >
><br ><br >
Yes, if a j.u.concurrent lock is sometimes acquired by threads holding a <br >
monitor and at other times by threads that aren't holding a monitor then <br >
deadlock is possible when all carriers are pinned and the selected <br >
successor is unmounted. Have you, or your team, tried the early access <br >
build [1] with the changes for object monitors yet?<br ><br >
-Alan<br ><br >
[1] <a href="https://jdk.java.net/loom/" target="_blank">https://jdk.java.net/loom/</a><br ></div></div></div></blockquote></div>