Skip to content
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

[CI] AddTests testCrankyEvaluateBlockWithoutNullsFloating {TestCase=<far future date>, <random date period> null in 0} failing #107817

Closed
ldematte opened this issue Apr 24, 2024 · 4 comments · Fixed by #107968
Assignees
Labels
:Analytics/ES|QL AKA ESQL medium-risk An open issue or test failure that is a medium risk to future releases Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test-failure Triaged test failures from CI

Comments

@ldematte
Copy link
Contributor

Build scan:
https://gradle-enterprise.elastic.co/s/3wos7fwi53c4a/tests/:x-pack:plugin:esql:test/org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.AddTests/testCrankyEvaluateBlockWithoutNullsFloating%20%7BTestCase=%3Cfar%20future%20date%3E,%20%3Crandom%20date%20period%3E%20null%20in%200%7D

Reproduction line:

./gradlew ':x-pack:plugin:esql:test' --tests "org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.AddTests.testCrankyEvaluateBlockWithoutNullsFloating {TestCase=<far future date>, <random date period> null in 0}" -Dtests.seed=A25CCFE008A9C0B5 -Dtests.locale=es-BO -Dtests.timezone=Asia/Chita -Druntime.java=21

Applicable branches:
8.13

Reproduces locally?:
Didn't try

Failure history:
Failure dashboard for org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.AddTests#testCrankyEvaluateBlockWithoutNullsFloating {TestCase=<far future date>, <random date period> null in 0}

Failure excerpt:

java.lang.ArithmeticException: long overflow

  at __randomizedtesting.SeedInfo.seed([A25CCFE008A9C0B5:580AF8D8FCF199A1]:0)
  at java.lang.Math.multiplyExact(Math.java:1032)
  at java.lang.Math.multiplyExact(Math.java:1008)
  at java.time.Instant.toEpochMilli(Instant.java:1262)
  at org.elasticsearch.xpack.ql.type.DateUtils.asMillis(DateUtils.java:56)
  at org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.AddTests.lambda$parameters$6(AddTests.java:132)
  at org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier.lambda$testCaseSupplier$6(TestCaseSupplier.java:244)
  at org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier.get(TestCaseSupplier.java:81)
  at org.elasticsearch.xpack.esql.expression.function.AbstractFunctionTestCase.lambda$anyNullIsNull$5(AbstractFunctionTestCase.java:663)
  at org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier.get(TestCaseSupplier.java:81)
  at org.elasticsearch.xpack.esql.expression.function.TestCaseSupplier.get(TestCaseSupplier.java:53)
  at org.elasticsearch.xpack.esql.expression.predicate.operator.arithmetic.AddTests.<init>(AddTests.java:38)
  at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62)
  at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:486)
  at com.carrotsearch.randomizedtesting.RandomizedRunner$NewInstanceProvider.newInstance(RandomizedRunner.java:1588)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:941)
  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 org.junit.rules.RunRules.evaluate(RunRules.java:20)
  at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:390)
  at com.carrotsearch.randomizedtesting.ThreadLeakControl.lambda$forkTimeoutingTask$0(ThreadLeakControl.java:850)
  at java.lang.Thread.run(Thread.java:1583)

@ldematte ldematte added :Analytics/ES|QL AKA ESQL >test-failure Triaged test failures from CI labels Apr 24, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine elasticsearchmachine added blocker Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) labels Apr 24, 2024
@alex-spies alex-spies added medium-risk An open issue or test failure that is a medium risk to future releases and removed blocker labels Apr 24, 2024
@alex-spies
Copy link
Contributor

Since this applies to 8.13, where ESQL is still in tech preview, I think this is not a blocker.

@nik9000
Copy link
Member

nik9000 commented Apr 24, 2024

java.lang.ArithmeticException: long overflow

I imagine this is possible for any version. You do have to stick a far future date though. I don't think a blocker but would be nice to fix.

@nik9000
Copy link
Member

nik9000 commented Apr 26, 2024

The failing case is: +292278829-09-20T01:30:20.154Z + P769Y9M15D.

That's the year two hundred ninety two million, two hundred seventy eight thousand, eight hundred twenty nine plus seven hundred sixty nine - that happens to overflow a long containing millis since epoch. I'm checking if I can cause that to appear in main.

nik9000 added a commit to nik9000/elasticsearch that referenced this issue Apr 26, 2024
This updates our tests to handle the case where you are adding a
`TemporalAmount` to a date that is new `Long.MAX_VALUE`. It also adds a
test case that generates dates new that time just so we catch errors out
that way faster.

Closes elastic#107817
elasticsearchmachine pushed a commit that referenced this issue Apr 30, 2024
This updates our tests to handle the case where you are adding a
`TemporalAmount` to a date that is new `Long.MAX_VALUE`. It also adds a
test case that generates dates new that time just so we catch errors out
that way faster.

Closes #107817
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Analytics/ES|QL AKA ESQL medium-risk An open issue or test failure that is a medium risk to future releases Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) >test-failure Triaged test failures from CI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants