Virtual Threads - deadlock with synchronized (Main.class) and System.out.println
Dr Heinz M. Kabutz
heinz at javaspecialists.eu
Tue Jul 18 06:29:46 UTC 2023
Hi Ron,
should this also be emitted with the -Djdk.tracePinnedThreads=full
event? It doesn't seem to be at the moment.
Regards
Heinz
--
Dr Heinz M. Kabutz (PhD CompSci)
Author of "The Java™ Specialists' Newsletter" - www.javaspecialists.eu
Java Champion - www.javachampions.org
JavaOne Rock Star Speaker
Tel: +30 69 75 595 262
Skype: kabutz
On 2023/07/18 01:18, Ron Pressler wrote:
> The problem can occur whenever a shared j.u.c lock is acquired both inside and outside a synchronized (and println acquires a shared lock for the output stream). For now, this can be detected with the JFR pinning event, and the fix is to replace the synchronized that guards the lock acquisition with a j.u.c lock.
More information about the loom-dev
mailing list