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

Frame/Window deadlock

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.1_05, 1.4.2_03
    • Fix Version/s: 5.0
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      tiger
    • CPU:
      sparc
    • OS:
      solaris_7, solaris_9

      Description

      A deadlock occurs in AWT if a certain code is executed.
      The code is in the Comments section.

      The trace follows:
      [pv76716@druid]~/jprogs$ java WTest
      Constructor done
      ^\Full thread dump Java HotSpot(TM) 64-Bit Server VM (1.4.1-b21 mixed mode):

      "DestroyJavaVM" prio=5 tid=0x10010eb20 nid=0x1 waiting on condition [0..ffffffff7fffe440]

      "AWT-EventQueue-0" prio=6 tid=0x1004f97b0 nid=0x11 waiting for monitor entry [ffffffff2e1ff000..ffffffff2e201520]
              at sun.awt.motif.X11FontMetrics.getMFCharsWidth(Native Method)
              at sun.awt.motif.X11FontMetrics.charsWidth(X11FontMetrics.java:169)
              at sun.awt.motif.X11FontMetrics.stringWidth(X11FontMetrics.java:159)
              at sun.awt.motif.MButtonPeer.getMinimumSize(MButtonPeer.java:27)
              at sun.awt.motif.MComponentPeer.getPreferredSize(MComponentPeer.java:392)
              at sun.awt.motif.MComponentPeer.preferredSize(MComponentPeer.java:870)
              at java.awt.Component.preferredSize(Component.java:1987)
              - locked <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Component.getPreferredSize(Component.java:1968)
              at java.awt.FlowLayout.layoutContainer(FlowLayout.java:437)
              - locked <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.layout(Container.java:1017)
              at java.awt.Container.doLayout(Container.java:1007)
              at java.awt.Container.validateTree(Container.java:1089)
              at java.awt.Container.validate(Container.java:1064)
              - locked <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Window.dispatchEventImpl(Window.java:1583)
              at java.awt.Component.dispatchEvent(Component.java:3439)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

      "Thread-3" prio=5 tid=0x1004f93c0 nid=0x10 waiting for monitor entry [ffffffff2e380000..ffffffff2e381520]
              at java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(ContainerOrderFocusTraversalPolicy.java:226)
              - waiting to lock <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.ContainerOrderFocusTraversalPolicy.getDefaultComponent(ContainerOrderFocusTraversalPolicy.java:315)
              at java.awt.Window.isFocusableWindow(Window.java:1410)
              at sun.awt.motif.MWindowPeer.pShow(Native Method)
              at sun.awt.motif.MWindowPeer.toFront(MWindowPeer.java:140)
              at java.awt.Window.toFront(Window.java:623)
              at WTest$TestWindow.run(WTest.java:62)
              at java.lang.Thread.run(Thread.java:536)

      "Thread-1" daemon prio=5 tid=0x1004e2410 nid=0xf in Object.wait() [ffffffff2e500000..ffffffff2e501520]
              at java.lang.Object.wait(Native Method)
              - waiting on <ffffffff31600f10> (a java.util.TaskQueue)
              at java.util.TimerThread.mainLoop(Timer.java:429)
              - locked <ffffffff31600f10> (a java.util.TaskQueue)
              at java.util.TimerThread.run(Timer.java:382)

      "Java2D Disposer" daemon prio=10 tid=0x1004e8230 nid=0xe in Object.wait() [ffffffff2e680000..ffffffff2e681520]
              at java.lang.Object.wait(Native Method)
              - waiting on <ffffffff31600fe0> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
              - locked <ffffffff31600fe0> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
              at sun.java2d.Disposer.run(Disposer.java:97)
              at java.lang.Thread.run(Thread.java:536)

      "AWT-Motif" daemon prio=6 tid=0x1004c6d50 nid=0xd waiting for monitor entry [ffffffff2ee81000..ffffffff2ee81520]
              at sun.awt.motif.MToolkit.run(Native Method)
              at java.lang.Thread.run(Thread.java:536)

      "AWT-Shutdown" prio=5 tid=0x10046a950 nid=0xc in Object.wait() [ffffffff2f380000..ffffffff2f381520]
              at java.lang.Object.wait(Native Method)
              - waiting on <ffffffff32a4ea18> (a java.lang.Object)
              at java.lang.Object.wait(Object.java:426)
              at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
              - locked <ffffffff32a4ea18> (a java.lang.Object)
              at java.lang.Thread.run(Thread.java:536)

      "Signal Dispatcher" daemon prio=10 tid=0x1001f0220 nid=0x9 waiting on condition [0..0]

      "Finalizer" daemon prio=8 tid=0x1001e7e00 nid=0x6 in Object.wait() [ffffffff39780000..ffffffff39781520]
              at java.lang.Object.wait(Native Method)
              - waiting on <ffffffff32a4ec28> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
              - locked <ffffffff32a4ec28> (a java.lang.ref.ReferenceQueue$Lock)
              at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

      "Reference Handler" daemon prio=10 tid=0x1001e7a90 nid=0x5 in Object.wait() [ffffffff3aa01000..ffffffff3aa01520]
              at java.lang.Object.wait(Native Method)
              - waiting on <ffffffff32a1e9d8> (a java.lang.ref.Reference$Lock)
              at java.lang.Object.wait(Object.java:426)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:113)
              - locked <ffffffff32a1e9d8> (a java.lang.ref.Reference$Lock)

      "VM Thread" prio=5 tid=0x1001e58f0 nid=0x4 runnable

      "VM Periodic Task Thread" prio=10 tid=0x1001eef20 nid=0x7 waiting on condition
      "Suspend Checker Thread" prio=10 tid=0x1001ef870 nid=0x8 runnable

      Found one Java-level deadlock:
      =============================
      "AWT-EventQueue-0":
        waiting to lock monitor 0x1e8668 (object 0x35686460, a java.lang.Class)
        in JNI, which is held by "Thread-3"
      "Thread-3":
        waiting to lock monitor 0x1e8758 (object 0x32a4f7b0, a java.awt.Component$AWTTreeLock),
        which is held by "AWT-EventQueue-0"

      Java stack information for the threads listed above:
      ===================================================
      "AWT-EventQueue-0":
              at sun.awt.motif.X11FontMetrics.getMFCharsWidth(Native Method)
              at sun.awt.motif.X11FontMetrics.charsWidth(X11FontMetrics.java:169)
              at sun.awt.motif.X11FontMetrics.stringWidth(X11FontMetrics.java:159)
              at sun.awt.motif.MButtonPeer.getMinimumSize(MButtonPeer.java:27)
              at sun.awt.motif.MComponentPeer.getPreferredSize(MComponentPeer.java:392)
              at sun.awt.motif.MComponentPeer.preferredSize(MComponentPeer.java:870)
              at java.awt.Component.preferredSize(Component.java:1987)
              - locked <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Component.getPreferredSize(Component.java:1968)
              at java.awt.FlowLayout.layoutContainer(FlowLayout.java:437)
              - locked <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Container.layout(Container.java:1017)
              at java.awt.Container.doLayout(Container.java:1007)
              at java.awt.Container.validateTree(Container.java:1089)
              at java.awt.Container.validate(Container.java:1064)
              - locked <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.Window.dispatchEventImpl(Window.java:1583)
              at java.awt.Component.dispatchEvent(Component.java:3439)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
      "Thread-3":
              at java.awt.ContainerOrderFocusTraversalPolicy.getFirstComponent(ContainerOrderFocusTraversalPolicy.java:226)
              - waiting to lock <ffffffff32a4f7b0> (a java.awt.Component$AWTTreeLock)
              at java.awt.ContainerOrderFocusTraversalPolicy.getDefaultComponent(ContainerOrderFocusTraversalPolicy.java:315)
              at java.awt.Window.isFocusableWindow(Window.java:1410)
              at sun.awt.motif.MWindowPeer.pShow(Native Method)
              at sun.awt.motif.MWindowPeer.toFront(MWindowPeer.java:140)
              at java.awt.Window.toFront(Window.java:623)
              at WTest$TestWindow.run(WTest.java:62)
              at java.lang.Thread.run(Thread.java:536)

      Found 1 deadlock.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmikhalksunw Denis Mikhalkin (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: