ayinresh commented on issue #15119: URL: https://github.com/apache/lucene/issues/15119#issuecomment-3234589059
@drabe8 Not an expert, but I believe this is a type of class loading deadlock, which has occurred numerous times in the past (e.g. [LUCENE-6482](https://issues.apache.org/jira/browse/LUCENE-6482)). We just hit this today as well (Lucene `10.2.2`, Java `21.0.8`). It occurred just after node restart (when class loading would occur for the first time). Our thread dump showed over 1K `RUNNABLE` threads with `in Object.wait()`, and `waiting on the Class initialization monitor for <class>` at the top of the stacktrace. Specifically, threads are blocked on class loading for the following classes: - `org.apache.lucene.codecs.lucene90.blocktree.SegmentTermsEnum` (1077 threads) - `org.apache.lucene.search.TermInSetQuery$SetEnum` (51 threads) - `org.apache.lucene.index.BaseTermsEnum` (3 threads) - `org.apache.lucene.index.SortedDocValuesTermsEnum` (17 threads) - `org.apache.lucene.index.TermsEnum` (1 thread) After some basic research, it seems the easiest fix is to try to preload these classes at startup using `java.lang.Class::forName` before any other threads attempt to utilize Lucene and trigger class loading concurrently (risking deadlock). I'm not sure which classes need to be preloaded, but I would start with the classes present in our thread dumps. -- 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