ci(nightly): resolve tree-borrows termination and improve nightly stability#479
Open
sgalkin wants to merge 24 commits into
Open
ci(nightly): resolve tree-borrows termination and improve nightly stability#479sgalkin wants to merge 24 commits into
sgalkin wants to merge 24 commits into
Conversation
Add memory monitoring, exit code reporting, and dmesg OOM check to diagnose why the job terminates silently at ~9 minutes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Check memory.max, memory.swap.max, ulimits, swappiness, and cgroup OOM events to understand why the process is killed with free swap. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce MIRI_ISOLATED_CRATES setting for crates whose tests are run individually in separate Miri processes to avoid accumulating tree-borrows metadata beyond runner memory limits. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Integration tests are already separate binaries, so run them normally. Only lib tests need per-test isolation to avoid memory accumulation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
These two tests allocate u16::MAX-element slices whose per-byte tree-borrows provenance tracking exceeds the 16 GB runner limit. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add workflow_dispatch input 'miri-tree-borrows-skip' with defaults for tests that exceed the 16 GB runner memory under tree-borrows provenance tracking. Each skipped test has a comment explaining why. On scheduled runs the defaults apply automatically. Manual runs can override the skip list or clear it to run all tests. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace workflow_dispatch input with .miri-tree-borrows-skip file. One test name per line, # comments for justification. The workflow reads the file and builds --skip arguments automatically. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add .miri-tree-borrows-skip — a line-oriented suppression file for tests that exceed the 16 GB GitHub Actions runner memory limit under Miri's tree-borrows per-byte provenance tracking. The file supports comments (#) for per-test justifications. The miri-tree-borrows job reads the file, builds --skip arguments, and emits a ::warning annotation summarizing skipped tests at the end of the run. All other nightly jobs are restored. Suppressed tests: - arena::tests::alloc_slice_local_with_or_panic_at_max_normal_uses_fast_path - arena::tests::try_alloc_uninit_slice_arc_at_max_normal_uses_fast_path Both tests are functionally correct and pass on 32+ GB machines. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…galkin/nightly # Conflicts: # .github/workflows/nightly.yml
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR improves nightly CI reliability for Miri by avoiding known tree-borrows OOM cases on GitHub-hosted runners and reducing the runtime/memory cost of race-coverage seed exploration.
Changes:
- Add a
.miri-tree-borrows-skipsuppression list to skip specific tests that exhaust runner memory under tree-borrows mode and emit a warning summary. - Update the nightly workflow to read the suppression list and apply
--skiparguments for themiri-tree-borrowsjob. - Rotate
miri-race-coverageseeds daily to run two seeds per night (spreading coverage across the month) instead of running all seeds every night.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.miri-tree-borrows-skip |
Adds documented suppression entries for tree-borrows OOM-prone tests on GitHub-hosted runners. |
.github/workflows/nightly.yml |
Implements suppression-driven --skip args for tree-borrows and introduces daily seed-pair rotation for race coverage. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
martin-kolinek
approved these changes
Jun 5, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #479 +/- ##
=======================================
Coverage 100.0% 100.0%
=======================================
Files 335 335
Lines 25586 25586
=======================================
Hits 25586 25586 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Vaiz
reviewed
Jun 5, 2026
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Rewrite skip-file parsing and seed rotation in pwsh for readability - Use array splatting for cargo args (avoids fragile backtick continuation) - Wrap pipeline results in @() to handle single-item/empty edge cases - Fix exclusive upper bound in seed rotation (add 1 to run 2 seeds) - Fix octal day-of-month issue (pwsh [int] cast avoids this) - Trim all whitespace in skip file (not just spaces) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
martintmk
approved these changes
Jun 5, 2026
| "--" | ||
| ) + $skipFlags | ||
|
|
||
| cargo @cargoArgs |
| # Over a full month this covers seeds 1–62. | ||
| shell: pwsh | ||
| run: | | ||
| $seedBase = [int](Get-Date -Format 'dd') |
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.
The miri-tree-borrows job was silently canceled at ~9 minutes with no Miri diagnostics. Investigation showed the GitHub Actions runner agent terminates the step when memory pressure exhausts the 16 GB RAM + 3 GB swap. Root cause: tree-borrows per-byte provenance tracking causes certain arena tests to exhaust runner memory even for small allocations (e.g. 4 KiB), due to heavy pointer reborrowing in the bump-fit path.
Changes