Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 60686 invoked from network); 24 Mar 2011 08:53:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2011 08:53:44 -0000 Received: (qmail 16949 invoked by uid 500); 24 Mar 2011 08:53:43 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 16929 invoked by uid 500); 24 Mar 2011 08:53:43 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 16922 invoked by uid 99); 24 Mar 2011 08:53:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 08:53:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 08:53:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id C24BD4B761 for ; Thu, 24 Mar 2011 08:53:05 +0000 (UTC) Date: Thu, 24 Mar 2011 08:53:05 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <402086635.8040.1300956785792.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (DERBY-2877) Print the entire lock list when a deadlock occurs and deadlock tracing is on MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DERBY-2877?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Knut Anders Hatlen resolved DERBY-2877. --------------------------------------- Resolution: Cannot Reproduce Thanks, John and Kathey. I'm resolving the issue with the resolution 'Cannot Reproduce' because this deadlock cannot happen after DERBY-2991, and on the assumption that DERBY-3980/DERBY-5073 would have changed the reporting if it were reproducible. > Print the entire lock list when a deadlock occurs and deadlock tracing is on > ---------------------------------------------------------------------------- > > Key: DERBY-2877 > URL: https://issues.apache.org/jira/browse/DERBY-2877 > Project: Derby > Issue Type: Improvement > Components: Services > Affects Versions: 10.2.2.0 > Reporter: John H. Embretsen > > When a deadlock occurs, derby includes the cycle of locks which caused the deadlock in the SQLException message. This is also printed to derby.log if the properties derby.locks.deadlockTrace and derby.locks.monitor are set to true, or if debug code is being used (e.g. jars from lib-debug distributions). It will be easier to debug deadlocks if the entire lock table is printed to derby.log as well (alternatively to both derby.log and the exception message) in these cases. An example of such a lock table is available at http://wiki.apache.org/db-derby/LockDebugging. > For example, in a long-running test I have observed deadlocks with lock cycle messages such as: > Lock : ROW, DELETED, (2,1) > Waiting XID : {6241401573, S} , U1, DELETE FROM "U1"."DELETED" WHERE CURRENT OF "SQL_CURLH000C9" > Granted XID : {6241401662, S} > Lock : ROW, DELETED, (3,3523) > Waiting XID : {6241401662, U} , U1, SELECT ITEMID FROM DELETED > Granted XID : {6241401573, U} > . The selected victim is XID : 6241401573. > It is not clear from this output why XID 6241401573 is waiting for a shared lock (S) on row (2,1), as an S lock is compatible with other S locks [1]. > Having a snapshot of the contents of the lock table at the time of the deadlock would probably help a great deal in the debugging process. > [1]: Lock compatibility: http://db.apache.org/derby/docs/dev/devguide/rdevconcepts2462.html -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira