Return-Path: X-Original-To: apmail-lucene-dev-archive@www.apache.org Delivered-To: apmail-lucene-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 4F76F239D for ; Tue, 3 May 2011 23:03:44 +0000 (UTC) Received: (qmail 44011 invoked by uid 500); 3 May 2011 23:03:42 -0000 Delivered-To: apmail-lucene-dev-archive@lucene.apache.org Received: (qmail 43837 invoked by uid 500); 3 May 2011 23:03:42 -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 43754 invoked by uid 99); 3 May 2011 23:03:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 23:03:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2011 23:03:41 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 72E24C0D43 for ; Tue, 3 May 2011 23:03:03 +0000 (UTC) Date: Tue, 3 May 2011 23:03:03 +0000 (UTC) From: "Adrian Nistor (JIRA)" To: dev@lucene.apache.org Message-ID: <32728061.20097.1304463783467.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <807158955.19718.1304455803158.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (LUCENE-3066) NullPointerException when calling sizeInBytes and setHasVectors concurrently. 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/LUCENE-3066?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Nistor closed LUCENE-3066. --------------------------------- Resolution: Not A Problem > NullPointerException when calling sizeInBytes and setHasVectors concurrently. > ----------------------------------------------------------------------------- > > Key: LUCENE-3066 > URL: https://issues.apache.org/jira/browse/LUCENE-3066 > Project: Lucene - Java > Issue Type: Bug > Affects Versions: 3.1 > Environment: java 1.6.0_24 > Ubuntu 10.10 > Reporter: Adrian Nistor > Attachments: Test.java > > > Hi, > I am encountering a NullPointerException when using > org.apache.lucene.index.SegmentInfo. It appears in version 3.1.0 and also in > revision 1099085 (May 3rd 2011). > The NullPointerException is thrown by SegmentInfo.sizeInBytes(false) when > calling SegmentInfo.sizeInBytes(false) and SegmentInfo.setHasVectors(true) in > parallel. When these methods are called sequentially, they do not throw any > exception. > I have attached a test that exposes this problem. If you set ExposeBug = true, > the methods are called concurrently and you get the NullPointerException. If you > set ExposeBug = false, the methods are called sequentially, and there is no > exception. Note that, in the sequential version, the methods are called many > times (just like in the parallel version), and in different orders (just like > in the parallel version). > The concurrent test (ExposeBug = true) always throws NullPointerException > under heavy load (ManyIterations = 100000000). Under small load (e.g., if you > set ManyIterations = 10), the NullPointerException will not manifest. I suppose > you need a certain thread interleaving for the NullPointerException to happen, > and thus you need the heavy load. > Is this a bug? Is there a patch for it? > Thanks! > Adrian -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org