<div dir="ltr"><div dir="ltr">that is interesting, I do not understand the details enough to it will actually help :)</div><div dir="ltr"><br></div><div>can someone elaborate ?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 18, 2023 at 10:48 PM Dr Heinz M. Kabutz <<a href="mailto:heinz@javaspecialists.eu">heinz@javaspecialists.eu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2023/07/18 10:46, Alan Bateman wrote:<br>
> On 18/07/2023 07:29, Dr Heinz M. Kabutz wrote:<br>
>> Hi Ron,<br>
>><br>
>> should this also be emitted with the -Djdk.tracePinnedThreads=full <br>
>> event? It doesn't seem to be at the moment.<br>
><br>
> There's a lot of puzzler material here. That system property prints a <br>
> stack trace to System.out so it might, or might not, block trying to <br>
> acquire the lock for System.out. Before you ask, the reason you might <br>
> not see a JFR event is because that event is committed after the <br>
> pinned thread continues (so it can include the duration). In the <br>
> deadlock scenario, the thread that is pinned due to synchronized <br>
> (Main.class) { ... } is not chosen as the waiter to release, so it <br>
> parks indefinitely.<br>
><br>
> -Alan<br>
<br>
Oh my, that is so nasty!<br>
<br>
Thus we can make the problem vanish with System.setOut(new <br>
PrintStream(System.out) {});<br>
<br>
:-)<br>
<br>
Heinz<br>
<br>
</blockquote></div></div>