Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ba6531f
chore(actions): reduce number of Miri seeds per nightly run
Jun 4, 2026
b9e3936
extend timeout for miri steps
Jun 4, 2026
7f81445
fixup! extend timeout for miri steps
Jun 4, 2026
21bf7f9
debug(miri): add OOM diagnostics to miri-tree-borrows job
Jun 4, 2026
c250b01
debug(miri): add cgroup and resource limit diagnostics
Jun 4, 2026
a3f294b
debug(miri): disable other jobs, focus on tree-borrows only
Jun 4, 2026
455f49a
debug(miri): use ubuntu-latest-8-cores runner (32 GB RAM)
Jun 4, 2026
f639431
debug(miri): isolate heavy crates to per-test Miri processes
Jun 4, 2026
8196c06
debug(miri): revert to ubuntu-latest runner
Jun 4, 2026
69b457d
debug(miri): fix isolation to use --lib only for per-test runs
Jun 4, 2026
d4feeb5
debug(miri): try ubuntu-latest-8-cores runner
Jun 4, 2026
55e7b60
debug(miri): skip OOM-inducing u16::MAX tests in tree-borrows
Jun 4, 2026
d2b9624
fix(miri): add configurable skip-tests input for tree-borrows job
Jun 4, 2026
d6b66bd
fix(miri): only skip the confirmed OOM test
Jun 4, 2026
d80a2a8
fix(miri): use full module path for skipped test
Jun 4, 2026
545cf65
fix(miri): use skip file for tree-borrows test exclusions
Jun 4, 2026
0a5bd32
fix(miri): skip try_alloc_uninit_slice_arc OOM test in tree-borrows
Jun 5, 2026
371261a
fix(miri): add suppression file for tree-borrows OOM tests
Jun 5, 2026
e15f3f0
docs(miri): document suppression file in nightly workflow
Jun 5, 2026
d3071b8
Merge branch 'sgalkin-microsoft/debug-miri-tree-borrows-oom' into u/s…
Jun 5, 2026
329d83f
docs(miri): document daily seed rotation in race-coverage job
Jun 5, 2026
5780666
Potential fix for pull request finding
sgalkin Jun 5, 2026
594dced
fix(miri): address PR review feedback
Jun 5, 2026
1d15080
Merge branch 'main' into u/sgalkin/nightly
sgalkin Jun 5, 2026
73d03a7
Potential fix for pull request finding
sgalkin Jun 5, 2026
a873ce2
Potential fix for pull request finding
sgalkin Jun 5, 2026
9ce2e03
Merge branch 'main' into u/sgalkin/nightly
sgalkin Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 54 additions & 3 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ jobs:
needs: [nightly-gatekeeper]
if: ${{ needs.nightly-gatekeeper.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
# Suppression file: .miri-tree-borrows-skip
#
# Miri's tree-borrows mode tracks per-byte aliasing provenance,
# which can cause certain tests to exceed the runner's 16 GB memory
# limit even though the allocations under test are small. Tests
# listed in .miri-tree-borrows-skip (one fully-qualified path per
# line, # comments for justification) are passed as --skip arguments
# and reported as a ::warning annotation at the end of the run.
# These tests are functionally correct and pass on 32+ GB machines.
steps:
# prep
- name: Checkout
Expand All @@ -70,7 +79,37 @@ jobs:
- name: Miri (tree borrows)
env:
MIRIFLAGS: -Zmiri-tree-borrows
run: cargo +${{ env.RUST_NIGHTLY }} miri test --all-features --workspace --lib --tests
shell: pwsh
run: |
# Build --skip arguments from the suppression file.
# See .miri-tree-borrows-skip for the list and justifications.
$skipArgs = @()
if (Test-Path .miri-tree-borrows-skip) {
$skipArgs = @(
Get-Content .miri-tree-borrows-skip |
ForEach-Object { ($_ -replace '#.*').Trim() } |
Where-Object { $_ -ne '' }
)
}

$skipFlags = @($skipArgs | ForEach-Object { "--skip"; $_ })
$cargoArgs = @(
"+${{ env.RUST_NIGHTLY }}"
"miri"; "test"
"--all-features"; "--workspace"; "--lib"; "--tests"
"--"
) + $skipFlags

cargo @cargoArgs
Comment thread
sgalkin marked this conversation as resolved.
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

# Report skipped tests clearly at the end
if ($skipArgs.Count -gt 0) {
Write-Host ""
Write-Host "::warning::$($skipArgs.Count) test(s) skipped via .miri-tree-borrows-skip (tree-borrows provenance tracking exceeds runner memory):"
$skipArgs | ForEach-Object { Write-Host " - $_" }
}
timeout-minutes: 240

miri-strict-provenance:
needs: [nightly-gatekeeper]
Expand All @@ -92,6 +131,7 @@ jobs:
env:
MIRIFLAGS: -Zmiri-strict-provenance
run: cargo +${{ env.RUST_NIGHTLY }} miri test --all-features --workspace --lib --tests
timeout-minutes: 240

miri-race-coverage:
needs: [nightly-gatekeeper]
Expand All @@ -108,11 +148,21 @@ jobs:
enable-sccache: true
rust-toolchain: RUST_NIGHTLY
rust-components: miri
- name: Setup Miri Flags
# Rotate seed pairs daily based on day-of-month (1–31) to spread
# coverage over time. -Zmiri-many-seeds uses an exclusive upper
# bound, so we add 1: day 1 → seeds 1..3 (runs 1,2), day 2 →
# seeds 3..5 (runs 3,4), …, day 31 → seeds 61..63 (runs 61,62).
# Over a full month this covers seeds 1–62.
shell: pwsh
run: |
$seedBase = [int](Get-Date -AsUtc -Format 'dd')
$seedLow = 2 * $seedBase - 1
$seedHigh = 2 * $seedBase + 1
"MIRIFLAGS=-Zmiri-many-seeds=${seedLow}..${seedHigh}" >> $env:GITHUB_ENV

# execute
- name: Miri (race coverage)
env:
MIRIFLAGS: -Zmiri-many-seeds=0..32
run: cargo +${{ env.RUST_NIGHTLY }} miri test --all-features --workspace --lib --tests
timeout-minutes: 720 # 12 hours, to accommodate the large number of seeds
Comment thread
sgalkin marked this conversation as resolved.

Expand Down Expand Up @@ -150,3 +200,4 @@ jobs:
--body "$ISSUE_BODY" \
--label "bug"
fi

27 changes: 27 additions & 0 deletions .miri-tree-borrows-skip
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Miri tree-borrows test suppression list
#
# Tests listed here are skipped during the `miri-tree-borrows` nightly
# CI job. Each entry is passed as a `--skip` argument to `cargo miri
# test` (substring match). Use fully-qualified test paths to avoid
# accidentally suppressing unrelated tests.
#
# These tests are functionally correct but exceed the 16 GB memory
# limit of the GitHub Actions runner due to Miri's tree-borrows
# per-byte provenance tracking. They pass locally on machines with
# 32+ GB RAM.
#
# To run all tests (e.g. on a larger runner), delete or empty this file.
#
# arena::tests::alloc_slice_local_with_or_panic_at_max_normal_uses_fast_path
# Although the allocation itself is only 4 KiB (512 u64s), the
# arena's bump-fit / drop-entry / protective-hold path involves
# many pointer reborrows into the 64 KiB pre-allocated chunk.
# Under tree-borrows the per-byte provenance tracking exceeds
# the 16 GB runner memory limit.
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
# Shared-chunk sibling of the above. The Arc-based allocation path
# with atomic refcounting creates additional provenance nodes under
# tree-borrows, also exceeding 16 GB.
arena::tests::try_alloc_uninit_slice_arc_at_max_normal_uses_fast_path
Loading