Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 79976 invoked from network); 31 May 2010 23:01:59 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 31 May 2010 23:01:59 -0000 Received: (qmail 32699 invoked by uid 500); 31 May 2010 23:01:58 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 32654 invoked by uid 500); 31 May 2010 23:01:58 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 32606 invoked by uid 99); 31 May 2010 23:01:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 31 May 2010 23:01:58 +0000 X-ASF-Spam-Status: No, hits=-1483.4 required=10.0 tests=ALL_TRUSTED,AWL 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; Mon, 31 May 2010 23:01:57 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o4VN1bYH009244 for ; Mon, 31 May 2010 23:01:37 GMT Message-ID: <5481371.94501275346897499.JavaMail.jira@thor> Date: Mon, 31 May 2010 19:01:37 -0400 (EDT) From: "Hoss Man (JIRA)" To: dev@lucene.apache.org Subject: [jira] Updated: (SOLR-1538) Solr possible deadlock source (FindBugs report) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-1538?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hoss Man updated SOLR-1538: --------------------------- Fix Version/s: 1.4.1 Committed revision 949885. merged to branch-1.4 for 1.4.1 > Solr possible deadlock source (FindBugs report) > ----------------------------------------------- > > Key: SOLR-1538 > URL: https://issues.apache.org/jira/browse/SOLR-1538 > Project: Solr > Issue Type: Bug > Affects Versions: 1.4 > Environment: platform independent > Reporter: gabriele renzi > Assignee: Hoss Man > Priority: Minor > Fix For: 1.4.1, 1.5, 3.1, 4.0 > > Attachments: SOLR-1538.patch > > Original Estimate: 0.17h > Remaining Estimate: 0.17h > > The code to get the latest accessed items in ConcurrentLRUCache looks like > {code:title=ConcurrentLRUCache.java|} > public Map getOldestAccessedItems(int n) { > markAndSweepLock.lock(); > Map result = new LinkedHashMap(); > TreeSet tree = new TreeSet(); > try { > ... > } finally { > markAndSweepLock.unlock(); > } > {code} > (this method is apparently unused though) and in > {code} > public Map getLatestAccessedItems(int n) { > // we need to grab the lock since we are changing lastAccessedCopy > markAndSweepLock.lock(); > Map result = new LinkedHashMap(); > TreeSet tree = new TreeSet(); > try { > ... > {code} > The impression is that if an OOM situation occurs on the allocation of the local LinkedHashMap and TreeSet the lock would not be unlocked anymore. > The quick fix would be to move the lock() call after the allocations, and this does not seem to imply any problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org