Return-Path: Delivered-To: apmail-jackrabbit-dev-archive@www.apache.org Received: (qmail 85053 invoked from network); 26 Jun 2008 08:57:37 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jun 2008 08:57:37 -0000 Received: (qmail 70931 invoked by uid 500); 26 Jun 2008 08:57:37 -0000 Delivered-To: apmail-jackrabbit-dev-archive@jackrabbit.apache.org Received: (qmail 70904 invoked by uid 500); 26 Jun 2008 08:57:37 -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 70893 invoked by uid 99); 26 Jun 2008 08:57:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 01:57:37 -0700 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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jun 2008 08:56:55 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 520A6234C155 for ; Thu, 26 Jun 2008 01:56:45 -0700 (PDT) Message-ID: <1651567710.1214470605332.JavaMail.jira@brutus> Date: Thu, 26 Jun 2008 01:56:45 -0700 (PDT) From: =?utf-8?Q?Claus_K=C3=B6ll_=28JIRA=29?= To: dev@jackrabbit.apache.org Subject: [jira] Commented: (JCR-1334) Deadlock with XA enabled In-Reply-To: <3651182.1200922415389.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/JCR-1334?page=3Dcom.atlassian.j= ira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D126083= 45#action_12608345 ]=20 Claus K=C3=B6ll commented on JCR-1334: --------------------------------- hi marcel, as written before your patch works fine but i found that in some really rar= ely situations (that i can not reproduce) a deadlock has still occured. I have modified your patch as follows to find out when a readlock will be a= quired with a wrong active_writer public Sync readLock() { if (activeWriter_ !=3D null && activeWriter_ !=3D Thread.currentThread())= { System.out.println("Jackrabbit - PatchedDefaultISMLocking: ActiveWriter= Thread not the same for readLock() ! ActiveWriter is " + activeWriter_.get= Name()=20 + "CurrentThread is " + Thread.currentThread().getName()); Throwable throwable =3D new Throwable(); throwable.fillInStackTrace(); throwable.printStackTrace(); activeWriter_ =3D Thread.currentThread(); } return super.readLock(); } i know to set the activewriter to the current Thread is no good idea but i = want to know where the issues comes from and my application should not run into a deadlock. And here is the stacktrace [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R java.lang.Throwable [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.state.PatchedDefaultISMLocking$RWLock.readLock(PatchedDefaultIS= MLocking.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.state.PatchedDefaultISMLocking.acquireReadLock(PatchedDefaultIS= MLocking.java(Inlined Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.state.SharedItemStateManager.acquireReadLock(SharedItemStateMan= ager.java(Inlined Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.state.SharedItemStateManager.getItemState(SharedItemStateManage= r.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.state.ChangeLog.undo(ChangeLog.java:330) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.state.XAItemStateManager.rollback(XAItemStateManager.java:182) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.TransactionContext.rollback(TransactionContext.java:224) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.core.XASessionImpl.rollback(XASessionImpl.java:352) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at org.apache.jack= rabbit.jca.TransactionBoundXAResource.rollback(TransactionBoundXAResource.j= ava:76) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ejs.j2c= .XATransactionWrapper.rollback(XATransactionWrapper.java:1148) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTA.JTAXAResourceImpl.rollback(JTAXAResourceImpl.java:347) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTA.RegisteredResources.distributeOutcome(RegisteredResources.java:= 1085) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTA.RegisteredResources.distributeRollback(RegisteredResources.java= :1908) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTA.TransactionImpl.internalRollback(TransactionImpl.java:1511) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTS.TransactionWrapper.rollback(TransactionWrapper.java:591) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTS.WSCoordinatorImpl.rollback(WSCoordinatorImpl.java:163) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.Tran= saction.JTS._WSCoordinatorImplBase._invoke(Unknown Source) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.CORBA.i= iop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java(Compiled Code)= ) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.CORBA.i= iop.ServerDelegate.dispatch(ServerDelegate.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.rmi.iio= p.ORB.process(ORB.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.CORBA.i= iop.ORB.process(ORB.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.rmi.iio= p.Connection.doWork(Connection.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.rmi.iio= p.WorkUnitImpl.doWork(WorkUnitImpl.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ejs.oa.= pool.PooledThread.run(ThreadPool.java(Compiled Code)) [25.06.08 18:13:36:019 CEST] 1ea9f0d9 SystemErr R =09at com.ibm.ws.util= .ThreadPool$Worker.run(ThreadPool.java:937) As i can see Websphere has a ThreadPool for the XA Communication and so it = is not guaranteed that the same thread that holds the writelock comes to ge= t a redlock. I don't know how to solve that problem BR, claus > Deadlock with XA enabled > ------------------------ > > Key: JCR-1334 > URL: https://issues.apache.org/jira/browse/JCR-1334 > Project: Jackrabbit > Issue Type: Bug > Components: jackrabbit-core, jackrabbit-jca > Affects Versions: 1.4 > Environment: WebSphere Application Server 5.1 > Reporter: Claus K=C3=B6ll > Priority: Critical > Attachments: javacore.20080121.132210.2524.txt, lock_output.txt, = PatchedDefaultISMLocking.java, PatchedDefaultISMLocking_2.java, Stacktrace.= txt > > > Since we have configured a j2c resource adapter any modification to the r= epository ends > with a deadlock. --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.