Title: fix: stop stalled remote commands when their timeout expires by Byron · Pull Request #2277 · gitpython-developers/GitPython · GitHub
Open Graph Title: fix: stop stalled remote commands when their timeout expires by Byron · Pull Request #2277 · gitpython-developers/GitPython
X Title: fix: stop stalled remote commands when their timeout expires by Byron · Pull Request #2277 · gitpython-developers/GitPython
Description: Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by Codex GPT-6. Created by Codex on behalf of Byron. Byron will review before this is ready to merge. Fixes #2276. Stalled fetch, pull, and push commands can deadlock when timeout cleanup closes stderr while its pump holds the buffered reader lock. Kill Git and its descendants before closing output streams, then reap the process. Reuse the command watchdog's process lookup, extending it to grandchildren (including Apple Git's HTTP helper launcher). Support both POSIX ps and Cygwin ps -ef when pgrep is unavailable. Both output streams share one deadline. Append timeout diagnostics to captured stderr for AutoInterrupt.wait() instead of synchronously re-entering callbacks, and preserve those errors in partial push results, including when Git exits successfully while a callback remains blocked. Skip process-tree signalling after the child exits. Ordinary cleanup keeps stdin EOF delivery, SIGTERM, and output closure before waiting, including buffered/broken input pipes. Update the public descendant limitations to match the implementation. The loopback regression covers all nine combinations of fetch/pull/push and git:///HTTP/HTTPS. All nine failed before the fix, returning only after the server's five-second safety release; all now pass with 0.5-second timeouts, including in Cygwin CI. Additional regressions cover buffered stdin, undrained output, blocked stdout/stderr callbacks, partial pushes, missing process lookup tools, and POSIX/Cygwin descendant parsing. Validation: All 50 CI checks pass on 30b741c, including Linux, macOS, Windows, Cygwin, Alpine, dependency compatibility, lint, types, tests, and documentation. Python 3.8 focused timeout and cleanup suite: 24 passed. Command, cleanup, and command-deprecation modules: 122 passed, 1 skipped before the final callback/parser additions; subsequent focused checks cover those changes. All nine loopback cases pass with pgrep disabled, exercising the POSIX ps fallback. Cygwin CI passed all nine stalled-remote cases and 1581 tests overall; its sole parser-fixture platform mismatch is corrected by explicitly selecting each modeled platform. Ruff lint/format, native and Windows-targeted mypy, basedpyright, and diff checks pass. Final Codex commit review found no actionable regressions. All six Copilot threads were addressed with regressions or documentation and resolved. Local TestRemote.test_base fails identically with the unchanged implementation due to a missing remote-tracking ref; this limitation was verified against the baseline. Git reference: local source baseline v2.56.0-rc1, especially transport-helper.c:get_helper() (inherited stderr), connect.c:git_connect() (SSH transport children), and run-command.c (descriptor handling and opt-in child cleanup). Runtime reproduction used Apple Git 2.54.0. Cygwin process format was checked against upstream winsup/utils/ps.cc. Process lookup is best-effort if tools are unavailable. Descendants that already detached or spawn after enumeration may escape signalling. Windows command timeouts remain unsupported.
Open Graph Description: Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by C...
X Description: Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by C...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/2277
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:8ac55b09-f2ba-41f4-d9c1-e3c340deaa4e |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B772:27E5CD:F84DA1:1405730:6B0100E7 |
| html-safe-nonce | a2d6989b2ddb396e011ee89f97a454043760c981663ab9431e9c6948032c20ec |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzcyOjI3RTVDRDpGODREQTE6MTQwNTczMDo2QjAxMDBFNyIsInZpc2l0b3JfaWQiOiI2ODUzNTM3ODU2NDI2NjcyMzU5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 067d2d9421e8377e67315e7b5b709bb0eb1553a683cd908a798466639da34ba1 |
| hovercard-subject-tag | pull_request:4770321272 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/2277/files |
| twitter:image | https://avatars.githubusercontent.com/u/63622?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/63622?s=400&v=4 |
| og:image:alt | Tasks This section is for Byron only. Models continuing this PR must not add, remove, check, uncheck, rename, or reorder checkboxes here. refackiew Everything below this line was generated by C... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width