apache / lucene

Apache Lucene open-source search software
https://lucene.apache.org/
Apache License 2.0
2.63k stars 1.02k forks source link

java.lang.ArrayIndexOutOfBoundsException in BooleanScorer2.score [LUCENE-4341] #5408

Open asfimport opened 12 years ago

asfimport commented 12 years ago

I've only recently noticed this exception. For some reason, it doesn't always produce a stacktrace. I'll try to investigate some more and will try again with Lucene 3.6.1

java.lang.ArrayIndexOutOfBoundsException: 32 at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:310) at org.apache.lucene.search.BooleanScorer2$SingleMatchScorer.score(BooleanScorer2.java:122) at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:309) at org.apache.lucene.util.ScorerDocQueue.topScore(ScorerDocQueue.java:116) at org.apache.lucene.search.DisjunctionSumScorer.advanceAfterCurrent(DisjunctionSumScorer.java:168) at org.apache.lucene.search.DisjunctionSumScorer.nextDoc(DisjunctionSumScorer.java:141) at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:280) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:383)


Migrated from LUCENE-4341 by Raimund Merkert Environment:

Windows 2008 R2, JDK 1.7
asfimport commented 12 years ago

Robert Muir (@rmuir) (migrated from JIRA)

Do you have any more information (maybe from your logs?) such as what the structure of this query was?

I'll try to investigate some more and will try again with Lucene 3.6.1

If you don't mind, you could also test with 3.6.2 branch: http://svn.apache.org/repos/asf/lucene/dev/branches/lucene_solr_3_6/

It has several related bugfixes here: particularly DisjunctionSumScorer works totally differently and several fixes to coord() computations (its the coord() factors array that you are seeing the AIOOBE on)

asfimport commented 12 years ago

Raimund Merkert (migrated from JIRA)

This is one of the (automatically generated) queries causing this. The query itself doesn't seem to be an issue.

((u@Hlocation@:rP14* u@Hlocation@:rP15* u@Hlocation@:rP1C* u@Hlocation@:rP1D* u@Hlocation@:rP1w* u@Hlocation@:rP1x* u@Hlocation@:rP20* u@Hlocation@:rP21* u@Hlocation@:rP26* u@Hlocation@:rP27* u@Hlocation@:rP28* u@Hlocation@:rP29* u@Hlocation@:rP2q* u@Hlocation@:rP2r* u@Hlocation@:rP2s* u@Hlocation@:rP2t* u@Hlocation@:rP2y* u@Hlocation@:rP2z*) (u@Hlocation@:rP u@Hlocation@:r u@Hlocation@:rP2 u@Hlocation@:rP1)) ((u@Hlocation@1:rP14* u@Hlocation@1:rP15* u@Hlocation@1:rP1C* u@Hlocation@1:rP1D* u@Hlocation@1:rP1w* u@Hlocation@1:rP1x* u@Hlocation@1:rP20* u@Hlocation@1:rP21* u@Hlocation@1:rP26* u@Hlocation@1:rP27* u@Hlocation@1:rP28* u@Hlocation@1:rP29* u@Hlocation@1:rP2q* u@Hlocation@1:rP2r* u@Hlocation@1:rP2s* u@Hlocation@1:rP2t* u@Hlocation@1:rP2y* u@Hlocation@1:rP2z*) (u@Hlocation@1:rP u@Hlocation@1:r u@Hlocation@1:rP2 u@Hlocation@1:rP1)) ((u@Hlocation@2:rP14* u@Hlocation@2:rP15* u@Hlocation@2:rP1C* u@Hlocation@2:rP1D* u@Hlocation@2:rP1w* u@Hlocation@2:rP1x* u@Hlocation@2:rP20* u@Hlocation@2:rP21* u@Hlocation@2:rP26* u@Hlocation@2:rP27* u@Hlocation@2:rP28* u@Hlocation@2:rP29* u@Hlocation@2:rP2q* u@Hlocation@2:rP2r* u@Hlocation@2:rP2s* u@Hlocation@2:rP2t* u@Hlocation@2:rP2y* u@Hlocation@2:rP2z*) (u@Hlocation@2:rP u@Hlocation@2:r u@Hlocation@2:rP2 u@Hlocation@2:rP1)) ((u@Hlocation@3:rP14* u@Hlocation@3:rP15* u@Hlocation@3:rP1C* u@Hlocation@3:rP1D* u@Hlocation@3:rP1w* u@Hlocation@3:rP1x* u@Hlocation@3:rP20* u@Hlocation@3:rP21* u@Hlocation@3:rP26* u@Hlocation@3:rP27* u@Hlocation@3:rP28* u@Hlocation@3:rP29* u@Hlocation@3:rP2q* u@Hlocation@3:rP2r* u@Hlocation@3:rP2s* u@Hlocation@3:rP2t* u@Hlocation@3:rP2y* u@Hlocation@3:rP2z*) (u@Hlocation@3:rP u@Hlocation@3:r u@Hlocation@3:rP2 u@Hlocation@3:rP1)) ((u@Hlocation@4:rP14* u@Hlocation@4:rP15* u@Hlocation@4:rP1C* u@Hlocation@4:rP1D* u@Hlocation@4:rP1w* u@Hlocation@4:rP1x* u@Hlocation@4:rP20* u@Hlocation@4:rP21* u@Hlocation@4:rP26* u@Hlocation@4:rP27* u@Hlocation@4:rP28* u@Hlocation@4:rP29* u@Hlocation@4:rP2q* u@Hlocation@4:rP2r* u@Hlocation@4:rP2s* u@Hlocation@4:rP2t* u@Hlocation@4:rP2y* u@Hlocation@4:rP2z*) (u@Hlocation@4:rP u@Hlocation@4:r u@Hlocation@4:rP2 u@Hlocation@4:rP1)) ((u@Hlocation@5:rP14* u@Hlocation@5:rP15* u@Hlocation@5:rP1C* u@Hlocation@5:rP1D* u@Hlocation@5:rP1w* u@Hlocation@5:rP1x* u@Hlocation@5:rP20* u@Hlocation@5:rP21* u@Hlocation@5:rP26* u@Hlocation@5:rP27* u@Hlocation@5:rP28* u@Hlocation@5:rP29* u@Hlocation@5:rP2q* u@Hlocation@5:rP2r* u@Hlocation@5:rP2s* u@Hlocation@5:rP2t* u@Hlocation@5:rP2y* u@Hlocation@5:rP2z*) (u@Hlocation@5:rP u@Hlocation@5:r u@Hlocation@5:rP2 u@Hlocation@5:rP1)) ((u@Hlocation@6:rP14* u@Hlocation@6:rP15* u@Hlocation@6:rP1C* u@Hlocation@6:rP1D* u@Hlocation@6:rP1w* u@Hlocation@6:rP1x* u@Hlocation@6:rP20* u@Hlocation@6:rP21* u@Hlocation@6:rP26* u@Hlocation@6:rP27* u@Hlocation@6:rP28* u@Hlocation@6:rP29* u@Hlocation@6:rP2q* u@Hlocation@6:rP2r* u@Hlocation@6:rP2s* u@Hlocation@6:rP2t* u@Hlocation@6:rP2y* u@Hlocation@6:rP2z*) (u@Hlocation@6:rP u@Hlocation@6:r u@Hlocation@6:rP2 u@Hlocation@6:rP1)) ((u@Hlocation@7:rP14* u@Hlocation@7:rP15* u@Hlocation@7:rP1C* u@Hlocation@7:rP1D* u@Hlocation@7:rP1w* u@Hlocation@7:rP1x* u@Hlocation@7:rP20* u@Hlocation@7:rP21* u@Hlocation@7:rP26* u@Hlocation@7:rP27* u@Hlocation@7:rP28* u@Hlocation@7:rP29* u@Hlocation@7:rP2q* u@Hlocation@7:rP2r* u@Hlocation@7:rP2s* u@Hlocation@7:rP2t* u@Hlocation@7:rP2y* u@Hlocation@7:rP2z*) (u@Hlocation@7:rP u@Hlocation@7:r u@Hlocation@7:rP2 u@Hlocation@7:rP1)) ((u@Hlocation@8:rP14* u@Hlocation@8:rP15* u@Hlocation@8:rP1C* u@Hlocation@8:rP1D* u@Hlocation@8:rP1w* u@Hlocation@8:rP1x* u@Hlocation@8:rP20* u@Hlocation@8:rP21* u@Hlocation@8:rP26* u@Hlocation@8:rP27* u@Hlocation@8:rP28* u@Hlocation@8:rP29* u@Hlocation@8:rP2q* u@Hlocation@8:rP2r* u@Hlocation@8:rP2s* u@Hlocation@8:rP2t* u@Hlocation@8:rP2y* u@Hlocation@8:rP2z*) (u@Hlocation@8:rP u@Hlocation@8:r u@Hlocation@8:rP2 u@Hlocation@8:rP1)) ((u@Hlocation@9:rP14* u@Hlocation@9:rP15* u@Hlocation@9:rP1C* u@Hlocation@9:rP1D* u@Hlocation@9:rP1w* u@Hlocation@9:rP1x* u@Hlocation@9:rP20* u@Hlocation@9:rP21* u@Hlocation@9:rP26* u@Hlocation@9:rP27* u@Hlocation@9:rP28* u@Hlocation@9:rP29* u@Hlocation@9:rP2q* u@Hlocation@9:rP2r* u@Hlocation@9:rP2s* u@Hlocation@9:rP2t* u@Hlocation@9:rP2y* u@Hlocation@9:rP2z*) (u@Hlocation@9:rP u@Hlocation@9:r u@Hlocation@9:rP2 u@Hlocation@9:rP1)) ((u@Hlocation@10:rP14* u@Hlocation@10:rP15* u@Hlocation@10:rP1C* u@Hlocation@10:rP1D* u@Hlocation@10:rP1w* u@Hlocation@10:rP1x* u@Hlocation@10:rP20* u@Hlocation@10:rP21* u@Hlocation@10:rP26* u@Hlocation@10:rP27* u@Hlocation@10:rP28* u@Hlocation@10:rP29* u@Hlocation@10:rP2q* u@Hlocation@10:rP2r* u@Hlocation@10:rP2s* u@Hlocation@10:rP2t* u@Hlocation@10:rP2y* u@Hlocation@10:rP2z*) (u@Hlocation@10:rP u@Hlocation@10:r u@Hlocation@10:rP2 u@Hlocation@10:rP1)) ((u@Hlocation@11:rP14* u@Hlocation@11:rP15* u@Hlocation@11:rP1C* u@Hlocation@11:rP1D* u@Hlocation@11:rP1w* u@Hlocation@11:rP1x* u@Hlocation@11:rP20* u@Hlocation@11:rP21* u@Hlocation@11:rP26* u@Hlocation@11:rP27* u@Hlocation@11:rP28* u@Hlocation@11:rP29* u@Hlocation@11:rP2q* u@Hlocation@11:rP2r* u@Hlocation@11:rP2s* u@Hlocation@11:rP2t* u@Hlocation@11:rP2y* u@Hlocation@11:rP2z*) (u@Hlocation@11:rP u@Hlocation@11:r u@Hlocation@11:rP2 u@Hlocation@11:rP1)) java.lang.ArrayIndexOutOfBoundsException: 15 at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:310) at org.apache.lucene.search.BooleanScorer2$SingleMatchScorer.score(BooleanScorer2.java:122) at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:309) at org.apache.lucene.util.ScorerDocQueue.topScore(ScorerDocQueue.java:116) at org.apache.lucene.search.DisjunctionSumScorer.advanceAfterCurrent(DisjunctionSumScorer.java:168) at org.apache.lucene.search.DisjunctionSumScorer.nextDoc(DisjunctionSumScorer.java:141) at org.apache.lucene.search.BooleanScorer2.score(BooleanScorer2.java:280) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:581) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:383)

Will try to debug tomorrow.