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

[Backport 1.3] Bugfix to guard against stack overflow errors caused by very large reg-ex input #16101

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

opensearch-trigger-bot[bot]
Copy link
Contributor

@opensearch-trigger-bot opensearch-trigger-bot bot commented Sep 26, 2024

Backport 566ebfa from #2810.

This was backported to 1.x in #8663 but never made it to 1.3. Encountered in the wild today, 58 nodes dropped at once, whee!

…g-ex input (#2810)

* Bugfix to guard against stack overflow errors caused by very large reg-ex input

This change fixes a code path that did not properly impose the index-level max_regex_length limit. Therefore, it was possibly to provide ar arbitrarily large string as the include/exclude reg-ex value under search aggregations. This exposed the underlying node to crashes from a StackOverflowError, due to how the Lucene RegExp class processes strings using stack frames.

Signed-off-by: Kartik Ganesh <[email protected]>

* Adding integration tests for large string RegEx

Signed-off-by: Kartik Ganesh <[email protected]>

* Spotless

Signed-off-by: Kartik Ganesh <[email protected]>
(cherry picked from commit 566ebfa)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Copy link
Contributor

❌ Gradle check result for fabde0c: FAILURE

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

❌ Gradle check result for 653d12f: ABORTED

Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change?

Copy link
Contributor

✅ Gradle check result for f86d44e: SUCCESS

Signed-off-by: Daniel Widdis <[email protected]>
Copy link
Contributor

❕ Gradle check result for 7eca19d: UNSTABLE

  • TEST FAILURES:
      1 org.opensearch.index.ShardIndexingPressureSettingsIT.testShardIndexingPressureEnforcedEnabledDisabledSetting

Please review all flaky tests that succeeded after retry and create an issue if one does not already exist to track the flaky failure.

@dblock
Copy link
Member

dblock commented Sep 27, 2024

Gradle assemble is failing, do we need to backport something else to this branch @dbwiddis ?

@dbwiddis
Copy link
Member

dbwiddis commented Sep 28, 2024

Gradle assemble is failing, do we need to backport something else to this branch @dbwiddis ?

It's only failing on macOS. Apparently we don't have docker there (at least on 1.3?)

image

Interestingly, it showed able to merge before I added the changelog commit.

@dbwiddis
Copy link
Member

dbwiddis commented Sep 28, 2024

Ah, I see, the GHA doesn't like the changed name to macos-13:

        if: runner.os == 'macos'

EDIT: oops. that was matrix.os. runner.os is apparently macOS and is case sensitivve.

Copy link
Contributor

✅ Gradle check result for d6a157c: SUCCESS

@dbwiddis
Copy link
Member

Well, that didn't fix it. The action on main and 2.x looks completely different, 2.x even allows fail on error and says docker is unstable.

Copy link
Contributor

✅ Gradle check result for 7eca19d: SUCCESS

@dbwiddis
Copy link
Member

Thanks @reta for fixing the assemble workflow in #16222. I was just coming back to investigate that.

As @dblock has previously approved and all tests now pass, merging.

@dbwiddis dbwiddis merged commit 2428278 into 1.3 Oct 10, 2024
29 of 30 checks passed
@dbwiddis dbwiddis deleted the backport/backport-2810-to-1.3 branch October 10, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants