[OpenMap Users] Deadlock with newer versions of jdk 1.6

From: Newcomb, Michael-P57487 <Michael.Newcomb_at_gdc4s.com>
Date: Tue, 5 May 2009 13:23:02 -0400

The latest versions of jdk 1.6 (with at least update 11+) have changed
some AWT methods that cause deadlock with OpenMap.

When DTEDWorker finishes, it:
1. calls workerComplete(), which locks the DTEDLayer
2. calls repaint()
3. repaint() snakes its way up to BufferedLayer.BLMapBean.repaint()
4. that calls hasLayers() which in turn calls countComponents()

Container.countComponents(), sometime between update 7 and update 11,
changed to actually go through and count the components instead of
returning a cached size. This locks the AWTTreeLock and causes a
deadlock with normal repaint() code coming down and locking the
AWTTreeLock.

Normal paint():
1. locks AWTTreeLock as it is painting it's children
2. calls DTEDLayer.paint()
3. which calls getGraphicsList() which locks the DTEDLayer

So, the deadlock occurs when the AWT thread locks the AWTTreeLock and
*then* tries to lock the DTEDLayer object on getGraphicsList(). But the
DTEDWorker locks the DTEDLayer *then* tries to lock the AWTTreeLock.

I don't think this will be isolated to DTEDLayer because I think there
are patterns like this all throughout OpenMap.

Thanks,
Michael


--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue May 05 2009 - 13:36:10 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT