Skip to content

ci(nightly): resolve tree-borrows termination and improve nightly stability#479

Open
sgalkin wants to merge 24 commits into
mainfrom
u/sgalkin/nightly
Open

ci(nightly): resolve tree-borrows termination and improve nightly stability#479
sgalkin wants to merge 24 commits into
mainfrom
u/sgalkin/nightly

Conversation

@sgalkin
Copy link
Copy Markdown

@sgalkin sgalkin commented Jun 5, 2026

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

  • .miri-tree-borrows-skip - suppression file for tests that exhaust runner memory under tree-borrows. One test path per line, # comments for justification. The job reads it, builds --skip args, and emits a ::warning summary. Suppressed tests pass on 32+ GB machines.
  • seed rotation - miri-race-coverage now runs 2 seeds/night based on day-of-month (covering 1–62 over a month) instead of all 32 every night.

Sergey Galkin and others added 21 commits June 4, 2026 09:50
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>
Copilot AI review requested due to automatic review settings June 5, 2026 10:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-skip suppression 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 --skip arguments for the miri-tree-borrows job.
  • Rotate miri-race-coverage seeds 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.

Comment thread .github/workflows/nightly.yml Outdated
Comment thread .github/workflows/nightly.yml Outdated
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (80bbf15) to head (1d15080).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread .github/workflows/nightly.yml Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 5, 2026 10:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread .github/workflows/nightly.yml Outdated
- 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>
Copilot AI review requested due to automatic review settings June 5, 2026 12:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

"--"
) + $skipFlags

cargo @cargoArgs
# Over a full month this covers seeds 1–62.
shell: pwsh
run: |
$seedBase = [int](Get-Date -Format 'dd')
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.

5 participants