Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 41259 invoked from network); 16 Feb 2008 00:39:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Feb 2008 00:39:30 -0000 Received: (qmail 91116 invoked by uid 500); 16 Feb 2008 00:39:17 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 91077 invoked by uid 500); 16 Feb 2008 00:39:17 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 91066 invoked by uid 99); 16 Feb 2008 00:39:17 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 15 Feb 2008 16:39:16 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of vivextra@gmail.com designates 72.14.204.234 as permitted sender) Received: from [72.14.204.234] (HELO qb-out-0506.google.com) (72.14.204.234) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 16 Feb 2008 00:38:45 +0000 Received: by qb-out-0506.google.com with SMTP id o21so268696qba.9 for ; Fri, 15 Feb 2008 16:38:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=VykX5T8f4OUi3chv2EuvF/YdDwnuRc84Wz1rUZhlqU4=; b=fo/nBRSP004V12oYchYR27MdY6ZqFRf2fTfvOGskA/yVRjx9ibZoVblGqx4wtw/G5oFs52Sc+J97MWo0z3kVS+zOvTR+nJF3YaYnd9cWXQAgAZuIn9vKNL8wlQCnYYtvO8jJaWIetSKXDuJ8+IpoIIZZasQgAElNv8ykav1MuHY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=GtGC6TnXamBCLl6fUk1brhIZmV5Ao4faCEWiFCFyUETqLFjXvtP8JYvnrQhC/yg8PcUpNeg6ZXv5R4x/u7Odp8ReRFfpfdzmPsukIUC8TWZVLcpa79bm4pbbAikRO2wev5fRlT8cBDmPUaQbK6jjnZcwWDrfln61gt8VHEcVZi0= Received: by 10.114.78.1 with SMTP id a1mr3634393wab.102.1203122331850; Fri, 15 Feb 2008 16:38:51 -0800 (PST) Received: by 10.114.14.3 with HTTP; Fri, 15 Feb 2008 16:38:51 -0800 (PST) Message-ID: Date: Fri, 15 Feb 2008 16:38:51 -0800 From: "vivek sar" To: java-user@lucene.apache.org Subject: Re: DefaultIndexAccessor In-Reply-To: <47A9E258.7020400@ai.sri.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1bcb7c7f0802040450k1ca47982v66894276f1c20c2b@mail.gmail.com> <47A70DE3.50202@gmail.com> <1bcb7c7f0802040612m1e2bdc07h9a2eaa531fc3dd5@mail.gmail.com> <47A74849.3050005@gmail.com> <1bcb7c7f0802041001k165bd530n75e692e635971182@mail.gmail.com> <47A7AFD4.5040908@gmail.com> <47A9470A.4020500@ai.sri.com> <47A9B0CC.1000809@gmail.com> <47A9E258.7020400@ai.sri.com> X-Virus-Checked: Checked by ClamAV on apache.org Mark, There seems to be some issue with DefaultMultiIndexAccessor.java. I got following NPE exception, 2008-02-13 07:10:28,021 ERROR [http-7501-Processor6] ReportServiceImpl - java.lang.NullPointerException at org.apache.lucene.indexaccessor.DefaultMultiIndexAccessor.release(DefaultMultiIndexAccessor.java:89) Looks like the IndexAccessor for one of the Searcher in the MultiSearcher returned null. Not sure how is that possible, any ideas how is that possible? In my case it caused a critical error as the writer thread was stuck forever (we found out after couple of days) because of this, "PS thread 9" prio=1 tid=0x00002aac70eb95d0 nid=0x6ba in Object.wait() [0x0000000047533000..0x0000000047533b80] at java.lang.Object.wait(Native Method) - waiting on <0x00002aab3e5c7700> (a org.apache.lucene.indexaccessor.DefaultIndexAccessor) at java.lang.Object.wait(Unknown Source) at org.apache.lucene.indexaccessor.DefaultIndexAccessor.waitForReadersAndCloseCached(DefaultIndexAccessor.java:593) at org.apache.lucene.indexaccessor.DefaultIndexAccessor.release(DefaultIndexAccessor.java:510) - locked <0x00002aab3e5c7700> (a org.apache.lucene.indexaccessor.DefaultIndexAccessor) The only way to recover was to re-start the application. I use both MultiSearcher and IndexSearcher in my application, I've looked at your code but not able to pinpoint how can it go wrong? Of course, you do have to check for null in the MultiIndexAccessor.release, but how could you get null index accessor at first place? I do call IndexAccessor.close during partitioning of indexes, but the close should wait for all Searchers to close before doing anything. Do you have any updates to your code since 02/04/2008? Thanks, -vivek On Feb 6, 2008 8:37 AM, Jay wrote: > Thanks for your clarifications, Mark! > > > Jay > > > Mark Miller wrote: > > > >> > >> 5. Although currently IndexSearcher.close() does almost nothing except > >> to close the internal index reader, it might be a safer to close > >> searcher itself as well in closeCachedSearcher(), just in case, the > >> searcher may have other resources to release in the future version of > >> Lucene. > > Didn't catch that "as well". You are right, great idea Jay, thanks. > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org > For additional commands, e-mail: java-user-help@lucene.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org For additional commands, e-mail: java-user-help@lucene.apache.org