Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 72858 invoked from network); 14 Jul 2010 20:26:15 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 14 Jul 2010 20:26:15 -0000 Received: (qmail 94115 invoked by uid 500); 14 Jul 2010 20:26:15 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 94091 invoked by uid 500); 14 Jul 2010 20:26:14 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 94083 invoked by uid 99); 14 Jul 2010 20:26:14 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jul 2010 20:26:14 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jul 2010 20:26:11 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o6EKPn4a010358 for ; Wed, 14 Jul 2010 20:25:49 GMT Message-ID: <6105952.382451279139149516.JavaMail.jira@thor> Date: Wed, 14 Jul 2010 16:25:49 -0400 (EDT) From: "Rick Curtis (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Commented: (OPENJPA-1716) Deadlock with openjpa.Multithreaded=true In-Reply-To: <22026278.165471278036290173.JavaMail.jira@thor> 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/OPENJPA-1716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12888522#action_12888522 ] Rick Curtis commented on OPENJPA-1716: -------------------------------------- Could I have you put together a simple unit test that recreates the failure? > Deadlock with openjpa.Multithreaded=true > ---------------------------------------- > > Key: OPENJPA-1716 > URL: https://issues.apache.org/jira/browse/OPENJPA-1716 > Project: OpenJPA > Issue Type: Bug > Affects Versions: 2.0.0-M1, 2.0.0-M2, 2.0.0-M3, 2.0.0-beta, 2.0.0-beta2, 2.0.0-beta3, 2.0.0 > Reporter: Stefan Wokusch > > There is a Deadlock by using Multithreaded=true and work with some Threads on the same Entitymanager. > After many hours of debugging, i found a solution for that Deadlock: The Problem could be solved by adding another lock into the lock Method of the StateManagerImpl: > StateManagerImpl ~line3308 > /** > * Lock the state manager if the multithreaded option is set. > */ > protected void lock() { > if (_instanceLock != null){ > _broker.lock();//<- This is the new Part to fix the Deadlock > _instanceLock.lock(); > } > } > Worked for me without Problems for a long time. > Some other Configurations: > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0"> > > orm.xml > > ... > ... > > > > > > > > > > > > > > > > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.