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

XAWT: deadlock found in components initialization

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b53
    • CPU:
      x86
    • OS:
      linux

      Description

      Run the following regression test with XToolkit: test/java/awt/TrayIcon/FocusLostAfterTrayTest/test/java/awt/TrayIcon/FocusLostAfterTrayTest.java

      It will dead lock. Here's the stack trace:

      2005-08-17 14:08:12
      Full thread dump Java HotSpot(TM) Server VM (1.6.0-ea-b42 mixed mode):

      "TimerQueue" daemon prio=1 tid=0x08217c78 nid=0x44aa in Object.wait() [0x8f07a000..0x8f07a690]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xb0300b70> (a javax.swing.TimerQueue)
              at javax.swing.TimerQueue.run(TimerQueue.java:233)
              - locked <0xb0300b70> (a javax.swing.TimerQueue)
              at java.lang.Thread.run(Thread.java:608)

      "AWT-EventQueue-1" prio=1 tid=0x081e4f78 nid=0x4491 waiting for monitor entry [0x8f118000..0x8f119610]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at sun.java2d.x11.X11SurfaceData.isDrawableValid(Native Method)
              at sun.java2d.x11.X11SurfaceData$X11WindowSurfaceData.<init>(X11SurfaceData.java:536)
              at sun.java2d.x11.X11SurfaceData.createData(X11SurfaceData.java:355)
              at sun.awt.X11GraphicsConfig.createSurfaceData(X11GraphicsConfig.java:406)
              at sun.awt.X11.XWindow.validateSurface(XWindow.java:1066)
              at sun.awt.X11.XComponentPeer.setBounds(XComponentPeer.java:555)
              at sun.awt.X11.XTextAreaPeer.setBounds(XTextAreaPeer.java:285)
              at java.awt.Component.reshapeNativePeer(Component.java:2033)
              at java.awt.Component.reshape(Component.java:1989)
              - locked <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Component.setBounds(Component.java:1956)
              at java.awt.BorderLayout.layoutContainer(BorderLayout.java:813)
              - locked <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.layout(Container.java:1395)
              at java.awt.Container.doLayout(Container.java:1384)
              at java.awt.Container.validateTree(Container.java:1467)
              at java.awt.Container.validate(Container.java:1442)
              - locked <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Window.dispatchEventImpl(Window.java:2192)
              at java.awt.Component.dispatchEvent(Component.java:4177)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

      "DestroyJavaVM" prio=1 tid=0x8fbe0710 nid=0x4427 waiting on condition [0x00000000..0xbfff9510]
         java.lang.Thread.State: RUNNABLE

      "AWT-EventQueue-0" prio=1 tid=0x8fbc2e08 nid=0x4473 in Object.wait() [0x8f1b3000..0x8f1b3510]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xb01a3cd0> (a java.awt.EventQueue)
              at java.lang.Object.wait(Object.java:484)
              at java.awt.EventQueue.getNextEvent(EventQueue.java:480)
              - locked <0xb01a3cd0> (a java.awt.EventQueue)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:245)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)

      "AWT-Shutdown" prio=1 tid=0x8fbc1028 nid=0x4472 in Object.wait() [0x8f234000..0x8f234490]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xb016c860> (a java.lang.Object)
              at java.lang.Object.wait(Object.java:484)
              at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
              - locked <0xb016c860> (a java.lang.Object)
              at java.lang.Thread.run(Thread.java:608)

      "thread applet-FocusLostAfterTrayTest.class" prio=1 tid=0x8fb9de60 nid=0x446a waiting for monitor entry [0x8f2b5000..0x8f2b5810]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at java.awt.Window.getGraphicsConfiguration(Window.java:2498)
              - waiting to lock <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at sun.awt.X11.XWindow.initGraphicsConfiguration(XWindow.java:129)
              at sun.awt.X11.XWindow.preInit(XWindow.java:139)
              at sun.awt.X11.XComponentPeer.preInit(XComponentPeer.java:118)
              at sun.awt.X11.XWindowPeer.preInit(XWindowPeer.java:76)
              at sun.awt.X11.XDecoratedPeer.preInit(XDecoratedPeer.java:53)
              at sun.awt.X11.XFramePeer.preInit(XFramePeer.java:38)
              at sun.awt.X11.XEmbeddedFramePeer.preInit(XEmbeddedFramePeer.java:37)
              at sun.awt.X11.XBaseWindow.init(XBaseWindow.java:135)
              at sun.awt.X11.XBaseWindow.<init>(XBaseWindow.java:173)
              at sun.awt.X11.XWindow.<init>(XWindow.java:88)
              at sun.awt.X11.XComponentPeer.<init>(XComponentPeer.java:102)
              at sun.awt.X11.XCanvasPeer.<init>(XCanvasPeer.java:22)
              at sun.awt.X11.XPanelPeer.<init>(XPanelPeer.java:27)
              at sun.awt.X11.XWindowPeer.<init>(XWindowPeer.java:63)
              at sun.awt.X11.XDecoratedPeer.<init>(XDecoratedPeer.java:41)
              at sun.awt.X11.XFramePeer.<init>(XFramePeer.java:34)
              at sun.awt.X11.XEmbeddedFramePeer.<init>(XEmbeddedFramePeer.java:28)
              at sun.awt.X11.XToolkit.createEmbeddedFrame(XToolkit.java:846)
              at sun.awt.X11.XEmbeddedFrame.<init>(XEmbeddedFrame.java:35)
              at sun.awt.X11.XTrayIconPeer$2.<init>(XTrayIconPeer.java:65)
              at sun.awt.X11.XTrayIconPeer.<init>(XTrayIconPeer.java:61)
              at sun.awt.X11.XToolkit.createTrayIcon(XToolkit.java:873)
              at java.awt.TrayIcon.addNotify(TrayIcon.java:638)
              - locked <0xb0397e10> (a java.awt.TrayIcon)
              at java.awt.SystemTray.add(SystemTray.java:231)
              at FocusLostAfterTrayTest.start(FocusLostAfterTrayTest.java:77)
              at sun.applet.AppletPanel.run(AppletPanel.java:457)
              at java.lang.Thread.run(Thread.java:608)

      "AWT-XAWT" daemon prio=1 tid=0x8fb99370 nid=0x4464 waiting for monitor entry [0x8f336000..0x8f336710]
         java.lang.Thread.State: BLOCKED (on object monitor)
              at sun.awt.X11.XToolkit.waitForEvents(Native Method)
              at sun.awt.X11.XToolkit.run(XToolkit.java:570)
              at sun.awt.X11.XToolkit.run(XToolkit.java:545)
              at java.lang.Thread.run(Thread.java:608)

      "Java2D Disposer" daemon prio=1 tid=0x08154970 nid=0x4456 in Object.wait() [0x8f3cb000..0x8f3cb690]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xb0168468> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
              - locked <0xb0168468> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
              at sun.java2d.Disposer.run(Disposer.java:107)
              at java.lang.Thread.run(Thread.java:608)

      "Low Memory Detector" daemon prio=1 tid=0x8fb3d2e0 nid=0x4443 runnable [0x00000000..0x00000000]
         java.lang.Thread.State: RUNNABLE

      "CompilerThread1" daemon prio=1 tid=0x8fb3c008 nid=0x4442 waiting on condition [0x00000000..0x8f77bab8]
         java.lang.Thread.State: RUNNABLE

      "CompilerThread0" daemon prio=1 tid=0x8fb3b0f8 nid=0x4441 waiting on condition [0x00000000..0x8f7fca38]
         java.lang.Thread.State: RUNNABLE

      "Signal Dispatcher" daemon prio=1 tid=0x8fb3a1d0 nid=0x4440 waiting on condition [0x00000000..0x00000000]
         java.lang.Thread.State: RUNNABLE

      "Finalizer" daemon prio=1 tid=0x8fb2e5c8 nid=0x443a in Object.wait() [0x8f8ff000..0x8f8ff790]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xb00d0ae0> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
              - locked <0xb00d0ae0> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

      "Reference Handler" daemon prio=1 tid=0x8fb2d8c8 nid=0x4439 in Object.wait() [0x8faff000..0x8faff710]
         java.lang.Thread.State: WAITING (on object monitor)
              at java.lang.Object.wait(Native Method)
              - waiting on <0xb00d09e8> (a java.lang.ref.Reference$Lock)
              at java.lang.Object.wait(Object.java:484)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
              - locked <0xb00d09e8> (a java.lang.ref.Reference$Lock)

      "VM Thread" prio=1 tid=0x8fb294e8 nid=0x4438 runnable

      "GC task thread#0 (ParallelGC)" prio=1 tid=0x080d73a0 nid=0x4434 runnable

      "GC task thread#1 (ParallelGC)" prio=1 tid=0x080d7788 nid=0x4435 runnable

      "GC task thread#2 (ParallelGC)" prio=1 tid=0x080d7b70 nid=0x4436 runnable

      "GC task thread#3 (ParallelGC)" prio=1 tid=0x080d8350 nid=0x4437 runnable

      "VM Periodic Task Thread" prio=1 tid=0x8fb3e7d0 nid=0x4444 waiting on condition

      JNI global references: 671


      Found one Java-level deadlock:
      =============================
      "AWT-EventQueue-1":
        waiting to lock monitor 0x080d92ec (object 0x90369fc8, a java.lang.Class)
        in JNI, which is held by "thread applet-FocusLostAfterTrayTest.class"
      "thread applet-FocusLostAfterTrayTest.class":
        waiting to lock monitor 0x080d936c (object 0xb011d7a0, a java.awt.Component$AWTTreeLock),
        which is held by "AWT-EventQueue-1"

      Java stack information for the threads listed above:
      ===================================================
      "AWT-EventQueue-1":
              at sun.java2d.x11.X11SurfaceData.isDrawableValid(Native Method)
              at sun.java2d.x11.X11SurfaceData$X11WindowSurfaceData.<init>(X11SurfaceData.java:536)
              at sun.java2d.x11.X11SurfaceData.createData(X11SurfaceData.java:355)
              at sun.awt.X11GraphicsConfig.createSurfaceData(X11GraphicsConfig.java:406)
              at sun.awt.X11.XWindow.validateSurface(XWindow.java:1066)
              at sun.awt.X11.XComponentPeer.setBounds(XComponentPeer.java:555)
              at sun.awt.X11.XTextAreaPeer.setBounds(XTextAreaPeer.java:285)
              at java.awt.Component.reshapeNativePeer(Component.java:2033)
              at java.awt.Component.reshape(Component.java:1989)
              - locked <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Component.setBounds(Component.java:1956)
              at java.awt.BorderLayout.layoutContainer(BorderLayout.java:813)
              - locked <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.layout(Container.java:1395)
              at java.awt.Container.doLayout(Container.java:1384)
              at java.awt.Container.validateTree(Container.java:1467)
              at java.awt.Container.validate(Container.java:1442)
              - locked <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Window.dispatchEventImpl(Window.java:2192)
              at java.awt.Component.dispatchEvent(Component.java:4177)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
      "thread applet-FocusLostAfterTrayTest.class":
              at java.awt.Window.getGraphicsConfiguration(Window.java:2498)
              - waiting to lock <0xb011d7a0> (a java.awt.Component$AWTTreeLock)
              at sun.awt.X11.XWindow.initGraphicsConfiguration(XWindow.java:129)
              at sun.awt.X11.XWindow.preInit(XWindow.java:139)
              at sun.awt.X11.XComponentPeer.preInit(XComponentPeer.java:118)
              at sun.awt.X11.XWindowPeer.preInit(XWindowPeer.java:76)
              at sun.awt.X11.XDecoratedPeer.preInit(XDecoratedPeer.java:53)
              at sun.awt.X11.XFramePeer.preInit(XFramePeer.java:38)
              at sun.awt.X11.XEmbeddedFramePeer.preInit(XEmbeddedFramePeer.java:37)
              at sun.awt.X11.XBaseWindow.init(XBaseWindow.java:135)
              at sun.awt.X11.XBaseWindow.<init>(XBaseWindow.java:173)
              at sun.awt.X11.XWindow.<init>(XWindow.java:88)
              at sun.awt.X11.XComponentPeer.<init>(XComponentPeer.java:102)
              at sun.awt.X11.XCanvasPeer.<init>(XCanvasPeer.java:22)
              at sun.awt.X11.XPanelPeer.<init>(XPanelPeer.java:27)
              at sun.awt.X11.XWindowPeer.<init>(XWindowPeer.java:63)
              at sun.awt.X11.XDecoratedPeer.<init>(XDecoratedPeer.java:41)
              at sun.awt.X11.XFramePeer.<init>(XFramePeer.java:34)
              at sun.awt.X11.XEmbeddedFramePeer.<init>(XEmbeddedFramePeer.java:28)
              at sun.awt.X11.XToolkit.createEmbeddedFrame(XToolkit.java:846)
              at sun.awt.X11.XEmbeddedFrame.<init>(XEmbeddedFrame.java:35)
              at sun.awt.X11.XTrayIconPeer$2.<init>(XTrayIconPeer.java:65)
              at sun.awt.X11.XTrayIconPeer.<init>(XTrayIconPeer.java:61)
              at sun.awt.X11.XToolkit.createTrayIcon(XToolkit.java:873)
              at java.awt.TrayIcon.addNotify(TrayIcon.java:638)
              - locked <0xb0397e10> (a java.awt.TrayIcon)
              at java.awt.SystemTray.add(SystemTray.java:231)
              at FocusLostAfterTrayTest.start(FocusLostAfterTrayTest.java:77)
              at sun.applet.AppletPanel.run(AppletPanel.java:457)
              at java.lang.Thread.run(Thread.java:608)

      Found 1 deadlock.

        Attachments

          Activity

            People

            Assignee:
            dmikhalksunw Denis Mikhalkin (Inactive)
            Reporter:
            ant Anton Tarasov
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: