ronmjf opened a new issue, #15262: URL: https://github.com/apache/lucene/issues/15262
### Description **Problem Description** We are experiencing a significant memory leak that appears to be specific to the RHEL 8 environment. During our indexing process, we create and then subsequently delete a Lucene index using maven-indexer. Although the index directory and its files are successfully removed from the filesystem, the JVM process continues to hold onto the file handles, preventing memory from being released. **Steps to Reproduce** Create a new indexing context using org.apache.maven.index.DefaultIndexer#createIndexingContext(...). Perform indexing operations, which trigger org.apache.lucene.index.DocumentsWriter#updateDocuments and create compound segment files (.cfs). After indexing is complete, close the context and request deletion of the index files by calling org.apache.maven.index.DefaultIndexer#closeIndexingContext(context, true). Observe that the index directory is deleted from the filesystem as expected. Monitor the JVM's memory and open file descriptors. **Expected Behavior** The JVM should release the file handles for the deleted .cfs files, and the associated memory should be garbage collected. **Actual Behavior** The JVM retains the file handles for the deleted index files, resulting in a continuous increase in memory consumption. This issue is only reproducible on RHEL 8. <img width="2994" height="190" alt="Image" src="https://github.com/user-attachments/assets/0aab8958-9359-4a50-9a0d-9e7b9a3751a8" /> ### Version and environment details Lucene version - 9.12.2 Maven indexer version - 7.1.6 JVM - 21 OS - Red Hat Enterprise Linux 8 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
