Fix SSH hangs#75
Merged
dscho merged 1 commit intogit-for-windows:mainfrom Oct 10, 2024
Merged
Conversation
It was reported in git-for-windows/git#5199 that as of v3.5.4, cloning or fetching via SSH is hanging indefinitely. Bisecting the problem points to 555afcb (Cygwin: select: set pipe writable only if PIPE_BUF bytes left, 2024-08-18). That commit's intention seems to look at the write buffer, and only report the pipe as writable if there are more than one page (4kB) available. However, the number that is looked up is the number of bytes that are already in the buffer, ready to be read, and further analysis shows that in the scenario described in the report, the number of available bytes is substantially below `PIPE_BUF`, but as long as they are not handled, there is apparently a dead-lock. Since the old logic worked, and the new logic causes a dead-lock, let's essentially revert 555afcb (Cygwin: select: set pipe writable only if PIPE_BUF bytes left, 2024-08-18). Note: This is not a straight revert, as the code in question has been modified subsequently, and trying to revert the original commit would cause merge conflicts. Therefore, the diff looks very different from the reverse diff of the commit whose logic is reverted. Signed-off-by: Johannes Schindelin <[email protected]>
1 task
derrickstolee
approved these changes
Oct 10, 2024
Member
Author
|
/open pr The workflow run was started |
|
Can we have some integration tests for this, please? |
Member
Author
Yes, as soon as you write them, test them, and open a PR. |
dscho
added a commit
to git-for-windows/git-for-windows-automation
that referenced
this pull request
Oct 10, 2024
Signed-off-by: Johannes Schindelin <[email protected]>
vszakats
added a commit
to curl/curl
that referenced
this pull request
Oct 23, 2024
Fix the significant perf regression for vcpkg jobs by switching to the MSYS2 shell environment from Git for Windows. This env is already used for old-mingw-w64 job that remained unaffected by this issue. The issue began with the windows-runner update 20241015.1.0. It bumped Git for Windows from Git 2.46.2.windows.1 to Git 2.47.0.windows.1. GfW bumped its MSYS2 components, including `msys-2.0.dll`. That's Cygwin code, which may have contributed to this. Pipes were involved and `runtests.pl` relies on pipes heavily in parallel mode. (The issue was not seen with parallel tests disabled, in retrospect.) This is useful as a permanent solution too. It drop GfW as a dependency and makes Windows jobs use one less shell/env flavour. Long term it might help to use native Windows Perl to avoid the MSYS layer completely, if there is a way to make that work. Assortment of possibly related links: https://cygwin.com/pipermail/cygwin/2024-August/256398.html cygwin/cygwin@f78009c cygwin/cygwin@7f3c225 actions/runner-images#10843 git-for-windows/git#5199 git-for-windows/msys2-runtime#75 git-for-windows/msys2-runtime@7913a41 git-for-windows/msys2-runtime@555afcb cygwin/cygwin@1c5f4dc Follow-up to c33174d #15364 Follow-up to 1e03059 #15356 Closes #15380
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Dec 24, 2024
Fix SSH hangs
1 task
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Jan 26, 2025
Fix SSH hangs
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Jan 26, 2025
Fix SSH hangs
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Jan 26, 2025
Fix SSH hangs
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Jan 27, 2025
Fix SSH hangs
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Jan 28, 2025
Fix SSH hangs
dscho
added a commit
to dscho/msys2-runtime
that referenced
this pull request
Jan 30, 2025
Fix SSH hangs
pps83
pushed a commit
to pps83/curl
that referenced
this pull request
Apr 26, 2025
Fix the significant perf regression for vcpkg jobs by switching to the MSYS2 shell environment from Git for Windows. This env is already used for old-mingw-w64 job that remained unaffected by this issue. The issue began with the windows-runner update 20241015.1.0. It bumped Git for Windows from Git 2.46.2.windows.1 to Git 2.47.0.windows.1. GfW bumped its MSYS2 components, including `msys-2.0.dll`. That's Cygwin code, which may have contributed to this. Pipes were involved and `runtests.pl` relies on pipes heavily in parallel mode. (The issue was not seen with parallel tests disabled, in retrospect.) This is useful as a permanent solution too. It drop GfW as a dependency and makes Windows jobs use one less shell/env flavour. Long term it might help to use native Windows Perl to avoid the MSYS layer completely, if there is a way to make that work. Assortment of possibly related links: https://cygwin.com/pipermail/cygwin/2024-August/256398.html cygwin/cygwin@f78009c cygwin/cygwin@7f3c225 actions/runner-images#10843 git-for-windows/git#5199 git-for-windows/msys2-runtime#75 git-for-windows/msys2-runtime@7913a41 git-for-windows/msys2-runtime@555afcb cygwin/cygwin@1c5f4dc Follow-up to c33174d curl#15364 Follow-up to 1e03059 curl#15356 Closes curl#15380
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.
Since upgrading the MSYS2 runtime to v3.5.4, cloning or fetching via SSH is hanging indefinitely.
Bisecting the problem points to 555afcb (Cygwin: select: set pipe writable only if PIPE_BUF bytes left, 2024-08-18), which we hereby essentially revert.
This fixes git-for-windows/git#5199.