Skip to content

[CI] RangeFieldTypeTests testFromLargerToErrors failing #86508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iverase opened this issue May 6, 2022 · 5 comments
Closed

[CI] RangeFieldTypeTests testFromLargerToErrors failing #86508

iverase opened this issue May 6, 2022 · 5 comments
Assignees
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team >test-failure Triaged test failures from CI

Comments

@iverase
Copy link
Contributor

iverase commented May 6, 2022

Build scan:
https://gradle-enterprise.elastic.co/s/eaaph6dawki4q/tests/:server:test/org.elasticsearch.index.mapper.RangeFieldTypeTests/testFromLargerToErrors

Reproduction line:
./gradlew ':server:test' --tests "org.elasticsearch.index.mapper.RangeFieldTypeTests.testFromLargerToErrors" -Dtests.seed=E2361E3759000175 -Dtests.locale=pt-BR -Dtests.timezone=Asia/Qostanay -Druntime.java=17

Applicable branches:
master, 8.2

Reproduces locally?:
Yes

Failure history:
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.index.mapper.RangeFieldTypeTests&tests.test=testFromLargerToErrors

Failure excerpt:

junit.framework.AssertionFailedError: Expected exception IllegalArgumentException but no exception was thrown

  at __randomizedtesting.SeedInfo.seed([E2361E3759000175:3C75BF82E98A3FE8]:0)
  at org.apache.lucene.tests.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2898)
  at org.apache.lucene.tests.util.LuceneTestCase.expectThrows(LuceneTestCase.java:2884)
  at org.elasticsearch.index.mapper.RangeFieldTypeTests.testFromLargerToErrors(RangeFieldTypeTests.java:194)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethodAccessorImpl.java:-2)
  at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
  at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:568)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1758)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:946)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:982)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:996)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:44)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleThreadAndTestName$1.evaluate(TestRuleThreadAndTestName.java:45)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:824)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:475)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:955)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:840)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:891)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:902)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleStoreClassName$1.evaluate(TestRuleStoreClassName.java:38)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.NoShadowingOrOverridesOnMethodsRule$1.evaluate(NoShadowingOrOverridesOnMethodsRule.java:40)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at org.apache.lucene.tests.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:53)
  at org.apache.lucene.tests.util.AbstractBeforeAfterRule$1.evaluate(AbstractBeforeAfterRule.java:43)
  at org.apache.lucene.tests.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:44)
  at org.apache.lucene.tests.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:60)
  at org.apache.lucene.tests.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:47)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:375)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:831)
  at java.lang.Thread.run(Thread.java:833)

@iverase iverase added :Search/Search Search-related issues that do not fall into other categories >test-failure Triaged test failures from CI labels May 6, 2022
@elasticmachine elasticmachine added the Team:Search Meta label for search team label May 6, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

@cbuescher cbuescher self-assigned this May 6, 2022
@cbuescher
Copy link
Member

This seems to be a rounding issue with dates. The particular seed failing uses a DATE range with
from: "1970-01-06T09:49:02.001Z", and to: "1970-01-06T09:49:02Z". This should lead to an exception in the test because to<from but in this case the "to" value somehow gets rounded up to the next second, so when comparing the long values we compare low = 467342001 with high = 467342999 in RangeType.rangeQuery().
I have to dif what recent changes might be causing this. It shouldn't happen all the time but for more dates than just for this seed.

@cbuescher
Copy link
Member

The test seems to fail for all dates with ".001" milliseconds in the "from" field. In the test we substract 1ms to provoke an excetion, but instead of having a "to" value one ms less than "from" the round to the next second. This reproduces for other values as well.
I tried running this on 7.17 now and the same setup seems to pass there, so I assume we changed something more recently along the 8.x line. Also this is very likely the same source of error as #86284 so I'm thinking about treating this issue as a duplicate although it happens in another test method.

@cbuescher
Copy link
Member

I think the same test passes on 7.17 but starts failing on 8.0. There are similar looking failures going back to December like this https://gradle-enterprise.elastic.co/s/p4id2plkhkcua/console-log?task=:server:test
I think this happens rarely in test because the randomization needs to pick the DATE type and the "from" value needs to be exactly 1ms into the next second for this to break.

@cbuescher
Copy link
Member

After some more analysis I'm closing this as a duplicate of #86284 where I left a few more reproduction details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team >test-failure Triaged test failures from CI
Projects
None yet
Development

No branches or pull requests

3 participants