Return-Path: Delivered-To: apmail-cayenne-commits-archive@www.apache.org Received: (qmail 98807 invoked from network); 23 Nov 2010 16:44:03 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Nov 2010 16:44:03 -0000 Received: (qmail 83552 invoked by uid 500); 23 Nov 2010 16:44:35 -0000 Delivered-To: apmail-cayenne-commits-archive@cayenne.apache.org Received: (qmail 83523 invoked by uid 500); 23 Nov 2010 16:44:35 -0000 Mailing-List: contact commits-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cayenne.apache.org Delivered-To: mailing list commits@cayenne.apache.org Received: (qmail 83516 invoked by uid 99); 23 Nov 2010 16:44:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 16:44:35 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Nov 2010 16:44:34 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oANGiEbu008034 for ; Tue, 23 Nov 2010 16:44:14 GMT Message-ID: <17310421.263011290530654374.JavaMail.jira@thor> Date: Tue, 23 Nov 2010 11:44:14 -0500 (EST) From: "Laurent Marchal (JIRA)" To: commits@cayenne.apache.org Subject: [jira] Created: (CAY-1513) Deadlock in PoolManager MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 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.OpconPoolManager@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$SynchronizedRandomAccessList@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$SynchronizedRandomAccessList@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.PoolManager@197871d com.sma.core.session.Session.disconnect(Session.java:189) - locked java.lang.Object@167a300 com.sma.core.session.Session.logout(Session.java:269) - locked java.lang.Object@167a300 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.