Skip to content

test(filesystem_store): widen open-file drain budget to de-flake asan - #68

Open
b7r6 wants to merge 2 commits into
mainfrom
fix/filesystem-test-drain-budget
Open

b7r6 wants to merge 2 commits into
mainfrom
fix/filesystem-test-drain-budget

Conversation

@b7r6

@b7r6 b7r6 commented Oct 15, 2026 •

Copy link
Copy Markdown
Owner

What and why

Fork validation PR for an upstream submission. wait_for_no_open_files in filesystem_store_test.rs polls a process-wide open-file counter with a 1 s budget. Under asan, handles opened by other tests in the same binary take longer than that to drain, so the helper times out with Timed out waiting all files to close even though every file does close. The budget is now 10 s. The loop still returns as soon as the count reaches zero, so a healthy run takes no longer.

How was this verified?

It's the flake that turned fork #65's asan lane red (upgraded_layout_is_not_migrated_again_on_restart). This PR's CI is the check.

Risk

Test-only: one timeout in filesystem_store_test.rs goes from 1 s to 10 s, and no production code changes. The cost is that a real open-file leak now takes up to 10 s to fail the test instead of 1 s.

AI assistance

Claude split this out of fork #48 and opened the PR under my direction.

@github-actions

This comment has been minimized.

Completes the no-per-PR-OCI-builds intent: image-off-pr moved image.yaml off
PRs and TraceMachina#2877 moved the nix integration job off PRs, but main.yaml's
integration-tests (docker-compose image build + run_integration_tests.sh)
fell between them and still ran on every PR. Defer to nightly + merge-to-main,
matching TraceMachina#2880's pattern. Fork-local until folded into the upstream OCI/nightly
set.
@b7r6
b7r6 force-pushed the fix/filesystem-test-drain-budget branch from e0246f4 to e4e7cf1 Compare October 21, 2026 17:39
`wait_for_no_open_files` polls a process-global open-handle counter, so it
drains handles from every test sharing the binary. Under asan the previous
1s ceiling was too tight and `upgraded_layout_is_not_migrated_again_on_restart`
intermittently failed with "Timed out waiting all files to close" even though
the handles did close. Raise the cap to 10s; the loop still returns the instant
the count hits zero, so healthy runs are unaffected.

This is a test-only timing fix.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
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.

1 participant