JDK-6795361 : Deadlock - AWTTreeLock and native code in WComponentPeer and WWindowPeer
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2009-01-19
  • Updated: 2011-01-19
  • Resolved: 2009-01-22
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
Java HotSpot(TM) Client VM (1.5.0_15-b04 mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 5.2.3790]

EXTRA RELEVANT SYSTEM CONFIGURATION :
JVM running as an applet using the 1.5 plugin inside Internet Explorer

A DESCRIPTION OF THE PROBLEM :
This is an Oracle Forms 10.122 application running as an applet.  At infrequent intervals (many times at startup), the applicaton will completely hang and be unresponsive to screen repaints.  It will not recover and ultimately the internet explorer process needs to be forced to exit.  Below is the thread information dumped after a hang was experienced.  The threads involved in the deadlock are AWT-EventQueue-3 and AWT-EventQueue-0.  It appears these two threads may be engaged in a deadlock if the native code enters into a critical section.  A very similar type deadlock situation is documented in bug 6326131.

"AWT-EventQueue-3" prio=4 tid=0x05478598 nid=0x2030 runnable [0x060cf000..0x060c
fd6c]
        at sun.awt.windows.WComponentPeer.endValidate(Native Method)
        at java.awt.Container.validate(Unknown Source)
        - locked <0x122b93b8> (a java.awt.Component$AWTTreeLock)
        at java.awt.Window.dispatchEventImpl(Unknown Source)
        at java.awt.Component.dispatchEvent(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

"AWT-EventQueue-0" prio=6 tid=0x05310750 nid=0x2248 waiting for monitor entry [0
x05eaf000..0x05eafc6c]
        at java.awt.Component.setGCFromPeer(Unknown Source)
        - waiting to lock <0x122b93b8> (a java.awt.Component$AWTTreeLock)
        at java.awt.Window.resetGC(Unknown Source)
        at sun.awt.windows.WWindowPeer.resetTargetGC(Native Method)
        at sun.awt.windows.WCanvasPeer.displayChanged(Unknown Source)
        at sun.awt.windows.WPanelPeer.displayChanged(Unknown Source)
        at sun.awt.windows.WWindowPeer.displayChanged(Unknown Source)
        at sun.awt.SunDisplayChanger.notifyListeners(Unknown Source)
        at sun.awt.Win32GraphicsDevice.displayChanged(Unknown Source)
        at sun.awt.Win32GraphicsEnvironment.displayChanged(Unknown Source)
        at sun.awt.windows.WToolkit$4.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)

        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
We cannot reproduce this problem with any consistency.  The stack dump taken is from a production session.


REPRODUCIBILITY :
This bug can be reproduced occasionally.

CUSTOMER SUBMITTED WORKAROUND :
No work wround found.

Comments
EVALUATION Closing the bug as a duplicate of 6326131 until someone can reproduce the deadlock on jdk6.
22-01-2009

EVALUATION the bug is very close to the bug 6326131, the bug 6326131 has been fixed in jdk6 but it's still open in jdk5 update releases.
21-01-2009