jpountz commented on PR #12183:
URL: https://github.com/apache/lucene/pull/12183#issuecomment-1630848267
Thanks for sharing the failing seeds. When I saw your message, I suspected
that there would be cases when we would fork from the executor into itself,
which causes deadlocks. I saw the following stack trace, which confirms this:
```
"LuceneTestCase-1-thread-1" #18 prio=5 os_prio=31 cpu=83,31ms
elapsed=131,72s tid=0x00007fef6e8f6600 nid=0x7503 waiting on condition
[0x000070000ab6d000]
java.lang.Thread.State: WAITING (parking)
at jdk.internal.misc.Unsafe.park([email protected]/Native Method)
- parking to wait for <0x00000007f838c8d0> (a
java.util.concurrent.FutureTask)
at
java.util.concurrent.locks.LockSupport.park([email protected]/LockSupport.java:211)
at
java.util.concurrent.FutureTask.awaitDone([email protected]/FutureTask.java:447)
at
java.util.concurrent.FutureTask.get([email protected]/FutureTask.java:190)
at
org.apache.lucene.index.TermStates.build([email protected]/TermStates.java:127)
at
org.apache.lucene.queries.spans.SpanTermQuery.createWeight(SpanTermQuery.java:85)
at
org.apache.lucene.queries.payloads.SpanPayloadCheckQuery.createWeight(SpanPayloadCheckQuery.java:108)
at
org.apache.lucene.queries.payloads.SpanPayloadCheckQuery.createWeight(SpanPayloadCheckQuery.java:44)
at
org.apache.lucene.search.IndexSearcher.createWeight([email protected]/IndexSearcher.java:868)
at
org.apache.lucene.tests.search.AssertingIndexSearcher.createWeight([email protected]/AssertingIndexSearcher.java:62)
at
org.apache.lucene.search.IndexSearcher.explain([email protected]/IndexSearcher.java:833)
at
org.apache.lucene.tests.search.CheckHits$ExplanationAsserter.collect([email protected]/CheckHits.java:617)
at
org.apache.lucene.tests.search.AssertingLeafCollector.collect([email protected]/AssertingLeafCollector.java:50)
at
org.apache.lucene.tests.search.AssertingCollector$1.collect([email protected]/AssertingCollector.java:69)
at
org.apache.lucene.tests.search.AssertingLeafCollector.collect([email protected]/AssertingLeafCollector.java:50)
at
org.apache.lucene.tests.search.AssertingLeafCollector.collect([email protected]/AssertingLeafCollector.java:50)
at
org.apache.lucene.tests.search.AssertingLeafCollector.collect([email protected]/AssertingLeafCollector.java:50)
at
org.apache.lucene.search.Weight$DefaultBulkScorer.scoreAll([email protected]/Weight.java:317)
at
org.apache.lucene.search.Weight$DefaultBulkScorer.score([email protected]/Weight.java:249)
at
org.apache.lucene.tests.search.AssertingBulkScorer.score([email protected]/AssertingBulkScorer.java:101)
at
org.apache.lucene.tests.search.AssertingBulkScorer.score([email protected]/AssertingBulkScorer.java:67)
at
org.apache.lucene.search.IndexSearcher.search([email protected]/IndexSearcher.java:737)
at
org.apache.lucene.tests.search.AssertingIndexSearcher.search([email protected]/AssertingIndexSearcher.java:79)
at
org.apache.lucene.search.IndexSearcher.lambda$search$1([email protected]/IndexSearcher.java:687)
at
org.apache.lucene.search.IndexSearcher$$Lambda$265/0x0000000801204058.call([email protected]/Unknown
Source)
at
java.util.concurrent.FutureTask.run([email protected]/FutureTask.java:264)
at
java.util.concurrent.ThreadPoolExecutor.runWorker([email protected]/ThreadPoolExecutor.java:1136)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run([email protected]/ThreadPoolExecutor.java:635)
at java.lang.Thread.run([email protected]/Thread.java:833)
```
Now that createWeight() can fork tasks into the executor, we should never
call createWeight() from one of the tasks that get created for each
IndexSearcher slice. AssertingCollector is the problem in this particular case.
--
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]