Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6798036

Deadlock with Frame.getExtendedState() and AWT tree lock

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 7
    • client-libs
    • None
    • generic, sparc
    • generic, solaris_10

      Deadlock is reported by one of the customers:

      2009-01-26 12:42:20
      Full thread dump Java HotSpot(TM) Server VM (14.0-b10 mixed mode):
       
      "AWT-EventQueue-0" prio=10 tid=0x08223c00 nid=0x4852 waiting for monitor entry [0x6fac4000..0x6fac4eb0]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at java.awt.Component.invalidate(Component.java:2692)
              - waiting to lock <0xad0ce048> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.invalidate(Container.java:1453)
              at java.awt.Window.dispatchEventImpl(Window.java:2556)
              at java.awt.Component.dispatchEvent(Component.java:4404)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
       
      "AWT-Shutdown" prio=10 tid=0x0821e000 nid=0x4851 in Object.wait() [0x6fb15000..0x6fb15e30]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xad204788> (a java.lang.Object)
              at java.lang.Object.wait(Object.java:502)
              at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:281)
              - locked <0xad204788> (a java.lang.Object)
              at java.lang.Thread.run(Thread.java:713)
       
      "AWT-XAWT" daemon prio=10 tid=0x08210400 nid=0x4850 waiting for monitor entry [0x6fb66000..0x6fb66fb0]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at java.awt.Frame.getExtendedState(Frame.java:808)
              - waiting to lock <0xad0e5b08> (a java.awt.Frame)
              at java.awt.Frame.paramString(Frame.java:970)
              at java.awt.Component.toString(Component.java:7814)
              at java.lang.String.valueOf(String.java:2838)
              at java.lang.StringBuilder.append(StringBuilder.java:128)
              at sun.awt.X11.XDecoratedPeer.requestWindowFocus(XDecoratedPeer.java:1170)
              at sun.awt.X11.XDecoratedPeer.handleWmTakeFocus(XDecoratedPeer.java:1041)
              at sun.awt.X11.XDecoratedPeer.handleClientMessage(XDecoratedPeer.java:1034)
              at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1074)
              at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1056)
              at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:504)
              at sun.awt.X11.XToolkit.run(XToolkit.java:599)
              at sun.awt.X11.XToolkit.run(XToolkit.java:534)
              at java.lang.Thread.run(Thread.java:713)
       
      "Java2D Disposer" daemon prio=10 tid=0x081ec000 nid=0x484f in Object.wait() [0x6fc3d000..0x6fc3df30]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xad1171d8> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
              - locked <0xad1171d8> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:149)
              at sun.java2d.Disposer.run(Disposer.java:143)
              at java.lang.Thread.run(Thread.java:713)
       
      "Low Memory Detector" daemon prio=10 tid=0x70002c00 nid=0x484d runnable [0x00000000..0x00000000]
         java.lang.Thread.State: RUNNABLE
       
      "CompilerThread1" daemon prio=10 tid=0x70000800 nid=0x484c waiting on condition [0x00000000..0x6fffe2c8]
         java.lang.Thread.State: RUNNABLE
       
      "CompilerThread0" daemon prio=10 tid=0x08108800 nid=0x484b waiting on condition [0x00000000..0x7018c358]
         java.lang.Thread.State: RUNNABLE
       
      "Signal Dispatcher" daemon prio=10 tid=0x08107000 nid=0x484a waiting on condition [0x00000000..0x00000000]
         java.lang.Thread.State: RUNNABLE
       
      "Finalizer" daemon prio=10 tid=0x080f7c00 nid=0x4849 in Object.wait() [0x70261000..0x70261e30]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xad050b30> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:133)
              - locked <0xad050b30> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:149)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:177)
       
      "Reference Handler" daemon prio=10 tid=0x080f3400 nid=0x4848 in Object.wait() [0x702b2000..0x702b2fb0]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xad050a38> (a java.lang.ref.Reference$Lock)
              at java.lang.Object.wait(Object.java:502)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:133)
              - locked <0xad050a38> (a java.lang.ref.Reference$Lock)
       
      "main" prio=10 tid=0x08050400 nid=0x4842 waiting on condition [0xb727b000..0xb727c2d8]
         java.lang.Thread.State: WAITING (parking)
              at sun.misc.Unsafe.park(Native Method)
              - parking to wait for <0xad0ec368> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
              at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:769)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:802)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1132)
              at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
              at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
              at sun.awt.SunToolkit.awtLock(SunToolkit.java:269)
              at sun.awt.X11.XAwtState.getComponentMouseEntered(XAwtState.java:61)
              at sun.awt.X11.XGlobalCursorManager.findHeavyweightUnderCursor(XGlobalCursorManager.java:169)
              at sun.awt.X11.XGlobalCursorManager.findHeavyweightUnderCursor(XGlobalCursorManager.java:185)
              at sun.awt.GlobalCursorManager._updateCursor(GlobalCursorManager.java:179)
              at sun.awt.GlobalCursorManager.updateCursorImmediately(GlobalCursorManager.java:95)
              at sun.awt.X11.XComponentPeer.updateCursorImmediately(XComponentPeer.java:838)
              at java.awt.Component.updateCursorImmediately(Component.java:2846)
              at java.awt.Component.show(Component.java:1458)
              - locked <0xad0ce048> (a java.awt.Component$AWTTreeLock)
              at java.awt.Window.show(Window.java:903)
              at java.awt.Component.show(Component.java:1483)
              at java.awt.Component.setVisible(Component.java:1435)
              at java.awt.Window.setVisible(Window.java:875)
              at javasoft.sqe.jck.lib.awt.ComponentShow.makeVisible(ComponentShow.java:37)
              - locked <0xad0e5b08> (a java.awt.Frame)
              at javasoft.sqe.tests.api.java.awt.Component.getLocationOnScreenTests.Component2053(getLocationOnScreenTests.java:55)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:623)
              at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
              at javasoft.sqe.tests.api.java.awt.Component.getLocationOnScreenTests.main(getLocationOnScreenTests.java:31)
       
      "VM Thread" prio=10 tid=0x080ef400 nid=0x4847 runnable
       
      "GC task thread#0 (ParallelGC)" prio=10 tid=0x08057000 nid=0x4843 runnable
       
      "GC task thread#1 (ParallelGC)" prio=10 tid=0x08058800 nid=0x4844 runnable
       
      "GC task thread#2 (ParallelGC)" prio=10 tid=0x08059c00 nid=0x4845 runnable
       
      "GC task thread#3 (ParallelGC)" prio=10 tid=0x0805b400 nid=0x4846 runnable
       
      "VM Periodic Task Thread" prio=10 tid=0x70004c00 nid=0x484e waiting on condition
       
      JNI global references: 736
       
       
      Found one Java-level deadlock:
      =============================
      "AWT-EventQueue-0":
        waiting to lock monitor 0x080f6f2c (object 0xad0ce048, a java.awt.Component$AWTTreeLock),
        which is held by "main"
      "main":
        waiting for ownable synchronizer 0xad0ec368, (a java.util.concurrent.locks.ReentrantLock$NonfairSync),
        which is held by "AWT-XAWT"
      "AWT-XAWT":
        waiting to lock monitor 0x080f6d9c (object 0xad0e5b08, a java.awt.Frame),
        which is held by "main"
       
      Java stack information for the threads listed above:
      ===================================================
      "AWT-EventQueue-0":
              at java.awt.Component.invalidate(Component.java:2692)
              - waiting to lock <0xad0ce048> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.invalidate(Container.java:1453)
              at java.awt.Window.dispatchEventImpl(Window.java:2556)
              at java.awt.Component.dispatchEvent(Component.java:4404)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:605)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:286)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:201)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:191)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:186)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:178)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:139)
      "main":
              at sun.misc.Unsafe.park(Native Method)
              - parking to wait for <0xad0ec368> (a java.util.concurrent.locks.ReentrantLock$NonfairSync)
              at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.parkAndCheckInterrupt(AbstractQueuedSynchronizer.java:769)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireQueued(AbstractQueuedSynchronizer.java:802)
              at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquire(AbstractQueuedSynchronizer.java:1132)
              at java.util.concurrent.locks.ReentrantLock$NonfairSync.lock(ReentrantLock.java:214)
              at java.util.concurrent.locks.ReentrantLock.lock(ReentrantLock.java:290)
              at sun.awt.SunToolkit.awtLock(SunToolkit.java:269)
              at sun.awt.X11.XAwtState.getComponentMouseEntered(XAwtState.java:61)
              at sun.awt.X11.XGlobalCursorManager.findHeavyweightUnderCursor(XGlobalCursorManager.java:169)
              at sun.awt.X11.XGlobalCursorManager.findHeavyweightUnderCursor(XGlobalCursorManager.java:185)
              at sun.awt.GlobalCursorManager._updateCursor(GlobalCursorManager.java:179)
              at sun.awt.GlobalCursorManager.updateCursorImmediately(GlobalCursorManager.java:95)
              at sun.awt.X11.XComponentPeer.updateCursorImmediately(XComponentPeer.java:838)
              at java.awt.Component.updateCursorImmediately(Component.java:2846)
              at java.awt.Component.show(Component.java:1458)
              - locked <0xad0ce048> (a java.awt.Component$AWTTreeLock)
              at java.awt.Window.show(Window.java:903)
              at java.awt.Component.show(Component.java:1483)
              at java.awt.Component.setVisible(Component.java:1435)
              at java.awt.Window.setVisible(Window.java:875)
              at javasoft.sqe.jck.lib.awt.ComponentShow.makeVisible(ComponentShow.java:37)
              - locked <0xad0e5b08> (a java.awt.Frame)
              at javasoft.sqe.tests.api.java.awt.Component.getLocationOnScreenTests.Component2053(getLocationOnScreenTests.java:55)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:623)
              at javasoft.sqe.javatest.lib.MultiTest.invokeTestCase(MultiTest.java:406)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:195)
              at javasoft.sqe.javatest.lib.MultiTest.run(MultiTest.java:127)
              at javasoft.sqe.tests.api.java.awt.Component.getLocationOnScreenTests.main(getLocationOnScreenTests.java:31)
      "AWT-XAWT":
              at java.awt.Frame.getExtendedState(Frame.java:808)
              - waiting to lock <0xad0e5b08> (a java.awt.Frame)
              at java.awt.Frame.paramString(Frame.java:970)
              at java.awt.Component.toString(Component.java:7814)
              at java.lang.String.valueOf(String.java:2838)
              at java.lang.StringBuilder.append(StringBuilder.java:128)
              at sun.awt.X11.XDecoratedPeer.requestWindowFocus(XDecoratedPeer.java:1170)
              at sun.awt.X11.XDecoratedPeer.handleWmTakeFocus(XDecoratedPeer.java:1041)
              at sun.awt.X11.XDecoratedPeer.handleClientMessage(XDecoratedPeer.java:1034)
              at sun.awt.X11.XBaseWindow.dispatchEvent(XBaseWindow.java:1074)
              at sun.awt.X11.XBaseWindow.dispatchToWindow(XBaseWindow.java:1056)
              at sun.awt.X11.XToolkit.dispatchEvent(XToolkit.java:504)
              at sun.awt.X11.XToolkit.run(XToolkit.java:599)
              at sun.awt.X11.XToolkit.run(XToolkit.java:534)
              at java.lang.Thread.run(Thread.java:713)
       
      Found 1 deadlock.
       
      Heap
       PSYoungGen total 6272K, used 1961K [0xad050000, 0xad750000, 0xb40f0000)
        eden space 5376K, 36% used [0xad050000,0xad23a458,0xad590000)
        from space 896K, 0% used [0xad670000,0xad670000,0xad750000)
        to space 896K, 0% used [0xad590000,0xad590000,0xad670000)
       PSOldGen total 57664K, used 0K [0x74af0000, 0x78340000, 0xad050000)
        object space 57664K, 0% used [0x74af0000,0x74af0000,0x78340000)
       PSPermGen total 16384K, used 5719K [0x70af0000, 0x71af0000, 0x74af0000)
        object space 16384K, 34% used [0x70af0000,0x71085e88,0x71af0000)

            dcherepanov Dmitry Cherepanov
            art Artem Ananiev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: