Deadlock in PoolManager
-----------------------

                 Key: CAY-1513
                 URL: https://issues.apache.org/jira/browse/CAY-1513
             Project: Cayenne
          Issue Type: Bug
          Components: Core Library
    Affects Versions: 3.0
         Environment: Linux
            Reporter: Laurent Marchal


I'm using cayenne 3.0 ans I'm experiencing a deadlock when I exit my 
application. I call PoolManager.dispose() to disconnect all connections, but it 
seems if at the same time a pooled connection is returned to the pool then it 
deadlocks.

Here is the deadlock as detected by the java console.

Name: Worker-2
State: BLOCKED on com.sma.core.net.opconpoolmana...@197871d owned by: main
Total blocked: 327  Total waited: 475

Stack trace:
org.apache.cayenne.conn.PoolManager.connectionClosed(PoolManager.java:438)
org.apache.cayenne.conn.PooledConnectionImpl.connectionClosedNotification(PooledConnectionImpl.java:181)
  - locked java.util.collections$synchronizedrandomaccessl...@12a12fc
org.apache.cayenne.conn.PooledConnectionImpl.returnConnectionToThePool(PooledConnectionImpl.java:146)
org.apache.cayenne.conn.ConnectionWrapper.close(ConnectionWrapper.java:127)
org.apache.cayenne.access.ExternalTransaction.close(ExternalTransaction.java:168)
org.apache.cayenne.access.ExternalTransaction.commit(ExternalTransaction.java:105)

_______________________________________________________________________________________________________

Name: main
State: BLOCKED on java.util.collections$synchronizedrandomaccessl...@12a12fc 
owned by: Worker-2
Total blocked: 30  Total waited: 122

Stack trace:
org.apache.cayenne.conn.PooledConnectionImpl.removeConnectionEventListener(PooledConnectionImpl.java:97)
org.apache.cayenne.conn.PoolManager.dispose(OpconPoolManager.java:169)
  - locked org.apache.cayenne.conn.poolmana...@197871d
com.sma.core.session.Session.disconnect(Session.java:189)
  - locked java.lang.obj...@167a300
com.sma.core.session.Session.logout(Session.java:269)
  - locked java.lang.obj...@167a300


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to