Skip to content

Conversation

@sunt05
Copy link

@sunt05 sunt05 commented Dec 2, 2025

Summary

Fixes intermittent Operation too slow errors from MSYS2 pacman during Windows wheel builds, particularly affecting Python 3.12 UMEP variant builds.

Changes

  • Added 3-attempt retry loop with 15-second delays between attempts
  • Added --disable-download-timeout flag to prevent libcurl speed checks from triggering

This addresses the common issue where overloaded MSYS2 mirrors or GitHub runner network conditions cause pacman to fail when download speeds temporarily fall below the 1 byte/sec threshold.

Test Plan

  • Windows build with Python 3.12 succeeds on next run
  • UMEP variant build on Windows completes without timeout errors
  • Subsequent runs verify retry logic handles transient failures

🤖 Generated with Claude Code

@sunt05 sunt05 force-pushed the sunt05/fix-msys2-download-timeout branch from 3013368 to d5d6b91 Compare December 3, 2025 12:00
sunt05 and others added 3 commits December 3, 2025 12:34
…builds

MSYS2 mirrors can be slow or overloaded, causing pacman to fail with "Operation too slow" errors during cibuildwheel builds on Windows runners. This fix adds:
- 3-attempt retry loop with 15-second delays between attempts
- --disable-download-timeout flag to prevent libcurl's speed check from triggering

Resolves intermittent Windows build failures on win-cp312 (especially in UMEP variant builds).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
When pacman upgrades core packages (pacman, msys2-runtime), MSYS2
terminates all running processes including the bash shell executing
the command. This causes the command to exit with code 1 even though
the upgrade succeeded.

Fix by running pacman -Syu twice in separate shell invocations:
- First run: ignore exit code (|| true) as shell may be terminated
- Second run: complete any remaining updates in fresh shell
- Package install: keep retry logic for network timeouts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
When MSYS2 upgrades core packages, it uses taskkill to forcibly
terminate all MSYS2 processes. This kills bash.exe before it can
execute any error handling (|| true). The solution is to catch the
error at the Windows shell level using (cmd || ver >nul), where
'ver >nul' always succeeds, allowing the command chain to continue.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@sunt05 sunt05 force-pushed the sunt05/fix-msys2-download-timeout branch from eacb895 to 07b9946 Compare December 3, 2025 12:34
@sunt05 sunt05 enabled auto-merge December 3, 2025 12:35
@sunt05 sunt05 added this pull request to the merge queue Dec 3, 2025
Merged via the queue into master with commit bb08cfd Dec 3, 2025
15 checks passed
@sunt05 sunt05 temporarily deployed to github-pages-preview December 3, 2025 13:36 — with GitHub Actions Inactive
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