lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@gmail.com>
Subject Re: Deadlock in DocumentsWriterFlushControl
Date Wed, 15 May 2013 21:49:13 GMT
This seems like a bug caused due to the fact that we moved the CFS
building into DWPT. Can you open an issue for this?

simon

On Wed, May 15, 2013 at 5:50 PM, Sergiusz Urbaniak
<sergiusz.urbaniak@gmail.com> wrote:
> Hi all,
>
> We have an obvious deadlock between a "MaybeRefreshIndexJob" thread
> calling ReferenceManager.maybeRefresh(ReferenceManager.java:204) and a
> "RebuildIndexJob" thread calling
> IndexWriter.deleteAll(IndexWriter.java:2065).
>
> Lucene tries to flush in the "MaybeRefreshIndexJob" thread while
> simultaneously waiting for the flush in the "RebuildIndexJob" thread
> deadlocked by the intrinsic lock on the IndexWriter instance.
>
> May this be a bug or is it wrong usage? We are not explicitly locking
> on the IndexWriter instance (following the documentation).
>
> Thread-Dump:
>
> "Thread - 1" daemon prio=10 tid=0x00007f8fe4006000 nid=0x1ac2 waiting
> for monitor entry [0x00007f8fa7bf7000]
>    java.lang.Thread.State: BLOCKED (on object monitor)
> at
> org.apache.lucene.index.IndexWriter.useCompoundFile(IndexWriter.java:2223)
> - waiting to lock &lt;0x00000000f1c00438&gt; (a
> org.apache.lucene.index.IndexWriter)
> at
> org.apache.lucene.index.DocumentsWriterPerThread.sealFlushedSegment(DocumentsWriterPerThread.java:563)
> at
> org.apache.lucene.index.DocumentsWriterPerThread.flush(DocumentsWriterPerThread.java:533)
> at org.apache.lucene.index.DocumentsWriter.doFlush(DocumentsWriter.java:422)
> at
> org.apache.lucene.index.DocumentsWriter.flushAllThreads(DocumentsWriter.java:559)
> at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:365)
> - locked &lt;0x00000000f1c007d0&gt; (a java.lang.Object)
> at
> org.apache.lucene.index.StandardDirectoryReader.doOpenFromWriter(StandardDirectoryReader.java:270)
> at
> org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:245)
> at
> org.apache.lucene.index.StandardDirectoryReader.doOpenIfChanged(StandardDirectoryReader.java:235)
> at
> org.apache.lucene.index.DirectoryReader.openIfChanged(DirectoryReader.java:170)
> at
> org.apache.lucene.search.SearcherManager.refreshIfNeeded(SearcherManager.java:118)
> at
> org.apache.lucene.search.SearcherManager.refreshIfNeeded(SearcherManager.java:58)
> at
> org.apache.lucene.search.ReferenceManager.doMaybeRefresh(ReferenceManager.java:155)
> at
> org.apache.lucene.search.ReferenceManager.maybeRefresh(ReferenceManager.java:204)
> at jobs.MaybeRefreshIndexJob.timeout(MaybeRefreshIndexJob.java:47)
>
> "Thread - 2" prio=10 tid=0x00007f903000a000 nid=0x1a38 in
> Object.wait() [0x00007f9037dd6000]
>    java.lang.Thread.State: WAITING (on object monitor)
> at java.lang.Object.wait(Native Method)
> - waiting on &lt;0x00000000f1c0c240&gt; (a
> org.apache.lucene.index.DocumentsWriterFlushControl)
> at java.lang.Object.wait(Object.java:503)
> at
> org.apache.lucene.index.DocumentsWriterFlushControl.waitForFlush(DocumentsWriterFlushControl.java:245)
> - locked &lt;0x00000000f1c0c240&gt; (a
> org.apache.lucene.index.DocumentsWriterFlushControl)
> at org.apache.lucene.index.DocumentsWriter.abort(DocumentsWriter.java:235)
> - locked &lt;0x00000000f1c05370&gt; (a
> org.apache.lucene.index.DocumentsWriter)
> at org.apache.lucene.index.IndexWriter.deleteAll(IndexWriter.java:2065)
> - locked &lt;0x00000000f1c00438&gt; (a org.apache.lucene.index.IndexWriter)
> at jobs.RebuildIndexJob.buildIndex(RebuildIndexJob.java:102)
>
> Thanks for any help,
> Sergiusz

---------------------------------------------------------------------
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