2 Replies Latest reply on Aug 9, 2019 2:02 PM by thatJeffSmith-Oracle

    SQL Developer hangs when disconnecting from an unreachable database

    2823225

      I have upgraded SQL Developer to 19.2 after I have noticed that the "Bugs Fixed" at https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-bugsfixed-192-5592850.html contain link to my old issueSQL Developer hangs (from

       

      "AWT-EventQueue-0" #13 prio=6 os_prio=0 tid=0x00007f11a0355800 nid=0x354b runnable [0x00007f1182988000]

         java.lang.Thread.State: RUNNABLE

              at sun.nio.ch.FileDispatcherImpl.read0(Native Method)

              at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)

              at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)

              at sun.nio.ch.IOUtil.read(IOUtil.java:197)

              at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)

              - locked <0x00000000e3a3b7f8> (a java.lang.Object)

              at oracle.net.nt.TimeoutSocketChannel.read(TimeoutSocketChannel.java:178)

              at oracle.net.ns.NSProtocolNIO.doSocketRead(NSProtocolNIO.java:544)

              at oracle.net.ns.NIOPacket.readHeader(NIOPacket.java:234)

              at oracle.net.ns.NIOPacket.readPacketFromSocketChannel(NIOPacket.java:174)

              at oracle.net.ns.NIOPacket.readFromSocketChannel(NIOPacket.java:122)

              at oracle.net.ns.NIOPacket.readFromSocketChannel(NIOPacket.java:100)

              at oracle.net.ns.NIONSDataChannel.readDataFromSocketChannel(NIONSDataChannel.java:86)

              at oracle.jdbc.driver.T4CMAREngineNIO.prepareForUnmarshall(T4CMAREngineNIO.java:762)

              at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:427)

              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:394)

              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:255)

              at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:610)

              at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:249)

              at oracle.jdbc.driver.T4CCallableStatement.doOall8(T4CCallableStatement.java:82)

              at oracle.jdbc.driver.T4CCallableStatement.executeForDescribe(T4CCallableStatement.java:761)

              at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:921)

              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1099)

              at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3640)

              at oracle.jdbc.driver.T4CCallableStatement.executeInternal(T4CCallableStatement.java:1318)

              at oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:3752)

              - locked <0x00000000e3a22750> (a oracle.jdbc.driver.T4CConnection)

              at oracle.jdbc.driver.OracleCallableStatement.execute(OracleCallableStatement.java:4242)

              - locked <0x00000000e3a22750> (a oracle.jdbc.driver.T4CConnection)

              at oracle.jdbc.driver.OraclePreparedStatementWrapper.execute(OraclePreparedStatementWrapper.java:1079)

              at oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCStatement$2oracle$1jdbc$1internal$1OracleCallableStatement$$$Proxy.execute(Unknown Source)

              at oracle.dbtools.db.DBUtil$6.call(DBUtil.java:514)

              at oracle.dbtools.db.DBUtil$6.call(DBUtil.java:503)

              at oracle.dbtools.db.DBUtil.lockForOperation(DBUtil.java:1704)

              at oracle.dbtools.db.DBUtil.execute(DBUtil.java:522)

              at oracle.dbtools.db.DBUtil.execute(DBUtil.java:488)

              at oracle.dbtools.db.OracleUtil.isOracleConnectionAlive(OracleUtil.java:271)

              at oracle.dbtools.db.DBUtil.isOracleConnectionAlive(DBUtil.java:1648)

              at oracle.dbtools.raptor.utils.RaptorDbDisconnectListener.checkDisconnect(RaptorDbDisconnectListener.java:113)

              at oracle.dbtools.raptor.utils.Connections$Store.checkDisconnect(Connections.java:545)

              at oracle.dbtools.raptor.utils.Connections$Store.access$600(Connections.java:407)

              at oracle.dbtools.raptor.utils.Connections$Store$2.canDisconnect(Connections.java:457)

              at oracle.jdeveloper.db.DatabaseConnectionsListener$DisconnectAdapter.canDisconnect(DatabaseConnectionsListener.java:119)

              at oracle.jdeveloper.db.DatabaseConnections.doDisconnect(DatabaseConnections.java:1029)

              at oracle.jdeveloper.db.DatabaseConnections.disconnect(DatabaseConnections.java:1021)

              at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.closeConnection(Connections.java:227)

              at oracle.dbtools.raptor.utils.Connections.closeConnection(Connections.java:1092)

              at oracle.dbtools.raptor.utils.Connections.closeConnection(Connections.java:1081)

              at oracle.dbtools.worksheet.commands.UnsharedWorksheetActionProvider$2$1$1.viewClosed(UnsharedWorksheetActionProvider.java:125)

              at oracle.ide.view.View.fireViewClosed(View.java:563)

              at oracle.ide.view.View.close(View.java:130)

              at oracle.ide.editor.Editor.close(Editor.java:418)

              at oracle.dbtools.worksheet.editor.Worksheet.close(Worksheet.java:1066)

              at com.oracle.jdeveloper.nbwindowsystem.editor.EditorState.replaceEditor(EditorState.java:370)

              at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.closeSplitPaneState(TabGroupState.java:610)

              at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.closeEditors(TabGroup.java:630)

              at com.oracle.jdeveloper.nbwindowsystem.NbEditorContainer.closeEditors(NbEditorContainer.java:343)

              at com.oracle.jdeveloper.nbwindowsystem.NbEditorContainer.componentClosed(NbEditorContainer.java:272)

              at org.openide.windows.WindowManager.componentCloseNotify(WindowManager.java:322)

              at org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentClosed(WindowManagerImpl.java:1156)

              at org.netbeans.core.windows.Central.removeModeTopComponent(Central.java:1025)

              at org.netbeans.core.windows.Central.userClosedTopComponent(Central.java:2037)

              at org.netbeans.core.windows.view.DefaultView.userClosedTopComponent(DefaultView.java:796)

              at org.netbeans.core.windows.view.ui.TabbedHandler.actionPerformed(TabbedHandler.java:338)

              at org.netbeans.swing.tabcontrol.TabbedContainer.postActionEvent(TabbedContainer.java:730)

              at org.netbeans.swing.tabcontrol.TabbedContainerUI.shouldPerformAction(TabbedContainerUI.java:165)

              at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI.access$2700(DefaultTabbedContainerUI.java:112)

              at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI$DisplayerActionListener.actionPerformed(DefaultTabbedContainerUI.java:1286)

              at org.netbeans.swing.tabcontrol.TabDisplayer.postActionEvent(TabDisplayer.java:614)

              at org.netbeans.swing.tabcontrol.TabDisplayerUI.shouldPerformAction(TabDisplayerUI.java:193)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI.access$1700(BasicTabDisplayerUI.java:121)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.performCommand(BasicTabDisplayerUI.java:782)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.potentialCommand(BasicTabDisplayerUI.java:767)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.mouseReleased(BasicTabDisplayerUI.java:816)

              at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)

              at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)

              at java.awt.Component.processMouseEvent(Component.java:6539)

              at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)

              at java.awt.Component.processEvent(Component.java:6304)

              at java.awt.Container.processEvent(Container.java:2239)

              at java.awt.Component.dispatchEventImpl(Component.java:4889)

              at java.awt.Container.dispatchEventImpl(Container.java:2297)

              at java.awt.Component.dispatchEvent(Component.java:4711)

              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)

              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)

              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)

              at java.awt.Container.dispatchEventImpl(Container.java:2283)

              at java.awt.Window.dispatchEventImpl(Window.java:2746)

              at java.awt.Component.dispatchEvent(Component.java:4711)

              at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)

              at java.awt.EventQueue.access$500(EventQueue.java:97)

              at java.awt.EventQueue$3.run(EventQueue.java:709)

              at java.awt.EventQueue$3.run(EventQueue.java:703)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)

              at java.awt.EventQueue$4.run(EventQueue.java:733)

              at java.awt.EventQueue$4.run(EventQueue.java:731)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

              at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)

              at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

              at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

        • 1. Re: SQL Developer hangs when disconnecting from an unreachable database
          2823225

          Today I have found yet another situation where the UI freezes when disconnecting from an unreachable database - this time the UI thread is blocked when waiting for a connection (object 0x00000000e6c53e68) which is used by a different thread (and that thread gets no response from the unreachable database):

           

          "AliveLockThread.VOAR2 - ARKTIKA (Unshared)" #21463 prio=5 os_prio=0 tid=0x00007f113c01b000 nid=0x4404 runnable [0x00007f110eb34000]

             java.lang.Thread.State: RUNNABLE

              at sun.nio.ch.FileDispatcherImpl.read0(Native Method)

              at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)

              at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)

              at sun.nio.ch.IOUtil.read(IOUtil.java:197)

              at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)

              - locked <0x00000000e6c64d70> (a java.lang.Object)

              at oracle.net.nt.TimeoutSocketChannel.read(TimeoutSocketChannel.java:178)

              at oracle.net.ns.NSProtocolNIO.doSocketRead(NSProtocolNIO.java:544)

              at oracle.net.ns.NIOPacket.readHeader(NIOPacket.java:234)

              at oracle.net.ns.NIOPacket.readPacketFromSocketChannel(NIOPacket.java:174)

              at oracle.net.ns.NIOPacket.readFromSocketChannel(NIOPacket.java:122)

              at oracle.net.ns.NIOPacket.readFromSocketChannel(NIOPacket.java:100)

              at oracle.net.ns.NIONSDataChannel.readDataFromSocketChannel(NIONSDataChannel.java:86)

              at oracle.jdbc.driver.T4CMAREngineNIO.prepareForUnmarshall(T4CMAREngineNIO.java:762)

              at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:427)

              at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:394)

              at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:255)

              at oracle.jdbc.driver.T4CTTIoping.doOPING(T4CTTIoping.java:54)

              at oracle.jdbc.driver.T4CConnection.doPingDatabase(T4CConnection.java:4970)

              - locked <0x00000000e6c53e68> (a oracle.jdbc.driver.T4CConnection)

              at oracle.jdbc.driver.PhysicalConnection.pingDatabase(PhysicalConnection.java:5434)

              at oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCConnection$2oracle$1jdbc$1internal$1OracleConnection$$$Proxy.pingDatabase(Unknown Source)

              at oracle.javatools.db.ora.OracleDatabaseImpl.isConnectionAliveImpl(OracleDatabaseImpl.java:496)

              at oracle.javatools.db.AbstractDatabase$AliveTester.run(AbstractDatabase.java:494)

              - locked <0x00000000e6c537b8> (a oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCConnection$2oracle$1jdbc$1internal$1OracleConnection$$$Proxy)

              at java.lang.Thread.run(Thread.java:748)

           

          "AWT-EventQueue-0" #13 prio=6 os_prio=0 tid=0x00007f11a0355800 nid=0x354b waiting for monitor entry [0x00007f1182989000]

             java.lang.Thread.State: BLOCKED (on object monitor)

              at oracle.jdbc.driver.PhysicalConnection.isClosed(PhysicalConnection.java:2402)

              - waiting to lock <0x00000000e6c53e68> (a oracle.jdbc.driver.T4CConnection)

              at oracle.jdbc.proxy.oracle$1dbtools$1raptor$1proxy$1driver$1oracle$1RaptorProxyOJDBCConnection$2oracle$1jdbc$1internal$1OracleConnection$$$Proxy.isClosed(Unknown Source)

              at oracle.dbtools.raptor.utils.RaptorDbDisconnectListener.checkDisconnect(RaptorDbDisconnectListener.java:73)

              at oracle.dbtools.raptor.utils.Connections$Store.checkDisconnect(Connections.java:545)

              at oracle.dbtools.raptor.utils.Connections$Store.access$600(Connections.java:407)

              at oracle.dbtools.raptor.utils.Connections$Store$2.canDisconnect(Connections.java:457)

              at oracle.jdeveloper.db.DatabaseConnectionsListener$DisconnectAdapter.canDisconnect(DatabaseConnectionsListener.java:119)

              at oracle.jdeveloper.db.DatabaseConnections.doDisconnect(DatabaseConnections.java:1029)

              at oracle.jdeveloper.db.DatabaseConnections.disconnect(DatabaseConnections.java:1021)

              at oracle.dbtools.raptor.utils.Connections$ConnectionInfo.closeConnection(Connections.java:227)

              at oracle.dbtools.raptor.utils.Connections.closeConnection(Connections.java:1092)

              at oracle.dbtools.raptor.utils.Connections.closeConnection(Connections.java:1081)

              at oracle.dbtools.worksheet.commands.UnsharedWorksheetActionProvider$2$1$1.viewClosed(UnsharedWorksheetActionProvider.java:125)

              at oracle.ide.view.View.fireViewClosed(View.java:563)

              at oracle.ide.view.View.close(View.java:130)

              at oracle.ide.editor.Editor.close(Editor.java:418)

              at oracle.dbtools.worksheet.editor.Worksheet.close(Worksheet.java:1066)

              at com.oracle.jdeveloper.nbwindowsystem.editor.EditorState.replaceEditor(EditorState.java:370)

              at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroupState.closeSplitPaneState(TabGroupState.java:610)

              at com.oracle.jdeveloper.nbwindowsystem.editor.TabGroup.closeEditors(TabGroup.java:630)

              at com.oracle.jdeveloper.nbwindowsystem.NbEditorContainer.closeEditors(NbEditorContainer.java:343)

              at com.oracle.jdeveloper.nbwindowsystem.NbEditorContainer.componentClosed(NbEditorContainer.java:272)

              at org.openide.windows.WindowManager.componentCloseNotify(WindowManager.java:322)

              at org.netbeans.core.windows.WindowManagerImpl.notifyTopComponentClosed(WindowManagerImpl.java:1156)

              at org.netbeans.core.windows.Central.removeModeTopComponent(Central.java:1025)

              at org.netbeans.core.windows.Central.userClosedTopComponent(Central.java:2037)

              at org.netbeans.core.windows.view.DefaultView.userClosedTopComponent(DefaultView.java:796)

              at org.netbeans.core.windows.view.ui.TabbedHandler.actionPerformed(TabbedHandler.java:338)

              at org.netbeans.swing.tabcontrol.TabbedContainer.postActionEvent(TabbedContainer.java:730)

              at org.netbeans.swing.tabcontrol.TabbedContainerUI.shouldPerformAction(TabbedContainerUI.java:165)

              at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI.access$2700(DefaultTabbedContainerUI.java:112)

              at org.netbeans.swing.tabcontrol.plaf.DefaultTabbedContainerUI$DisplayerActionListener.actionPerformed(DefaultTabbedContainerUI.java:1286)

              at org.netbeans.swing.tabcontrol.TabDisplayer.postActionEvent(TabDisplayer.java:614)

              at org.netbeans.swing.tabcontrol.TabDisplayerUI.shouldPerformAction(TabDisplayerUI.java:193)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI.access$1700(BasicTabDisplayerUI.java:121)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.performCommand(BasicTabDisplayerUI.java:782)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.potentialCommand(BasicTabDisplayerUI.java:767)

              at org.netbeans.swing.tabcontrol.plaf.BasicTabDisplayerUI$BasicDisplayerMouseListener.mouseReleased(BasicTabDisplayerUI.java:816)

              at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)

              at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)

              at java.awt.Component.processMouseEvent(Component.java:6539)

              at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)

              at java.awt.Component.processEvent(Component.java:6304)

              at java.awt.Container.processEvent(Container.java:2239)

              at java.awt.Component.dispatchEventImpl(Component.java:4889)

              at java.awt.Container.dispatchEventImpl(Container.java:2297)

              at java.awt.Component.dispatchEvent(Component.java:4711)

              at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)

              at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4535)

              at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)

              at java.awt.Container.dispatchEventImpl(Container.java:2283)

              at java.awt.Window.dispatchEventImpl(Window.java:2746)

              at java.awt.Component.dispatchEvent(Component.java:4711)

              at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:760)

              at java.awt.EventQueue.access$500(EventQueue.java:97)

              at java.awt.EventQueue$3.run(EventQueue.java:709)

              at java.awt.EventQueue$3.run(EventQueue.java:703)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)

              at java.awt.EventQueue$4.run(EventQueue.java:733)

              at java.awt.EventQueue$4.run(EventQueue.java:731)

              at java.security.AccessController.doPrivileged(Native Method)

              at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)

              at java.awt.EventQueue.dispatchEvent(EventQueue.java:730)

              at oracle.javatools.internal.ui.EventQueueWrapper._dispatchEvent(EventQueueWrapper.java:169)

              at oracle.javatools.internal.ui.EventQueueWrapper.dispatchEvent(EventQueueWrapper.java:151)

              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)

              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)

              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)

              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)

              at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

          • 2. Re: SQL Developer hangs when disconnecting from an unreachable database
            thatJeffSmith-Oracle

            I've logged a bug for this, thanks for catching it and sharing the detail required to find/fix this!