Repository navigation
fix: increase copy pool stack size to avoid Windows overflow - #1911
Merged
Merged
Conversation
Windows's default thread stack (~2 MiB) is smaller than the 8 MiB used on Linux/macOS. Under concurrent reflink/copy work the rayon workers in COPY_POOL can overflow, which surfaced as a stack overflow in `test_copy_ignored_many_directories_no_emfile` on Windows CI. Explicitly set an 8 MiB stack on the pool so behaviour is consistent across platforms. Co-Authored-By: Claude <[email protected]>
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.
Problem
CI on
mainfailed on Windows with a stack overflow intest_copy_ignored_many_directories_no_emfile:The rayon worker in the copy thread pool inherits the platform default
stack size. On Linux/macOS this is ~8 MiB, but on Windows it is only
~2 MiB, which is not enough for concurrent
reflink_or_copywork over200 directories of ignored files.
The failing run (23987711021) sits on a commit (#1910) that doesn't
touch the copy path — this is a latent Windows-specific issue in the
dedicated copy pool introduced in #1905.
Solution
Set an explicit 8 MiB
stack_sizeonCOPY_POOLso behaviour isconsistent across platforms. This matches the Unix default and is a
narrow, targeted fix at the place the problem is — the rayon pool used
exclusively for
copy_dir_recursive.Testing
cargo test --test integration test_copy_ignored_many_directories_no_emfilepasses locally (Linux).Automated fix for failed run
🤖 Generated with Claude Code