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

JDK1.3.1_9: dead lock in sun.awt.motif.X11InputMethod cause application hang

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 1.3.1_09
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:
      None

      Description

      1. Customer has reported the following while keying in korean characters.
      ----------------------------------------------------------------------------
      Exception in thread "AWT-Motif" java.lang.StringIndexOutOfBoundsException
      at java.lang.StringBuffer.insert(StringBuffer.java:803)
      at
      sun.awt.motif.X11InputMethod.dispatchComposedText(X11InputMethod.java:516)
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)
      Exception in thread "AWT-Motif" java.lang.NullPointerException:
      NullPointerException: constructor failed.
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)
      Exception in thread "AWT-Motif" java.lang.NullPointerException:
      NullPointerException: constructor failed.
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)
      Exception in thread "AWT-Motif" java.lang.NullPointerException:
      NullPointerException: constructor failed.
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)
      Exception in thread "AWT-Motif" java.lang.NullPointerException:
      NullPointerException: constructor failed.
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)
      Exception occurred during event dispatching:
      java.lang.NullPointerException
      at sun.awt.motif.FullyRenderedTransferable.<init>(X11Clipboard.java:216)
      at sun.awt.motif.X11Clipboard.getContents(X11Clipboard.java:72)
      at javax.swing.text.JTextComponent.paste(JTextComponent.java:980)
      at javax.swing.text.DefaultEditorKit$PasteAction.actionPerformed(Defau
      ---------------------------------------------------------------------------------

      2. Doing a Control+\ showed a java level dead lock.

      ^\Full thread dump:

      "TimerQueue" daemon prio=5 tid=0x262a80 nid=0x11 waiting on monitor
      [0xf4201000..0xf42019d8]
      at java.lang.Object.wait(Native Method)
      at javax.swing.TimerQueue.run(TimerQueue.java:228)
      at java.lang.Thread.run(Thread.java:479)

      "Thread-0" prio=5 tid=0x287f0 nid=0x1 waiting on monitor [0..0xffbee428]

      "Screen Updater" prio=5 tid=0x2f53f8 nid=0x10 waiting on monitor
      [0xf4301000..0xf43019d8]
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Object.java:415)
      at sun.awt.ScreenUpdater.nextEntry(ScreenUpdater.java:71)
      at sun.awt.ScreenUpdater.run(ScreenUpdater.java:90)

      "AWT-Motif" prio=6 tid=0x23a8a0 nid=0xe waiting for monitor entry
      [0xf4500000..0xf45019d8]
      at
      sun.awt.motif.X11InputMethod.dispatchComposedText(X11InputMethod.java:482)
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)

      "SunToolkit.PostEventQueue-0" prio=6 tid=0x1c6dc0 nid=0xd waiting on
      monitor [0xf4601000..0xf46019d8]
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Object.java:415)
      at sun.awt.PostEventQueue.run(SunToolkit.java:486)

      "AWT-EventQueue-0" prio=5 tid=0x1c6c80 nid=0xc waiting for monitor entry
      [0xf4700000..0xf47019d8]
      at sun.awt.motif.X11InputMethod.setXICFocus(Native Method)
      at sun.awt.motif.X11InputMethod.deactivate(X11InputMethod.java:283)
      at sun.awt.im.InputContext.deactivateInputMethod(InputContext.java:389)
      at sun.awt.im.InputContext.focusGained(InputContext.java:256)
      at sun.awt.im.InputContext.dispatchEvent(InputContext.java:193)
      at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:172)
      at java.awt.Component.dispatchEventImpl(Component.java:2522)
      at java.awt.Container.dispatchEventImpl(Container.java:1208)
      at java.awt.Component.dispatchEvent(Component.java:2492)
      at java.awt.LightweightDispatcher.setFocusRequest(Container.java:2099)
      at java.awt.Container.proxyRequestFocus(Container.java:1330)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Component.requestFocus(Component.java:4169)
      at javax.swing.JComponent.grabFocus(JComponent.java:910)
      at javax.swing.JComponent.requestFocus(JComponent.java:892)
      at
      javax.swing.plaf.basic.BasicMenuUI$ChangeHandler.validateKeyboardActions(BasicMe
      nuUI.java:414)
      at
      javax.swing.plaf.basic.BasicMenuUI$ChangeHandler.stateChanged(BasicMenuUI.java:3
      90)
      at javax.swing.AbstractButton.fireStateChanged(AbstractButton.java:1355)
      at
      javax.swing.AbstractButton$ButtonChangeListener.stateChanged(AbstractButton.java
      :1411)
      at
      javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:331)
      at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:222)
      at javax.swing.JMenu.setSelected(JMenu.java:270)
      at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1168)
      at
      javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:79)
      at
      javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mousePressed(BasicMenuUI.ja
      va:286)
      at java.awt.Component.processMouseEvent(Component.java:3707)
      at java.awt.Component.processEvent(Component.java:3539)
      at java.awt.Container.processEvent(Container.java:1159)
      at java.awt.Component.dispatchEventImpl(Component.java:2588)
      at java.awt.Container.dispatchEventImpl(Container.java:1208)
      at java.awt.Component.dispatchEvent(Component.java:2492)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
      at java.awt.Container.dispatchEventImpl(Container.java:1195)
      at java.awt.Window.dispatchEventImpl(Window.java:923)
      at java.awt.Component.dispatchEvent(Component.java:2492)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
      at
      java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:1
      26)
      at
      java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

      "Signal Dispatcher" daemon prio=10 tid=0xa6810 nid=0xa waiting on
      monitor [0..0]

      "Finalizer" daemon prio=8 tid=0xa1c00 nid=0x7 waiting on monitor
      [0xfaf81000..0xfaf819d8]
      at java.lang.Object.wait(Native Method)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:103)
      at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:118)
      at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:157)

      "Reference Handler" daemon prio=10 tid=0xa02c8 nid=0x6 waiting on
      monitor [0xfe281000..0xfe2819d8]
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Object.java:415)
      at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:105)

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

      "VM Periodic Task Thread" prio=10 tid=0xa3278 nid=0x8 waiting on monitor
      "Suspend Checker Thread" prio=10 tid=0xa5f18 nid=0x9 runnable

      FOUND A JAVA LEVEL DEADLOCK:
      ----------------------------
      "AWT-Motif":
      waiting to lock monitor 0xa0e78 (object 0xf5559830, a
      sun.awt.motif.X11InputMethod),
      which is locked by "AWT-EventQueue-0"
      "AWT-EventQueue-0":
      waiting to lock monitor 0xa0d60 (object 0xf8d7bb70, a java.lang.Class)
      in JNI, which is locked by "AWT-Motif"

      JAVA STACK INFORMATION FOR THREADS LISTED ABOVE:
      ------------------------------------------------
      Java Stack for "AWT-Motif":
      ==========
      at
      sun.awt.motif.X11InputMethod.dispatchComposedText(X11InputMethod.java:482)
      at sun.awt.motif.MToolkit.run(Native Method)
      at java.lang.Thread.run(Thread.java:479)
      Java Stack for "AWT-EventQueue-0":
      ==========
      at sun.awt.motif.X11InputMethod.setXICFocus(Native Method)
      at sun.awt.motif.X11InputMethod.deactivate(X11InputMethod.java:283)
      - locked <f5559830> (a sun.awt.motif.X11InputMethod)
      at sun.awt.im.InputContext.deactivateInputMethod(InputContext.java:389)
      at sun.awt.im.InputContext.focusGained(InputContext.java:256)
      - locked <f5554890> (a sun.awt.im.InputMethodContext)
      - locked <f537ceb8> (a java.awt.Component$AWTTreeLock)
      at sun.awt.im.InputContext.dispatchEvent(InputContext.java:193)
      at sun.awt.im.InputMethodContext.dispatchEvent(InputMethodContext.java:172)
      at java.awt.Component.dispatchEventImpl(Component.java:2522)
      at java.awt.Container.dispatchEventImpl(Container.java:1208)
      at java.awt.Component.dispatchEvent(Component.java:2492)
      at java.awt.LightweightDispatcher.setFocusRequest(Container.java:2099)
      at java.awt.Container.proxyRequestFocus(Container.java:1330)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Container.proxyRequestFocus(Container.java:1325)
      at java.awt.Component.requestFocus(Component.java:4169)
      at javax.swing.JComponent.grabFocus(JComponent.java:910)
      at javax.swing.JComponent.requestFocus(JComponent.java:892)
      at
      javax.swing.plaf.basic.BasicMenuUI$ChangeHandler.validateKeyboardActions(BasicMe
      nuUI.java:414)
      at
      javax.swing.plaf.basic.BasicMenuUI$ChangeHandler.stateChanged(BasicMenuUI.java:3
      90)
      at javax.swing.AbstractButton.fireStateChanged(AbstractButton.java:1355)
      at
      javax.swing.AbstractButton$ButtonChangeListener.stateChanged(AbstractButton.java
      :1411)
      at
      javax.swing.DefaultButtonModel.fireStateChanged(DefaultButtonModel.java:331)
      at javax.swing.DefaultButtonModel.setSelected(DefaultButtonModel.java:222)
      at javax.swing.JMenu.setSelected(JMenu.java:270)
      at javax.swing.JMenu.menuSelectionChanged(JMenu.java:1168)
      at
      javax.swing.MenuSelectionManager.setSelectedPath(MenuSelectionManager.java:79)
      at
      javax.swing.plaf.basic.BasicMenuUI$MouseInputHandler.mousePressed(BasicMenuUI.ja
      va:286)
      at java.awt.Component.processMouseEvent(Component.java:3707)
      at java.awt.Component.processEvent(Component.java:3539)
      at java.awt.Container.processEvent(Container.java:1159)
      at java.awt.Component.dispatchEventImpl(Component.java:2588)
      at java.awt.Container.dispatchEventImpl(Container.java:1208)
      at java.awt.Component.dispatchEvent(Component.java:2492)
      at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451)
      at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2210)
      at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125)
      at java.awt.Container.dispatchEventImpl(Container.java:1195)
      at java.awt.Window.dispatchEventImpl(Window.java:923)
      at java.awt.Component.dispatchEvent(Component.java:2492)
      at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
      at
      java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
      at
      java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
      at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
      at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

      Found 1 deadlock.
      =====================================================================================
      ###@###.### 2003-09-23
      ###@###.### 2003-09-23

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              naoto Naoto Sato
              Reporter:
              fchoong Fui-Shien Choong
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: