Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
New
Description
There seems to be a bug in SparseFixedBitDocIdSet's ramBytesUsed. To me this is a bit crazy implemented, so I have not yet found the issue. To me it looks like some of the summing up breaks if the alignment of the JVM is not 8:
[junit4] Suite: org.apache.lucene.util.TestSparseFixedBitDocIdSet [junit4] 2> NOTE: reproduce with: ant test -Dtestcase=TestSparseFixedBitDocIdSet -Dtests.method=testRamBytesUsed -Dtests.seed= C1F3B881CB1C5E8A -Dtests.locale=es_BO -Dtests.timezone=America/Detroit -Dtests.asserts=true -Dtests.file.encoding=ISO-8859-1 [junit4] FAILURE 0.06s J1 | TestSparseFixedBitDocIdSet.testRamBytesUsed <<< [junit4] > Throwable #1: java.lang.AssertionError: expected:<264> but was:<256> [junit4] > at __randomizedtesting.SeedInfo.seed([C1F3B881CB1C5E8A:3350AAC1016341DC]:0) [junit4] > at org.apache.lucene.util.BaseDocIdSetTestCase.testRamBytesUsed(BaseDocIdSetTestCase.java:104) [junit4] > at java.lang.Thread.run(Thread.java:745)
To reproduce this failure, run inside core (with 64 bits JVM):
ant test -Dtestcase=TestSparseFixedBitDocIdSet -Dtests.method=testRamBytesUsed -Dargs="-XX:ObjectAlignmentInBytes=16" -Dtests.seed=C1F3B881CB1C5E8A
The default works:
ant test -Dtestcase=TestSparseFixedBitDocIdSet -Dtests.method=testRamBytesUsed -Dargs="-XX:ObjectAlignmentInBytes=8" -Dtests.seed=C1F3B881CB1C5E8A
I think we should randomly also specify the ObjectAlignmentInBytes for test runs on Policeman Jenkins. Any Power of 2 is fine.