Bug 195623 - Deadlock in database connection node
Deadlock in database connection node
Status: RESOLVED DUPLICATE of bug 195943
Product: db
Classification: Unclassified
Component: Code
6.x
Macintosh (x86) Mac OS X
: P3 (vote)
: 7.0.1
Assigned To: Jiri Rechtacek
issues@db
: THREAD
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-17 19:48 UTC by sworisbreathing
Modified: 2012-01-25 11:11 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description sworisbreathing 2011-02-17 19:48:52 UTC
I just discovered a deadlock when attempting to exit NetBeans 6.9 on OS X after working with database connections in the IDE.

Java info:
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05-318-9M3310)
Java HotSpot(TM) 64-Bit Server VM (build 19.0-b09-318, mixed mode)

Netbeans' UI closed, but the application was still running.  I hit it with jconsole and found the following three deadlocked threads:


Name: Default RequestProcessor
State: BLOCKED on org.netbeans.modules.db.explorer.node.ConnectionNode@6bc93fad owned by: org.netbeans.modules.db.explorer.node.ConnectionNode
Total blocked: 3  Total waited: 1

Stack trace: 
org.netbeans.modules.db.explorer.node.ConnectionNode.updateModel(ConnectionNode.java:297)
org.netbeans.modules.db.explorer.node.ConnectionNode.access$000(ConnectionNode.java:74)
org.netbeans.modules.db.explorer.node.ConnectionNode$1.propertyChange(ConnectionNode.java:116)
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
org.netbeans.modules.db.explorer.DatabaseConnection.disconnect(DatabaseConnection.java:1051)
org.netbeans.modules.db.explorer.action.DisconnectAction$1.run(DisconnectAction.java:100)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)



Name: org.netbeans.modules.db.explorer.node.ConnectionNode
State: BLOCKED on org.netbeans.modules.db.explorer.node.NodeRegistry@41b7575f owned by: Asynch children creator 
Total blocked: 5  Total waited: 2

Stack trace: 
org.netbeans.modules.db.explorer.node.NodeRegistry.refresh(NodeRegistry.java:146)
org.netbeans.api.db.explorer.node.BaseNode.refresh(BaseNode.java:180)
   - locked org.netbeans.modules.db.explorer.node.ConnectionNode@6bc93fad
org.netbeans.modules.db.explorer.node.ConnectionNode$2.run(ConnectionNode.java:306)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)



Name: Asynch children creator 
State: BLOCKED on org.netbeans.modules.db.explorer.node.ConnectionNode@6bc93fad owned by: org.netbeans.modules.db.explorer.node.ConnectionNode
Total blocked: 7  Total waited: 5

Stack trace: 
org.netbeans.modules.db.explorer.node.ConnectionNode.updateModel(ConnectionNode.java:297)
org.netbeans.modules.db.explorer.node.ConnectionNode.access$000(ConnectionNode.java:74)
org.netbeans.modules.db.explorer.node.ConnectionNode$1.propertyChange(ConnectionNode.java:116)
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:276)
org.netbeans.modules.db.explorer.DatabaseConnection.disconnect(DatabaseConnection.java:1051)
org.netbeans.modules.db.explorer.DatabaseConnection.isVitalConnection(DatabaseConnection.java:307)
org.netbeans.modules.db.explorer.node.NodeRegistry.handleMetadataModelException(NodeRegistry.java:190)
   - locked java.lang.Class@20617a6e
org.netbeans.modules.db.explorer.node.CatalogNode.setupNames(CatalogNode.java:120)
org.netbeans.modules.db.explorer.node.CatalogNode.initialize(CatalogNode.java:93)
org.netbeans.api.db.explorer.node.BaseNode.setup(BaseNode.java:206)
org.netbeans.modules.db.explorer.node.CatalogNode.create(CatalogNode.java:76)
org.netbeans.modules.db.explorer.node.CatalogNodeProvider$1.run(CatalogNodeProvider.java:123)
org.netbeans.modules.db.explorer.node.CatalogNodeProvider$1.run(CatalogNodeProvider.java:99)
org.netbeans.modules.db.metadata.model.JDBCConnMetadataModel.runReadAction(JDBCConnMetadataModel.java:97)
org.netbeans.modules.db.metadata.model.api.MetadataModel.runReadAction(MetadataModel.java:92)
org.netbeans.modules.db.explorer.node.CatalogNodeProvider.initialize(CatalogNodeProvider.java:98)
   - locked org.netbeans.modules.db.explorer.node.CatalogNodeProvider@5facdc5d
org.netbeans.api.db.explorer.node.NodeProvider.getNodes(NodeProvider.java:106)
   - locked org.netbeans.modules.db.explorer.node.CatalogNodeProvider@5facdc5d
org.netbeans.modules.db.explorer.node.NodeRegistry.getNodes(NodeRegistry.java:167)
   - locked org.netbeans.modules.db.explorer.node.NodeRegistry@41b7575f
org.netbeans.api.db.explorer.node.ChildNodeFactory.createKeys(ChildNodeFactory.java:107)
org.openide.nodes.AsynchChildren.run(AsynchChildren.java:189)
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)


Steps to reproduce: I'm not sure.  I know I'd been attempting to create a connection to a SQL Server 2005 database with jtds (1.2.2), but due to an unrelated (non-Netbeans) issue, the connection timed out several times before I was finally able to establish the connection.  I had dropped the database and recreated it in SQL Server Management Studio (checking the "Close existing connections" checkbox when deleting the database), and I'm fairly certain I hadn't closed the connection in NetBeans while doing this.

Come to think of it, I dropped and recreated the database more than once, sometimes checking the "Close existing connections" checkbox in SQL Server Management Studio, and sometimes with it unchecked.  To my recollection, NetBeans believed it was still connected (e.g. I never right-clicked the node in NetBeans and clicked "Disconnect", and the tree node's icon showed an active connection.)
Comment 1 sworisbreathing 2011-02-17 19:50:52 UTC
For what it's worth, I was connecting to a database on a remote system via TCP/IP on port 1433 through JTDS 1.2.2
Comment 2 Jiri Rechtacek 2012-01-25 11:11:25 UTC

*** This bug has been marked as a duplicate of bug 195943 ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo