Return-Path: X-Original-To: apmail-felix-dev-archive@www.apache.org Delivered-To: apmail-felix-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 042FAD420 for ; Thu, 20 Dec 2012 19:43:35 +0000 (UTC) Received: (qmail 68364 invoked by uid 500); 20 Dec 2012 19:43:34 -0000 Delivered-To: apmail-felix-dev-archive@felix.apache.org Received: (qmail 68328 invoked by uid 500); 20 Dec 2012 19:43:34 -0000 Mailing-List: contact dev-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list dev@felix.apache.org Received: (qmail 68318 invoked by uid 99); 20 Dec 2012 19:43:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2012 19:43:34 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.210.171] (HELO mail-ia0-f171.google.com) (209.85.210.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Dec 2012 19:43:28 +0000 Received: by mail-ia0-f171.google.com with SMTP id k27so3215230iad.16 for ; Thu, 20 Dec 2012 11:43:07 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=zbv1rHE4nAV+yg40HD03IlMaYs2a9bIV+cFRYQVumUY=; b=PSRWYamlkvG2HZMAqCs6MEYMU5jUsNm9nvhQyZ+YXnFF3ZXWz4PzH2XejhMNXrJTHD T4go2ln9ty+myCpEFB/Ac0H2B98fuTRgVNQed/8DCiisZa1Idf6y6tB4bmx3OmAZW/X7 +PoDdCZglH9PpNsfXdDuoeGORlY895uCNyESe1xRCJaPr19wH0Du5KY6TDfmuUVBc58A PljOTR2tksB1ouXNexYF+DnZzsZkGZHEt8sYUhTW4eUmB1exsULO+1+BNuxAqbb9QFXu p3IbdMm9b3ANHzbXjPL2OtGqewL6lSy10+PokiZxLr0oFTL8ysPdGzWSl4MlFFAJKFPS d83g== MIME-Version: 1.0 Received: by 10.50.40.137 with SMTP id x9mr12022490igk.1.1356032587051; Thu, 20 Dec 2012 11:43:07 -0800 (PST) Received: by 10.50.109.200 with HTTP; Thu, 20 Dec 2012 11:43:07 -0800 (PST) Date: Thu, 20 Dec 2012 11:43:07 -0800 Message-ID: Subject: Deadlock on install/refresh From: Jad Naous To: dev@felix.apache.org Content-Type: multipart/alternative; boundary=14dae93404b9a7b0be04d14df05a X-Gm-Message-State: ALoCoQkqH3qSCnnr+cU195BHDeOAzkle9dOwt/SuouvejtKYJZmXuFqEbO9jHpA84OsBtuPT0hlQ X-Virus-Checked: Checked by ClamAV on apache.org --14dae93404b9a7b0be04d14df05a Content-Type: text/plain; charset=ISO-8859-1 I am using Gemini JPA along with EclipseLink on Apache Felix, and I can reproduce a deadlock at will. Here's what happens: - Gemini JPA gets installed. - My bundle which includes persistence entities is installing. - Gemini JPA gets notification about my bundle's status change - Gemini JPA scans the bundle, decides it's a persistence bundle, then calls refresh on the bundle. - The refresh is locked waiting for the install to complete - The install is waiting for the refresh to complete. Anybody seen something like that happen before? What's the right way to do this? It seems like a lock ordering problem (looking at what's being locked, it seems one thread is waiting for the bundle lock while the other is waiting for the global lock). Thanks, Jad. --14dae93404b9a7b0be04d14df05a--