lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MakMak <pow...@gmail.com>
Subject Deadlock in using FSDirectory
Date Fri, 06 Mar 2009 19:26:18 GMT

Hi,

 I have the following :

Thread1  ----

1. Acquires a lock on FSDirectory.getDirectory (not right, not needed, but
should not be harmful anyway)
2. Issues an IndexReader.reopen() to open the reader and search. This call
waits on acquiring a MultiSegmentReader lock.

Thread2  -----

1. Issues prevIndexReader.close() which locks a MultiSegmentReader and then
goes ahead and waits on a lock for FSDirectory



Actual code:
Thread 1->
        at
org.apache.lucene.index.DirectoryIndexReader.reopen(DirectoryIndexReader.java:85)
        - waiting to lock <0xfffffffecaba1638> (a
org.apache.lucene.index.MultiSegmentReader)
        at
com.sample.search.LuceneEngine.getIndexReader(LuceneEngine.java:505)
        at
com.sample.search.LuceneEngine.doContractSearch(LuceneEngine.java:480)
        at com.sample.search.LuceneEngine.doSearch(LuceneEngine.java:458)
        - locked <0xfffffffe43ad06e0> (a
org.apache.lucene.store.FSDirectory)
        at
com.sample.search.FileSearchManager.doSearch(AttachmentSearchManager.java:117)
        at
com.sample.search.FileSearchFilter.<init>(AttachmentSearchFilter.java:70)


Thread2->
        at org.apache.lucene.store.FSDirectory.close(FSDirectory.java:480)
        - waiting to lock <0xfffffffe43ad06e0> (a
org.apache.lucene.store.FSDirectory)
        at
org.apache.lucene.index.DirectoryIndexReader.doClose(DirectoryIndexReader.java:164)
        at
org.apache.lucene.index.MultiSegmentReader.doClose(MultiSegmentReader.java:411)
        - locked <0xfffffffecaba1638> (a
org.apache.lucene.index.MultiSegmentReader)
        at org.apache.lucene.index.IndexReader.decRef(IndexReader.java:124)
        - locked <0xfffffffecaba1638> (a
org.apache.lucene.index.MultiSegmentReader)
        at org.apache.lucene.index.IndexReader.close(IndexReader.java:832)
        - locked <0xfffffffecaba1638> (a
org.apache.lucene.index.MultiSegmentReader)
        at com.sample.search.Engine.getIndexReader(LuceneEngine.java:508)
        at
com.sample.search.Engine.findMatchingFragments(LuceneEngine.java:521)


-- 
View this message in context: http://www.nabble.com/Deadlock-in-using-FSDirectory-tp22378951p22378951.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message