ayinresh commented on issue #15068: URL: https://github.com/apache/lucene/issues/15068#issuecomment-3210953067
Heads up that there may be other issues with `RefCountedSharedArena`. On 10.2.2, we hit an infinite loop at the following stacktrace: ``` java.lang.Thread.State: RUNNABLE at org.apache.lucene.store.RefCountedSharedArena.close(RefCountedSharedArena.java:123) at org.apache.lucene.store.MemorySegmentIndexInput.close(MemorySegmentIndexInput.java:702) at org.apache.lucene.util.IOUtils.close(IOUtils.java:85) at org.apache.lucene.util.IOUtils.close(IOUtils.java:72) at org.apache.lucene.codecs.lucene90.Lucene90CompoundReader.close(Lucene90CompoundReader.java:150) at org.apache.lucene.util.IOUtils.close(IOUtils.java:85) at org.apache.lucene.util.IOUtils.close(IOUtils.java:72) at org.apache.lucene.index.SegmentCoreReaders.decRef(SegmentCoreReaders.java:172) at org.apache.lucene.index.SegmentReader.doClose(SegmentReader.java:223) at org.apache.lucene.index.IndexReader.decRef(IndexReader.java:258) at org.apache.lucene.index.StandardDirectoryReader$$Lambda/0x0000000080e0cd48.accept(Unknown Source) at org.apache.lucene.util.IOUtils.lambda$applyToAll$0(IOUtils.java:467) at org.apache.lucene.util.IOUtils$$Lambda/0x0000000080e03c20.close(Unknown Source) at org.apache.lucene.util.IOUtils.close(IOUtils.java:85) at org.apache.lucene.util.IOUtils.applyToAll(IOUtils.java:466) at org.apache.lucene.index.StandardDirectoryReader.doClose(StandardDirectoryReader.java:482) at org.apache.lucene.index.IndexReader.decRef(IndexReader.java:258) at org.apache.lucene.search.SearcherManager.decRef(SearcherManager.java:136) at org.apache.lucene.search.SearcherManager.decRef(SearcherManager.java:52) at org.apache.lucene.search.ReferenceManager.release(ReferenceManager.java:264) at org.apache.lucene.search.ReferenceManager.swapReference(ReferenceManager.java:57) - locked <0x00000403f312ef18> (a org.apache.lucene.search.SearcherManager) at org.apache.lucene.search.ReferenceManager.close(ReferenceManager.java:139) - locked <0x00000403f312ef18> (a org.apache.lucene.search.SearcherManager) ``` It appears that `MemorySegmentIndexInput` repeatedly tries to close the `RefCountedSharedArena` [here](https://github.com/apache/lucene/blob/32e97a6f66157a98f35ba98d983ad0d5eb5de4b9/lucene/core/src/java/org/apache/lucene/store/MemorySegmentIndexInput.java#L718), but `RefCountedSharedArena` always fails [here](https://github.com/apache/lucene/blob/b1c1770e8052a74fd30e3520e4fd662e2724bd1c/lucene/core/src/java/org/apache/lucene/store/RefCountedSharedArena.java#L107). The effect is that closing the searcher blocks indefinitely. We discovered this as a root cause of a production outage this morning, so I haven't had time to read up fully on this code / thread, and apologies for not providing more context here. Planning on doing a more detailed writeup and filing as a separate issue. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org