Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 80145 invoked from network); 9 Mar 2011 14:35:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Mar 2011 14:35:23 -0000 Received: (qmail 43608 invoked by uid 500); 9 Mar 2011 14:35:23 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 43571 invoked by uid 500); 9 Mar 2011 14:35:23 -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 43564 invoked by uid 99); 9 Mar 2011 14:35:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Mar 2011 14:35:23 +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; Wed, 09 Mar 2011 14:35:21 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 695873A02BC for ; Wed, 9 Mar 2011 14:34:59 +0000 (UTC) Date: Wed, 9 Mar 2011 14:34:59 +0000 (UTC) From: "Knut Anders Hatlen (JIRA)" To: derby-dev@db.apache.org Message-ID: <2070935141.8023.1299681299427.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <308707942.121.1298824360053.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] Commented: (DERBY-5073) Derby deadlocks without recourse on simultaneous correlated subqueries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004573#comment-13004573 ] Knut Anders Hatlen commented on DERBY-5073: ------------------------------------------- Hi Karl, Yes, that looks like a cycle, and Derby should have been able to detect it and throw an SQLException. > Derby deadlocks without recourse on simultaneous correlated subqueries > ---------------------------------------------------------------------- > > Key: DERBY-5073 > URL: https://issues.apache.org/jira/browse/DERBY-5073 > Project: Derby > Issue Type: Bug > Reporter: Karl Wright > > When the following two queries are run against tables that contain the necessary fields, using multiple threads, Derby deadlocks and none of the queries ever returns. Derby apparently detects no deadlock condition, either. > SELECT t0.* FROM jobqueue t0 WHERE EXISTS(SELECT 'x' FROM carrydown t1 WHERE t1.parentidhash IN (?) AND t1.childidhash=t0.dochash AND t0.jobid=t1.jobid) AND t0.jobid=? > SELECT t0.* FROM jobqueue t0 WHERE EXISTS(SELECT 'x' FROM carrydown t1 WHERE t1.parentidhash IN (?) AND t1.childidhash=t0.dochash AND t0.jobid=t1.jobid AND t1.newField=?) AND t0.jobid=? > This code comes from Apache ManifoldCF, and has occurred when there are five or more threads trying to execute these two queries at the same time. Originally we found this on 10.5.3.0. It was hoped that 10.7.1.1 would fix the problem, but it hasn't. -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira