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

deadlock situation in AWT/Lightweights

XMLWordPrintable

    • x86
    • windows_nt



      Name: mf23781 Date: 11/25/97


      Here is a major deadlock situation in AWT/Lightweights. This problem occurs on
      JDK 1.1.4 and JDK 1.1.5.
      If you look below, you see that we create a modal dialog in our main thread
      (12) and then when a JButton is hit, we create a second modal dialog within the
      AWT-EventQueue-0 thread (5). On the AWT-Dispatch-Proxy thread (10), a
      setCursor is being performed (not by us but by the system) which is causing a
      deadlock between threads 5 and 10.
      If I make the dialog in thread 5 non-modal, the deadlock goes away, but this is
      not a viable solution for us.

      Group system:
       1. (java.lang.Thread)0xf600d0 Finalizer thread cond. waitin
       2. (java.lang.Thread)0xf655b0 Debugger agent running
       3. (sun.tools.debug.BreakpointHandler)0xf78ff0 Breakpoint handler cond. waitin
       4. (sun.tools.debug.StepHandler)0xf79078 Step handler cond. waitin
       5. (java.awt.EventDispatchThread)0xf7f1f8 AWT-EventQueue-0 running
       6. (java.lang.Thread)0xf7f2a8 AWT-Windows running
       7. (java.lang.Thread)0xf7f358 TimerQueue running
       8. (sun.awt.ScreenUpdater)0xf7b1d8 Screen Updater running
       9. (sun.awt.AWTFinalizer)0xf7b298 AWT-Finalizer running
      10. (java.awt.EventDispatchThread)0xf85db0 AWT-Dispatch-Proxy running
      Group main:
      11. (java.lang.Thread)0xf600a8 main running
      Group lotus.sametime.apps.blimp.BLIMp.main:
      12. (sun.tools.debug.MainThread)0xf7d0d0 main running
      Group BLIMp:
      Group PacketThreadManager:
      13. (lotus.sametime.protocol.net.PacketParserThread)0xf8ab38 PacketParserThread
      Group SocketManager:
      14. (lotus.sametime.protocol.net.SocketManager$SelectThread)0xf8acb8 SelectThre
      Group BLIMp:
      Group PacketThreadManager:
      13. (lotus.sametime.protocol.net.PacketParserThread)0xf8ab38 PacketParserThread
      Group SocketManager:
      14. (lotus.sametime.protocol.net.SocketManager$SelectThread)0xf8acb8 SelectThre

      main 1Ù where 5
         1Ù sun.awt.windows.WDialogPeer.show (WDialogPeer:55)
         2Ù java.awt.Dialog.show (Dialog:220)
         3Ù java.awt.Component.show (Component:498)
         4Ù java.awt.Component.setVisible (Component:460)
         5Ù lotus.sametime.apps.blimp.LoginDialog.actionPerformed (LoginDialog:482)
         6Ù com.sun.java.swing.AbstractButton.fireActionPerformed (AbstractButton:759)
         7Ù com.sun.java.swing.AbstractButton$ForwardActionEvents.actionPerformed
      (AbstractButton$ForwardActionEvents:794)
         8Ù com.sun.java.swing.DefaultButtonModel.fireActionPerformed
      (DefaultButtonModel:314)
         9Ù com.sun.java.swing.DefaultButtonModel.setPressed (DefaultButtonModel:212)
         10Ù com.sun.java.swing.basic.BasicButtonListener.mouseReleased
      (BasicButtonListener:135)
         11Ù java.awt.Component.processMouseEvent (Component:2284)
         12Ù java.awt.Component.processEvent (Component:2129)
         13Ù java.awt.Container.processEvent (Container:890)
         14Ù java.awt.Component.dispatchEventImpl (Component:1764)
         15Ù java.awt.Container.dispatchEventImpl (Container:935)
         16Ù java.awt.Component.dispatchEvent (Component:1704)
         17Ù java.awt.LightweightDispatcher.retargetMouseEvent
      (LightweightDispatcher:1539)
         18Ù java.awt.LightweightDispatcher.processMouseEvent
      (LightweightDispatcher:1448)
         19Ù java.awt.LightweightDispatcher.dispatchEvent (LightweightDispatcher:1383)
         20Ù java.awt.Container.dispatchEventImpl (Container:922)
         21Ù java.awt.Window.dispatchEventImpl (Window:443)
         22Ù java.awt.Component.dispatchEvent (Component:1704)
         23Ù java.awt.EventDispatchThread.run (EventDispatchThread:63)

      main 1Ù where 10
         1Ù java.awt.Component.setCursor (Component:1193)
         2Ù java.awt.LightweightDispatcher.setMouseTarget (LightweightDispatcher:1508)
         3Ù java.awt.LightweightDispatcher.processMouseEvent
      (LightweightDispatcher:1464)
         4Ù java.awt.LightweightDispatcher.dispatchEvent (LightweightDispatcher:1383)
         5Ù java.awt.Container.dispatchEventImpl (Container:922)
         6Ù java.awt.Window.dispatchEventImpl (Window:443)
         7Ù java.awt.Component.dispatchEvent (Component:1704)
         8Ù java.awt.EventDispatchThread.run (EventDispatchThread:63)

      main 1Ù where 12
         1Ù sun.awt.windows.WDialogPeer.show (WDialogPeer:55)
         2Ù java.awt.Dialog.show (Dialog:220)
         3Ù java.awt.Component.show (Component:498)
         4Ù java.awt.Component.setVisible (Component:460)
         5Ù lotus.sametime.apps.blimp.BLIMp.login (BLIMp:438)
         6Ù lotus.sametime.apps.blimp.BLIMp.main (BLIMp:1095)
         7Ù sun.tools.debug.MainThread.run (MainThread:55)

      - Michael

      ======================================================================

        I wish I had a small test case. Both problems (4095123 & 4095124) occur
        with the same code, which is not large itself but requires JNDI, LDAP,
        and SWING.

        I tried to reduce the problem down but the problem just doesn't
        occur. I am not sure if its timing related or what. These problems
        have occurred on Win32 (NT and 95). I haven't tested any other
        platform.

            duke J. Duke
            miflemi Mick Fleming
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: