ci: raise ASan test JVM heap to fix flaky nightly OOMs#640
Merged
Conversation
Nightly asan runs repeatedly OOM with "Java heap space" at the forkEvery(25) restart boundary. -Xmx512m was sized purely to avoid colliding with ASan's shadow-memory region, but ~1.9GB of address space actually separates the pinned heap base from that region.
Contributor
CI Test ResultsRun: #28939986738 | Commit:
Status Overview
Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled Summary: Total: 54 | Passed: 54 | Failed: 0 Updated: 2026-07-08 14:27:12 UTC |
The asan config now overrides -Xmx to 1024m; the test previously hardcoded 512m for all configs.
Replaces the per-config hardcoded heap size with a value read from RuntimeMXBean's input arguments, so the test doesn't need updating whenever a test task's -Xmx changes.
…Exception' Co-authored-by: Copilot Autofix powered by AI <223894421+github-code-quality[bot]@users.noreply.github.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 86ee933bbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Addresses PR review feedback: ASan configs append a config-specific -Xmx after the standard one, and HotSpot honors the last duplicate. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
🔄 Datadog auto-retried 1 job - 1 passed on retry 🔗 Commit SHA: d9456b3 | Docs | Datadog PR Page | Give us feedback! |
kaahos
approved these changes
Jul 8, 2026
kaahos
left a comment
Contributor
There was a problem hiding this comment.
looks good to me, thanks for the changes!
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.
What does this PR do?:
Raises the ASan test JVM's
-Xmxfrom 512m to 1024m.Motivation:
Nightly ASan runs have been flaky, repeatedly failing with
Java heap spaceright at theforkEvery(25)restart boundary (e.g. runs on 2026-07-01, 07-02, 07-03, 07-07, 07-08). The 512m ceiling was sized only to keep the JVM's heap below ASan's shadow-memory region (0x7fff7000), butHeapBaseMinAddress=0x4000000(64MB) leaves ~1.9GB of address space below that region — far more than 512m needs. Doubling the heap to 1024m still leaves comfortable headroom while giving the suite enough room to avoid OOMing on accumulated per-test allocations (JFR recordings, JMC object models) between forks.Additional Notes:
No functional/runtime code changes — this only adjusts test JVM args in the Gradle build-logic convention plugin.
How to test the change?:
Can't be unit tested directly; validated by confirming the change compiles (
./gradlew :build-logic:conventions:compileKotlin) and by observing the next several nightly ASan runs for the disappearance of theJava heap spacefailure.For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.Unsure? Have a question? Request a review!