Re: Deadlock in PoolManager

From: Laurent Marchal (lmarcha..mausa.com)
Date: Tue Nov 23 2010 - 16:44:31 UTC

  • Next message: Bruno René Santos: "Updates with Delta values"

    Yeah I was trying to be "clean" and dispose it when I leave the application.

    Filed as https://issues.apache.org/jira/browse/CAY-1513

    Thank you.
    Laurent.

    Le 11/23/2010 10:33 AM, Andrus Adamchik a écrit :
    > Interesting. I guess we haven't seen it before cause people don't call dispose that often.
    >
    > Please open a Jira.
    >
    > Thanks,
    > Andrus
    >
    > On Nov 23, 2010, at 5:54 PM, Laurent Marchal wrote:
    >
    >> Hi all,
    >>
    >> 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.
    >>
    >> Thanks,
    >> Laurent Marchal.
    >>
    >> Name: Worker-2
    >> State: BLOCKED on com.sma.core.net.OpconPoolManage..97871d 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$SynchronizedRandomAccessLis..2a12fc
    >> 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$SynchronizedRandomAccessLis..2a12fc 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.PoolManage..97871d
    >> com.sma.core.session.Session.disconnect(Session.java:189)
    >> - locked java.lang.Objec..67a300
    >> com.sma.core.session.Session.logout(Session.java:269)
    >> - locked java.lang.Objec..67a300
    >>



    This archive was generated by hypermail 2.0.0 : Tue Nov 23 2010 - 16:45:17 UTC