Increase of NPEs during luindex runs since reintroduction of checkcasts to inlined methods

Description

I've noticed an increase of NPEs during luindex runs in the regression tests since end of June. The stack trace looks like the following:

java.lang.NullPointerException
java.lang.NullPointerException
at org.apache.lucene.index.SegmentMergeQueue.lessThan(SegmentMergeQueue.java:30)
at org.apache.lucene.util.PriorityQueue.downHeap(PriorityQueue.java:141)
at org.apache.lucene.util.PriorityQueue.pop(PriorityQueue.java:86)
at org.apache.lucene.index.SegmentMerger.mergeTermInfos(SegmentMerger.java:263)
at org.apache.lucene.index.SegmentMerger.mergeTerms(SegmentMerger.java:236)
at org.apache.lucene.index.SegmentMerger.merge(SegmentMerger.java:89)
at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:681)
at org.apache.lucene.index.IndexWriter.mergeSegments(IndexWriter.java:658)
at org.apache.lucene.index.IndexWriter.maybeMergeSegments(IndexWriter.java:646)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:453)
at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:436)
at dacapo.luindex.LuindexHarness.indexDocs(LuindexHarness.java:122)
at dacapo.luindex.LuindexHarness.indexDocs(LuindexHarness.java:116)
at dacapo.luindex.LuindexHarness.indexDocs(LuindexHarness.java:116)
at dacapo.luindex.LuindexHarness.iterate(LuindexHarness.java:82)
at dacapo.Benchmark.run(Benchmark.java:126)
at dacapo.TestHarness.runBenchmark(TestHarness.java:302)
at dacapo.TestHarness.main(TestHarness.java:242)
at Harness.main(Harness.java:5)

The bug was exposed by the fix for but isn't caused by it. With the attached advice files, the bug occurs even before was fixed.

Environment

IA32 multi-core machines (tested on Linux only). Bug doesn't seem to occur on PPC (tested only with AOS advice for the Immix config). Affected configurations: configs with garbage collectors that do not use write barriers. The reverse is also true: configs that do use write barriers are unaffected. Exception: bug occours on FullAdaptivePoisoned (see sanity.25178).

Status

Assignee

Erik Brangs

Reporter

Erik Brangs

Labels

None

Fix versions

Affects versions

Priority

Medium
Configure