From dev-return-12316-apmail-jackrabbit-dev-archive=jackrabbit.apache.org@jackrabbit.apache.org Tue Jun 05 10:23:52 2007 Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 22010 invoked from network); 5 Jun 2007 10:23:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Jun 2007 10:23:50 -0000 Received: (qmail 21310 invoked by uid 500); 5 Jun 2007 10:23:51 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 21258 invoked by uid 500); 5 Jun 2007 10:23:51 -0000 Mailing-List: contact dev-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list dev@jackrabbit.apache.org Received: (qmail 21235 invoked by uid 99); 5 Jun 2007 10:23:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2007 03:23:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jun 2007 03:23:46 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 528844297CE for ; Tue, 5 Jun 2007 03:23:26 -0700 (PDT) Message-ID: <15146918.1181039006334.JavaMail.jira@brutus> Date: Tue, 5 Jun 2007 03:23:26 -0700 (PDT) From: "Bertrand Delacretaz (JIRA)" To: dev@jackrabbit.apache.org Subject: [jira] Updated: (JCR-962) Deadlocks in ConcurrentVersioningWithTransactionsTest In-Reply-To: <28394518.1181038886564.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bertrand Delacretaz updated JCR-962: ------------------------------------ Attachment: 10-threads-dump.txt Deadlocked threads dump with 10 concurrent tasks > Deadlocks in ConcurrentVersioningWithTransactionsTest > ----------------------------------------------------- > > Key: JCR-962 > URL: https://issues.apache.org/jira/browse/JCR-962 > Project: Jackrabbit > Issue Type: Bug > Components: core > Reporter: Bertrand Delacretaz > Attachments: 10-threads-dump.txt, JCR-962-ConcurrentVersioningWithTransactionsTest.patch > > > Patch follows for a ConcurrentVersioningWithTransactionsTest, based on the existing ConcurrentVersioningTest but using transactions around the versioning operations. > On my macbook, running the test with CONCURRENCY = 100 and NUM_OPERATIONS = 100 causes a deadlock after a few seconds, thread dumps follow. > Note that I had to ignore StaleItemStateException (which is probably justified, due to not locking stuff IIUC) to let the threads run long enough to show the problem. > Running the test a few times showed the same locking pattern several times: some threads are locked at line 87 (session.save(), no transaction) while others are at line 93 (transaction.commit()), in testConcurrentCheckinInTransaction(): > 80 public void testConcurrentCheckinInTransaction() throws RepositoryException { > 81 runTask(new Task() { > 82 public void execute(Session session, Node test) throws RepositoryException { > 83 int i = 0; > 84 try { > 85 Node n = test.addNode("test"); > 86 n.addMixin(mixVersionable); > 87 session.save(); > 88 for (i = 0; i < NUM_OPERATIONS / CONCURRENCY; i++) { > 89 final UserTransaction utx = new UserTransactionImpl(test.getSession()); > 90 utx.begin(); > 91 n.checkout(); > 92 n.checkin(); > 93 utx.commit(); > 94 } > 95 n.checkout(); > 96 } catch (Exception e) { > 97 final String threadName = Thread.currentThread().getName(); > 98 final Throwable deepCause = getLevel2Cause(e); > 99 if(deepCause!=null && deepCause instanceof StaleItemStateException) { > 100 // ignore > 101 } else { > 102 throw new RepositoryException(threadName + ", i=" + i + ":" + e.getClass().getName(), e); > 103 } > 104 } > 105 } > 106 }, CONCURRENCY); > 107 } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.