ci: speed up OOM tests with configurable memory limit#1623
Merged
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Set `SENTRY_TEST_OOM_LIMIT=4095` (MiB, just under 4GB to avoid 32-bit overflow) in CI to limit process memory via a Windows Job Object. Without this, the OOM loop exhausts all virtual memory including pagefile, which is slow due to disk I/O. With the limit, malloc fails fast without paging. NOTE: The limit only constrains user-mode allocations. It does not exhaust kernel pool memory like a real system-wide OOM would. Omit the environment variable to test real OOM behavior and regressions such as the original `OpenProcess` bug in the native backend. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a7cc1d3 to
66654de
Compare
Collaborator
Author
|
I suspect the newly added OOM tests are also responsible for occasional proxy test failures lately: This test runs after the native OOM tests. Maybe the system doesn't recover fast enough, and therefore fails to run mitmdump? https://github.com/getsentry/sentry-native/actions/runs/23899882603/job/69693579172 |
mujacica
approved these changes
Apr 2, 2026
tustanivsky
approved these changes
Apr 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Set
SENTRY_TEST_OOM_LIMIT=4095(MiB, just under 4GB to avoid 32-bit overflow) in CI to limit process memory via a Windows Job Object. Without this, the OOM loop exhausts all virtual memory including pagefile, which is slow due to disk I/O. With the limit, malloc fails fast without paging.Before,
test_native_oomandtest_crashpad_oomwere each taking 60-70s in the CI. With the limit, they take only a few seconds using cached builds from other tests. So, this saves about 2 minutes.NOTE: The limit only constrains user-mode allocations. It does not exhaust kernel pool memory like a real system-wide OOM would. Omit the environment variable to test real OOM behavior and regressions such as the original OOM-related
OpenProcessbug in the native backend.