Return-Path: Delivered-To: apmail-lucene-dev-archive@www.apache.org Received: (qmail 56842 invoked from network); 3 Aug 2010 02:48:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Aug 2010 02:48:42 -0000 Received: (qmail 90646 invoked by uid 500); 3 Aug 2010 02:48:41 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 90220 invoked by uid 500); 3 Aug 2010 02:48:40 -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 90213 invoked by uid 99); 3 Aug 2010 02:48:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Aug 2010 02:48:40 +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; Tue, 03 Aug 2010 02:48:38 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o732mGMo008920 for ; Tue, 3 Aug 2010 02:48:16 GMT Message-ID: <22085472.131891280803696308.JavaMail.jira@thor> Date: Mon, 2 Aug 2010 22:48:16 -0400 (EDT) From: "Alexander Kanarsky (JIRA)" To: dev@lucene.apache.org Subject: [jira] Created: (LUCENE-2584) Concurrency issues in SegmentInfo.files() could lead to ConcurrentModificationException 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 Concurrency issues in SegmentInfo.files() could lead to ConcurrentModificationException --------------------------------------------------------------------------------------- Key: LUCENE-2584 URL: https://issues.apache.org/jira/browse/LUCENE-2584 Project: Lucene - Java Issue Type: Bug Affects Versions: 3.0.2, 3.0.1, 3.0, 2.9.3, 2.9.2, 2.9.1, 2.9 Reporter: Alexander Kanarsky Priority: Minor The multi-threaded call of the files() in SegmentInfo could lead to the ConcurrentModificationException if one thread is not finished additions to the ArrayList (files) yet while the other thread already obtained it as cached (see below). This is a rare exception, but it would be nice to fix. I see the code is no longer problematic in the trunk (and others ported from flex_1458), looks it was fixed while implementing post 3.x features. The fix to 3.x and 2.9.x branches could be the same - create the files set first and populate it, and then assign to the member variable at the end of the method. This will resolve the issue. I could prepare the patch for 2.9.4 and 3.x, if needed. -- INFO: [19] webapp= path=/replication params={command=fetchindex&wt=javabin} status=0 QTime=1 Jul 30, 2010 9:13:05 AM org.apache.solr.core.SolrCore execute INFO: [19] webapp= path=/replication params={command=details&wt=javabin} status=0 QTime=24 Jul 30, 2010 9:13:05 AM org.apache.solr.handler.ReplicationHandler doFetch SEVERE: SnapPull failed java.util.ConcurrentModificationException at java.util.AbstractList$Itr.checkForComodification(AbstractList.java:372) at java.util.AbstractList$Itr.next(AbstractList.java:343) at java.util.AbstractCollection.addAll(AbstractCollection.java:305) at org.apache.lucene.index.SegmentInfos.files(SegmentInfos.java:826) at org.apache.lucene.index.DirectoryReader$ReaderCommit.(DirectoryReader.java:916) at org.apache.lucene.index.DirectoryReader.getIndexCommit(DirectoryReader.java:856) at org.apache.solr.search.SolrIndexReader.getIndexCommit(SolrIndexReader.java:454) at org.apache.solr.handler.SnapPuller.fetchLatestIndex(SnapPuller.java:261) at org.apache.solr.handler.ReplicationHandler.doFetch(ReplicationHandler.java:264) at org.apache.solr.handler.ReplicationHandler$1.run(ReplicationHandler.java:146) -- 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