[OpenJDK 2D-Dev] Deadlock: sun.font.FontManager.findFont2D (6u18b07)

Janda Martin jandam at crcdata.cz
Wed Jan 20 23:08:49 UTC 2010

Today I discovered deadlock on linux when initializing fonts. I tried to run World Wind for Java demo applet.

I reported bug to bugs.sun.com. I don't think there will be fast response/fix.

JConsole dealock stacktraces are in attachment. There are several problems.

*) synchronization in "sun.java2d.SunGraphicsEnvironment.loadFonts(SunGraphicsEnvironment.java:425)- locked java.lang.String at 39ea58"  against String that can be "intern"

*) several lines above "loadFonts" is simple getter with description that same variable used for synchronization can be <null>  -  !!! synchronization can't be with null monitor !!!

*) SunGraphicsEnvironment.loadFonts in synchonized block calls native sun.font.FontManager.getFontPath - that can lead to deadlock according to "Sun" information

*) there is waiting awtLock on javawsApplicationMain and AWT-EventQueue-0 is trying to SunGraphicsEnvironment.loadFonts

I hope that this help you fix this problem.


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: deadlock-font.txt
URL: <http://mail.openjdk.java.net/pipermail/2d-dev/attachments/20100121/07b63802/deadlock-font.txt>

More information about the 2d-dev mailing list