You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Donld Hill <dh...@eweb-service.com> on 2010/12/16 05:06:16 UTC

lucene locking

  I have a app that seems to be locking on some search calls. I am 
including the stacktrace for the blocked and blocker thread. We are 
using the following jars lucene-snowball-2.1.0.jar and lucene-2.1.0.jar. 
The indexes are located on the local disk. We are running on multiple 
JVM's against the store. On a 2 CPU zion quad core box. Any thoughts or 
suggestions on how to troubleshoot this locking?


"TP-Processor177" daemon prio=10 tid=0x0000002c8a96c800 nid=0x769d 
waiting for monitor entry [0x000000004e60a000..0x000000004e60dcb0]
    java.lang.Thread.State: BLOCKED (on object monitor)
         at 
org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:450)
         - locked <0x0000002aa0a4f5a8> (a 
org.apache.lucene.index.SegmentReader)
         at 
org.apache.lucene.search.TermQuery$TermWeight.scorer(TermQuery.java:69)
         at 
org.apache.lucene.search.BooleanQuery$BooleanWeight2.scorer(BooleanQuery.java:355)
         at 
org.apache.lucene.search.BooleanQuery$BooleanWeight2.scorer(BooleanQuery.java:355)
         at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:130)
         at 
org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:111)
         at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:66)
         at org.apache.lucene.search.Hits.<init>(Hits.java:53)
         at org.apache.lucene.search.Searcher.search(Searcher.java:54)


Here is the executing thread that is doing the blocking

"TP-Processor97" daemon prio=10 tid=0x0000002c8fe35400 nid=0x75ce 
runnable [0x00000000497bc000..0x00000000497bfdb0]
    java.lang.Thread.State: RUNNABLE
         at 
org.apache.lucene.index.SegmentReader.isDeleted(SegmentReader.java:346)
         - locked <0x0000002aa0a4f5a8> (a 
org.apache.lucene.index.SegmentReader)
         at 
org.apache.lucene.index.SegmentReader.document(SegmentReader.java:339)
         - locked <0x0000002aa0a4f5a8> (a 
org.apache.lucene.index.SegmentReader)
         at 
org.apache.lucene.index.IndexReader.document(IndexReader.java:368)
         at 
org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:84)
         at org.apache.lucene.search.Hits.doc(Hits.java:104)


Re: lucene locking

Posted by Earl Hood <ea...@earlhood.com>.
On Thu, Dec 16, 2010 at 8:36 AM, Donld Hill <dh...@eweb-service.com> wrote:
> Can I safely upgrade to a newer version, do I need to perform any updates on
> the actual indices?

>From my personal experience, upgrading from v2 to v3 required rebuilds
of indices since we experienced some problems performing queries
against v2 built indices.

I would guess if you stick with v2 (v2.9), you may be okay, but others
will have to confirm this.

--ewh

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: lucene locking

Posted by Donld Hill <dh...@eweb-service.com>.
  So will updating to a newer version of Lucene help with the 
performance when loading DOCS. I will also do some research to see what 
is being loaded as this is a 3rd party that's using Lucene.

Can I safely upgrade to a newer version, do I need to perform any 
updates on the actual indices?
On 12/16/10 4:05 AM, Doron Cohen wrote:
>>>    I have a app that seems to be locking on some search calls. I am
>> including
>>> the stacktrace for the blocked and blocker thread.
> Is it daedlock for sure?
> No search deadlock fixes were done since 2.1.0, so perhaps it is something
> else...
>
>> "TP-Processor177" daemon prio=10 tid=0x0000002c8a96c800 nid=0x769d
>>> waiting for monitor entry [0x000000004e60a000..0x000000004e60dcb0]
>>>      java.lang.Thread.State: BLOCKED (on object monitor)
>>>           at
>> org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:450)
>>>           - locked<0x0000002aa0a4f5a8>  (a
>> org.apache.lucene.index.SegmentReader)
>>
> Indeed this guy is blocked.
>
>> Here is the executing thread that is doing the blocking
> But this guy seems to be running...?
>
>> "TP-Processor97" daemon prio=10 tid=0x0000002c8fe35400 nid=0x75ce
>> runnable [0x00000000497bc000..0x00000000497bfdb0]
>>      java.lang.Thread.State: RUNNABLE
>>           at
> org.apache.lucene.index.SegmentReader.isDeleted(SegmentReader.java:346)
>>           at
> org.apache.lucene.index.IndexReader.document(IndexReader.java:368)
>>           at
> org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:84)
>>           at org.apache.lucene.search.Hits.doc(Hits.java:104)
> Also, not sure for how many docs your app is loading like this (calling
> Hits.docs()), but documents loading is costly... is there a chance that many
> docs are being loaded and things just take long, not a deadlock?
>
> Doron
>


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Re: lucene locking

Posted by Doron Cohen <cd...@gmail.com>.
>
> >   I have a app that seems to be locking on some search calls. I am
> including
> > the stacktrace for the blocked and blocker thread.
>

Is it daedlock for sure?
No search deadlock fixes were done since 2.1.0, so perhaps it is something
else...

> "TP-Processor177" daemon prio=10 tid=0x0000002c8a96c800 nid=0x769d
> > waiting for monitor entry [0x000000004e60a000..0x000000004e60dcb0]
> >     java.lang.Thread.State: BLOCKED (on object monitor)
> >          at
> org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:450)
> >          - locked <0x0000002aa0a4f5a8> (a
> org.apache.lucene.index.SegmentReader)
>

Indeed this guy is blocked.

> Here is the executing thread that is doing the blocking

But this guy seems to be running...?

> "TP-Processor97" daemon prio=10 tid=0x0000002c8fe35400 nid=0x75ce
> runnable [0x00000000497bc000..0x00000000497bfdb0]
>     java.lang.Thread.State: RUNNABLE
>          at
org.apache.lucene.index.SegmentReader.isDeleted(SegmentReader.java:346)
>          at
org.apache.lucene.index.IndexReader.document(IndexReader.java:368)
>          at
org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:84)
>          at org.apache.lucene.search.Hits.doc(Hits.java:104)

Also, not sure for how many docs your app is loading like this (calling
Hits.docs()), but documents loading is costly... is there a chance that many
docs are being loaded and things just take long, not a deadlock?

Doron

RE: lucene locking

Posted by Uwe Schindler <uw...@thetaphi.de>.
I would recommend upgrading Lucene to at least 2.9.4. Your version is very
antique.

-----
Uwe Schindler
H.-H.-Meier-Allee 63, D-28213 Bremen
http://www.thetaphi.de
eMail: uwe@thetaphi.de

> -----Original Message-----
> From: Donld Hill [mailto:dhill@eweb-service.com]
> Sent: Thursday, December 16, 2010 5:06 AM
> To: java-user@lucene.apache.org
> Subject: lucene locking
> 
>   I have a app that seems to be locking on some search calls. I am
including
> the stacktrace for the blocked and blocker thread. We are using the
following
> jars lucene-snowball-2.1.0.jar and lucene-2.1.0.jar.
> The indexes are located on the local disk. We are running on multiple
JVM's
> against the store. On a 2 CPU zion quad core box. Any thoughts or
> suggestions on how to troubleshoot this locking?
> 
> 
> "TP-Processor177" daemon prio=10 tid=0x0000002c8a96c800 nid=0x769d
> waiting for monitor entry [0x000000004e60a000..0x000000004e60dcb0]
>     java.lang.Thread.State: BLOCKED (on object monitor)
>          at
> org.apache.lucene.index.SegmentReader.norms(SegmentReader.java:450)
>          - locked <0x0000002aa0a4f5a8> (a
> org.apache.lucene.index.SegmentReader)
>          at
> org.apache.lucene.search.TermQuery$TermWeight.scorer(TermQuery.java:
> 69)
>          at
> org.apache.lucene.search.BooleanQuery$BooleanWeight2.scorer(BooleanQ
> uery.java:355)
>          at
> org.apache.lucene.search.BooleanQuery$BooleanWeight2.scorer(BooleanQ
> uery.java:355)
>          at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:130)
>          at
> org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:111)
>          at org.apache.lucene.search.Hits.getMoreDocs(Hits.java:66)
>          at org.apache.lucene.search.Hits.<init>(Hits.java:53)
>          at org.apache.lucene.search.Searcher.search(Searcher.java:54)
> 
> 
> Here is the executing thread that is doing the blocking
> 
> "TP-Processor97" daemon prio=10 tid=0x0000002c8fe35400 nid=0x75ce
> runnable [0x00000000497bc000..0x00000000497bfdb0]
>     java.lang.Thread.State: RUNNABLE
>          at
> org.apache.lucene.index.SegmentReader.isDeleted(SegmentReader.java:34
> 6)
>          - locked <0x0000002aa0a4f5a8> (a
> org.apache.lucene.index.SegmentReader)
>          at
> org.apache.lucene.index.SegmentReader.document(SegmentReader.java:3
> 39)
>          - locked <0x0000002aa0a4f5a8> (a
> org.apache.lucene.index.SegmentReader)
>          at
> org.apache.lucene.index.IndexReader.document(IndexReader.java:368)
>          at
> org.apache.lucene.search.IndexSearcher.doc(IndexSearcher.java:84)
>          at org.apache.lucene.search.Hits.doc(Hits.java:104)



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org