Skip to content

fix: increase copy pool stack size to avoid Windows overflow - #1911

Merged
max-sixty merged 1 commit into
mainfrom
fix/ci-23987711021
Apr 4, 2026
Merged

max-sixty merged 1 commit into
mainfrom
fix/ci-23987711021

Conversation

@worktrunk-bot

Copy link
Copy Markdown
Collaborator

Problem

CI on main failed on Windows with a stack overflow in
test_copy_ignored_many_directories_no_emfile:

thread '<unknown>' (2316) has overflowed its stack

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_copy work over
200 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_size on COPY_POOL so behaviour is
consistent 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_emfile passes locally (Linux).
  • Full Windows CI re-run will exercise the large-scale concurrent copy path.

Automated fix for failed run

🤖 Generated with Claude Code

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]>
@max-sixty
max-sixty merged commit e0dcb2e into main Apr 4, 2026
22 checks passed
@max-sixty
max-sixty deleted the fix/ci-23987711021 branch April 4, 2026 21:44
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.

2 participants