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

[Flaky Test] SnapshotResiliencyTests.testConcurrentSnapshotDeleteAndDeleteIndex if flaky #8771

Closed
mch2 opened this issue Jul 19, 2023 · 2 comments · Fixed by #12337
Closed
Assignees
Labels
bug Something isn't working flaky-test Random test failure that succeeds on second run Storage:Snapshots

Comments

@mch2
Copy link
Member

mch2 commented Jul 19, 2023

https://build.ci.opensearch.org/job/gradle-check/20332/

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.snapshots.SnapshotResiliencyTests.testConcurrentSnapshotDeleteAndDeleteIndex" -Dtests.seed=B7F15DFF786CE73D -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=es-NI -Dtests.timezone=Asia/Oral -Druntime.java=17
NOTE: leaving temporary files on disk at: /var/jenkins/workspace/gradle-check/search/server/build/testrun/test/temp/org.opensearch.snapshots.SnapshotResiliencyTests_B7F15DFF786CE73D-001
NOTE: test params are: codec=Asserting(Lucene95): {}, docValues:{}, maxPointsInLeafNode=330, maxMBSortInHeap=6.1702426242178525, sim=Asserting(RandomSimilarity(queryNorm=true): {}), locale=es-NI, timezone=Asia/Oral
NOTE: Linux 5.15.0-1036-aws amd64/Eclipse Adoptium 17.0.7 (64-bit)/cpus=96,threads=1,free=189188400,total=536870912
@dblock
Copy link
Member

dblock commented Oct 3, 2023

@reta reta changed the title [Flaky Test] SnapshotResiliencyTests.testConcurrentSnapshotDeleteAndDeleteIndex on merge to 2.x [Flaky Test] SnapshotResiliencyTests.testConcurrentSnapshotDeleteAndDeleteIndex if flaky Oct 27, 2023
@andrross
Copy link
Member

#12335 (comment):

REPRODUCE WITH: ./gradlew ':server:test' --tests "org.opensearch.snapshots.SnapshotResiliencyTests.testConcurrentSnapshotDeleteAndDeleteIndex" -Dtests.seed=E816C7242330BF50 -Dtests.security.manager=true -Dtests.jvm.argline="-XX:TieredStopAtLevel=1 -XX:ReservedCodeCacheSize=64m" -Dtests.locale=ms-MY -Dtests.timezone=Europe/Athens -Druntime.java=21

org.opensearch.snapshots.SnapshotResiliencyTests > testConcurrentSnapshotDeleteAndDeleteIndex FAILED
    java.lang.AssertionError: java.lang.StringIndexOutOfBoundsException: Range [13, 2) out of bounds for length 6
        at __randomizedtesting.SeedInfo.seed([E816C7242330BF50:BD5D3283E0ED3D1D]:0)
        at org.opensearch.repositories.blobstore.BlobStoreRepository.lambda$executeOneStaleIndexDelete$40(BlobStoreRepository.java:1709)
        at org.opensearch.action.ActionRunnable.lambda$supply$0(ActionRunnable.java:74)
        at org.opensearch.action.ActionRunnable$2.doRun(ActionRunnable.java:89)
        at org.opensearch.common.util.concurrent.AbstractRunnable.run(AbstractRunnable.java:52)
        at org.opensearch.cluster.coordination.AbstractCoordinatorTestCase$1.run(AbstractCoordinatorTestCase.java:1498)
        at org.opensearch.cluster.coordination.DeterministicTaskQueue.runTask(DeterministicTaskQueue.java:147)
        at org.opensearch.cluster.coordination.DeterministicTaskQueue.runRandomTask(DeterministicTaskQueue.java:141)
        at org.opensearch.cluster.coordination.DeterministicTaskQueue.runAllRunnableTasks(DeterministicTaskQueue.java:91)
        at org.opensearch.snapshots.SnapshotResiliencyTests.runUntil(SnapshotResiliencyTests.java:1613)
        at org.opensearch.snapshots.SnapshotResiliencyTests.verifyReposThenStopServices(SnapshotResiliencyTests.java:335)

        Caused by:
        java.lang.StringIndexOutOfBoundsException: Range [13, 2) out of bounds for length 6
            at java.****/jdk.internal.util.Preconditions$1.apply(Preconditions.java:55)
            at java.****/jdk.internal.util.Preconditions$1.apply(Preconditions.java:52)
            at java.****/jdk.internal.util.Preconditions$4.apply(Preconditions.java:213)
            at java.****/jdk.internal.util.Preconditions$4.apply(Preconditions.java:210)
            at java.****/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:98)
            at java.****/jdk.internal.util.Preconditions.outOfBoundsCheckFromToIndex(Preconditions.java:112)
            at java.****/jdk.internal.util.Preconditions.checkFromToIndex(Preconditions.java:349)
            at java.****/java.lang.String.checkBoundsBeginEnd(String.java:4865)
            at java.****/java.lang.String.substring(String.java:2834)
            at org.opensearch.repositories.blobstore.BlobStoreRepository.lambda$executeOneStaleIndexDelete$40(BlobStoreRepository.java:1658)
            ... 9 more

andrross added a commit to andrross/OpenSearch that referenced this issue Feb 15, 2024
Test failure opensearch-project#8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross added a commit to andrross/OpenSearch that referenced this issue Feb 15, 2024
Test failure opensearch-project#8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross added a commit that referenced this issue Feb 19, 2024
* Avoid string out of bounds error in snapshot delete

Test failure #8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>

* Extract common UUID parsing method

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Andrew Ross <andrross@amazon.com>
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Storage Project Board Feb 19, 2024
opensearch-trigger-bot bot pushed a commit that referenced this issue Feb 19, 2024
* Avoid string out of bounds error in snapshot delete

Test failure #8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>

* Extract common UUID parsing method

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit f86bfa8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
andrross pushed a commit that referenced this issue Feb 22, 2024
* Avoid string out of bounds error in snapshot delete

Test failure #8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>

* Extract common UUID parsing method

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Andrew Ross <andrross@amazon.com>
(cherry picked from commit f86bfa8)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peteralfonsi pushed a commit to peteralfonsi/OpenSearch that referenced this issue Mar 1, 2024
…ct#12337)

* Avoid string out of bounds error in snapshot delete

Test failure opensearch-project#8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>

* Extract common UUID parsing method

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Andrew Ross <andrross@amazon.com>
andrross pushed a commit that referenced this issue Mar 14, 2024
* Avoid string out of bounds error in snapshot delete

Test failure #8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.



* Extract common UUID parsing method



---------


(cherry picked from commit f86bfa8)

Signed-off-by: Andrew Ross <andrross@amazon.com>
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>
rayshrey pushed a commit to rayshrey/OpenSearch that referenced this issue Mar 18, 2024
…ct#12337)

* Avoid string out of bounds error in snapshot delete

Test failure opensearch-project#8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>

* Extract common UUID parsing method

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Andrew Ross <andrross@amazon.com>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this issue Apr 25, 2024
…ct#12337)

* Avoid string out of bounds error in snapshot delete

Test failure opensearch-project#8771 shows cases where certain random seeds trigger this
case. The bug is clear: the substring() call should happen after the
startsWith() check in case the blob name is shorter than the prefix
length being used as the start index of the substring call. I don't yet
know if/how this manifests in real deployments.

Signed-off-by: Andrew Ross <andrross@amazon.com>

* Extract common UUID parsing method

Signed-off-by: Andrew Ross <andrross@amazon.com>

---------

Signed-off-by: Andrew Ross <andrross@amazon.com>
Signed-off-by: Shivansh Arora <hishiv@amazon.com>
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 Storage:Snapshots
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

4 participants