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

[BUG] org.opensearch.script.expression.MoreExpressionIT.testSpecialValueVariable {p0={"search.concurrent_segment_search.enabled":"true"}} is flaky #10079

Closed
reta opened this issue Sep 15, 2023 · 3 comments · Fixed by #11088
Assignees
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run

Comments

@reta
Copy link
Collaborator

reta commented Sep 15, 2023

Describe the bug
The test case org.opensearch.script.expression.MoreExpressionIT.testSpecialValueVariable {p0={"search.concurrent_segment_search.enabled":"true"}} is flaky:

org.opensearch.script.expression.MoreExpressionIT.testSpecialValueVariable {p0={"search.concurrent_segment_search.enabled":"true"}}

java.lang.AssertionError: expected:<15.0> but was:<30.0>
	at __randomizedtesting.SeedInfo.seed([F1394EDB559EDD27:B970EFC671A78493]:0)
	at org.junit.Assert.fail(Assert.java:89)
	at org.junit.Assert.failNotEquals(Assert.java:835)
	at org.junit.Assert.assertEquals(Assert.java:555)
	at org.junit.Assert.assertEquals(Assert.java:685)
	at org.opensearch.script.expression.MoreExpressionIT.testSpecialValueVariable(MoreExpressionIT.java:540)
	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
	at java.base/java.lang.reflect.Method.invoke(Method.java:578)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.invoke(RandomizedRunner.java:1750)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$8.evaluate(RandomizedRunner.java:938)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$9.evaluate(RandomizedRunner.java:974)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$10.evaluate(RandomizedRunner.java:988)
	at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
	at org.apache.lucene.tests.util.TestRuleSetupTeardownChained$1.evaluate(TestRuleSetupTeardownChained.java:48)
	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 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:368)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl.forkTimeoutingTask(ThreadLeakControl.java:817)
	at com.carrotsearch.randomizedtesting.ThreadLeakControl$3.evaluate(ThreadLeakControl.java:468)
	at com.carrotsearch.randomizedtesting.RandomizedRunner.runSingleTest(RandomizedRunner.java:947)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$5.evaluate(RandomizedRunner.java:832)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$6.evaluate(RandomizedRunner.java:883)
	at com.carrotsearch.randomizedtesting.RandomizedRunner$7.evaluate(RandomizedRunner.java:894)

To Reproduce

./gradlew ':modules:lang-expression:internalClusterTest' --tests "org.opensearch.script.expression.MoreExpressionIT" -Dtests.method="testSpecialValueVariable {p0={"search.concurrent_segment_search.enabled":"true"}}" -Dtests.seed=F1394EDB559EDD27

Expected behavior
Test must always pass

Plugins
Standard

Screenshots
If applicable, add screenshots to help explain your problem.

Host/Environment (please complete the following information):

  • CI

Additional context
https://build.ci.opensearch.org/job/gradle-check/25705

@reta reta added bug Something isn't working untriaged flaky-test Random test failure that succeeds on second run and removed untriaged labels Sep 15, 2023
@reta reta removed the untriaged label Sep 15, 2023
@reta
Copy link
Collaborator Author

reta commented Sep 15, 2023

CC @sohami @neetikasinghal fyi :(

@andrross
Copy link
Member

andrross commented Oct 5, 2023

I can get this to fail deterministically with the following:

./gradlew ':modules:lang-expression:internalClusterTest' --tests 'org.opensearch.script.expression.MoreExpressionIT' -Dtests.seed=8D2B659F15124742

It only fails when concurrent search is enabled.

andrross added a commit to andrross/OpenSearch that referenced this issue Oct 5, 2023
Mute the test only for the concurrent search enabled case. See opensearch-project#10079.

Signed-off-by: Andrew Ross <[email protected]>
andrross added a commit to andrross/OpenSearch that referenced this issue Oct 5, 2023
Mute the test only for the concurrent search enabled case. See opensearch-project#10079.

Signed-off-by: Andrew Ross <[email protected]>
andrross added a commit to andrross/OpenSearch that referenced this issue Oct 10, 2023
Mute the test only for the concurrent search enabled case. See opensearch-project#10079.

Signed-off-by: Andrew Ross <[email protected]>
@jed326 jed326 assigned jed326 and unassigned jed326 Oct 10, 2023
@jed326
Copy link
Collaborator

jed326 commented Oct 10, 2023

I also see the test failing with the same reproduction see provided above but the curious thing is that this only happens when I run all the tests in the class. Whenever I specify only the testSpecialValueVariable class the tests pass.

dengjay@88665a3f24d4 OpenSearch % ./gradlew ':modules:lang-expression:internalClusterTest' --tests "org.opensearch.script.expression.MoreExpressionIT" -Dtests.method="testSpecialValueVariable" -Dtests.seed=8D2B659F15124742 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=en-NZ -Dtests.timezone=Atlantic/Reykjavik

> Configure project :
========================= WARNING =========================
         Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/4173
===========================================================
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.4
  OS Info               : Mac OS X 13.5.2 (x86_64)
  JDK Version           : 17 (Amazon Corretto JDK)
  JAVA_HOME             : /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
  Random Testing Seed   : 8D2B659F15124742
  In FIPS 140 mode      : false
=======================================

> Task :modules:lang-expression:compileInternalClusterTestJava
Note: /Users/dengjay/workplace/opensearch-project-dev/OpenSearch/modules/lang-expression/src/internalClusterTest/java/org/opensearch/script/expression/MoreExpressionIT.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/Users/dengjay/workplace/opensearch-project-dev/OpenSearch/test/framework/build/distributions/framework-3.0.0-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/Users/dengjay/.gradle/wrapper/dists/gradle-8.4-all/56r6xik2f6skrm47et0ibifug/gradle-8.4/lib/plugins/gradle-testing-base-8.4.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

BUILD SUCCESSFUL in 44s
56 actionable tasks: 2 executed, 54 up-to-date

Actually I still see the tests pass sometimes with the same seed 😕

dengjay@88665a3f24d4 OpenSearch % ./gradlew ':modules:lang-expression:internalClusterTest' --tests 'org.opensearch.script.expression.MoreExpressionIT' -Dtests.seed=8D2B659F15124742 

> Configure project :
========================= WARNING =========================
         Backwards compatibility tests are disabled!
See https://github.com/opensearch-project/OpenSearch/issues/4173
===========================================================
=======================================
OpenSearch Build Hamster says Hello!
  Gradle Version        : 8.4
  OS Info               : Mac OS X 13.5.2 (x86_64)
  JDK Version           : 17 (Amazon Corretto JDK)
  JAVA_HOME             : /Library/Java/JavaVirtualMachines/amazon-corretto-17.jdk/Contents/Home
  Random Testing Seed   : 8D2B659F15124742
  In FIPS 140 mode      : false
=======================================
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.opensearch.bootstrap.BootstrapForTesting (file:/Users/dengjay/workplace/opensearch-project-dev/OpenSearch/test/framework/build/distributions/framework-3.0.0-SNAPSHOT.jar)
WARNING: Please consider reporting this to the maintainers of org.opensearch.bootstrap.BootstrapForTesting
WARNING: System::setSecurityManager will be removed in a future release
WARNING: A terminally deprecated method in java.lang.System has been called
WARNING: System::setSecurityManager has been called by org.gradle.api.internal.tasks.testing.worker.TestWorker (file:/Users/dengjay/.gradle/wrapper/dists/gradle-8.4-all/56r6xik2f6skrm47et0ibifug/gradle-8.4/lib/plugins/gradle-testing-base-8.4.jar)
WARNING: Please consider reporting this to the maintainers of org.gradle.api.internal.tasks.testing.worker.TestWorker
WARNING: System::setSecurityManager will be removed in a future release

BUILD SUCCESSFUL in 3m 36s
56 actionable tasks: 1 executed, 55 up-to-date

dblock pushed a commit that referenced this issue Oct 10, 2023
Mute the test only for the concurrent search enabled case. See #10079.

Signed-off-by: Andrew Ross <[email protected]>
opensearch-trigger-bot bot pushed a commit that referenced this issue Oct 10, 2023
Mute the test only for the concurrent search enabled case. See #10079.

Signed-off-by: Andrew Ross <[email protected]>
(cherry picked from commit d3c8909)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dblock pushed a commit that referenced this issue Oct 11, 2023
Mute the test only for the concurrent search enabled case. See #10079.


(cherry picked from commit d3c8909)

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
deshsidd pushed a commit to deshsidd/OpenSearch that referenced this issue Oct 19, 2023
)

Mute the test only for the concurrent search enabled case. See opensearch-project#10079.

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Siddhant Deshmukh <[email protected]>
austintlee pushed a commit to austintlee/OpenSearch that referenced this issue Oct 23, 2023
)

Mute the test only for the concurrent search enabled case. See opensearch-project#10079.

Signed-off-by: Andrew Ross <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this issue Apr 25, 2024
)

Mute the test only for the concurrent search enabled case. See opensearch-project#10079.

Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants