Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 32087 invoked from network); 2 Jul 2009 07:32:10 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jul 2009 07:32:10 -0000 Received: (qmail 33443 invoked by uid 500); 2 Jul 2009 07:32:21 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 33372 invoked by uid 500); 2 Jul 2009 07:32:20 -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 33364 invoked by uid 99); 2 Jul 2009 07:32:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 07:32:20 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of egidijus.vaisnora@nomagic.com designates 195.22.190.1 as permitted sender) Received: from [195.22.190.1] (HELO gate.nomagic.com) (195.22.190.1) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jul 2009 07:32:09 +0000 X-Trusted-NM: yes Received: from suka.nomagic.com (suka.nomagic.com [195.22.190.178]) by gate.nomagic.com (Postfix) with ESMTP id A85C78927 for ; Thu, 2 Jul 2009 10:31:48 +0300 (EEST) Message-ID: <4A4C62BE.8060701@nomagic.com> Date: Thu, 02 Jul 2009 10:33:18 +0300 From: Egidijus Vaisnora User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Derby bug? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Hello for All, Questions first: Deadlock between system tables - is it Derby bug? Is it possible to avoid deadlock by configuring derby DB, let say changing lock granularity? Issue: I am using 3d part library which makes all transactions with Derby and in one single situation (unfortunately not reproducible) I got error printing in log about deadlock. It could be 3d part library problem, however from the log it obvious that deadlock appeared on Derby system tables (they are managed by Derby itself), therefore, I think, it is related to Derby code, which doesn't synchronize two transactions accessing system tables. Here is log: Lock : TABLE, SYSCOLUMNS, Tablelock Waiting XID : {9404, IS} , APP, SELECT cdo_version, cdo_created, cdo_revised, cdo_resource, cdo_container, cdo_feature, name, id FROM core_File WHERE cdo_id= ? AND (cdo_revised = 0 ) Granted XID : {7351, IX} Lock : ROW, SYSTABLES, (2,14) Waiting XID : {7351, X} , APP, CREATE TABLE core_File (cdo_id BIGINT NOT NULL, cdo_version INTEGER NOT NULL, cdo_class BIGINT NOT NULL, cdo_created BIGINT NOT NULL, cdo_revised BIGINT NOT NULL, cdo_resource BIGINT NOT NULL, cdo_container BIGINT NOT NULL, cdo_feature INTEGER NOT NULL, name VARCHAR(32672), id VARCHAR(32672)) Granted XID : {9404, S} . The selected victim is XID : 9404. Thanks, -- Egidijus