-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[REG 2.46.0 -> 2.47.0] Git hangs on fetch #5199
Comments
To make this example a little more complete, could you describe from where you are fetching? Is it github.com, a self-hosted |
It's a hosted gerrit 3.8 server. The fetch is small, took a few seconds after I downgraded to 2.46. I can try to disable sideband tomorrow. |
Latest update: Now it clones okay... without any local env modification... Okay again it just happened. I tried to clone my https://github.com/jfcherng/copilot-node-server . It seems to alway hang if I clone Update: It still hangs with
It just hangs on
|
Ah right, my case was ssh too. |
We are having this same problem with SSH on multiple machines that upgraded to the latest 2.47.0. All clones over 1mb from Gitlab are failing, the Git window just freezes at random points. |
Does it work if you copy the |
In my case, no. |
How about copying over |
Yes, that's the culprit. I tried in a fresh portable build. No need to replace |
I feared as much. There is a rather big jump in the MSYS2 runtime upgrade between Git for Windows v2.46.2 and v2.47.0. And MSYS2 runtime issues are notoriously hard to fix. You wouldn't happen to have a good reproducer that other people might be able to use, would you? I am afraid that |
A git pull from a azure repo consistently hung for me today until i reverted to 2.46.2
the trace suggests it can collect branches/tags and such before it hangs `> git pull nothing after this` |
I'm having the same issue too with the move from
I am working with my organization's GitLab repo over ssh. |
I was able to reproduce the failing clones and have a workaround:
or
This configures Git to use the SSH agent built into Windows instead of the OpenSSL-based one provided by MSYS2. |
Same here. @derrickstolee Solution helped 👆 |
Can Confirm this might be related to the |
I can confirm, I thought it was specific to my repo only, but using an example provided at https://github-debug.com/ GIT_TRACE=1 GIT_TRANSFER_TRACE=1 GIT_CURL_VERBOSE=1 git clone [email protected]:github/debug-repo /tmp/debug-repo-ssh causes the SSH connection to freeze Tip The possible workaround is to temporarily switch from git remote set-url origin 'https://<repo-url>' |
After installing Git-2.47.0-64-bit.exe the git commands clone and fetch also hang on my machine. Here is an example of this problem:
Now nothing happens anymore.
Here comes the System Info section of the text file generated by the command git bugreport:
After executing the setup file Git-2.46.2-64-bit.exe and accepting the downgrade warning the command git clone worked well again:
|
Its an issue with the latest MYSYS2 update they did |
If it helps, here are more configuration details of my machine:
If I use the HTTPS URL instead of the SSH URL to clone the repository, then the command git clone even works with the new version 2.47.0.windows.1. |
After update to 2.47 I get the same issue when trying to use git clone using ssh. It hangs indefinatelly and i have to terminate the command using ctrl+c resulting in "unexpected disconnect while reading sideband packet". After rolling back to 2.46 it works fine. |
For reference, I came across this issue from mutagen-io/mutagen#511 : I don't know what kind of reproduction project you need, but our use case is just a virtualbox VM and trying to sync something with mutagen |
I can reproduce the issue, and am bisecting now. Experience suggests that it might take a couple of days to get to the bottom of this, so please have patience. |
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]>
Okay, I have a fix in hand: It seems to be a regression in Cygwin v3.5.3, and while I am not completely happy about the extent to which I understand what is going wrong, it seems safe enough to revert to the working behavior (even if it should not completely reflect how Linux would behave in the same situation). Y'all, could I ask you to download the |
That |
Works for me. Thank you very much! Did you report the issue to cygwin? |
Awesome!
Not yet, I first wanted to be sure that I have something that works not only for me, but for all others, too. |
Oh my god, had I just found this. Nearly lost a day since I've recently reinstalled windows 11 (24H2) latest build whatsoever and git v2.47.0.windows.1. Couldn't for life clone a repository with using git clone when using a ssh url. Now I've downgraded for now, but the tips above are also helpful. Thanks. |
/add relnote bug A regression where clones, fetches and pushes via SSH would dead-lock was fixed. The workflow run was started |
A [regression](git-for-windows/git#5199) where clones, fetches and pushes via SSH would dead-lock was fixed. Signed-off-by: gitforwindowshelper[bot] <[email protected]>
FYI: I also ran into this issue and fixed it with this patch:
I also emailed Corinna Vinschen about the issue along with this patch. |
Maybe redundant but I also confirm that the fix works on my end too. Thank you. |
I'm not particularly familiar with Cygwin development, so I'm not sure that I have reported the issue "correctly", i.e. I haven't had any response to my email from over 2 weeks ago, so it's probably worth reporting this issue "properly". Sorry, I didn't mention this issue earlier on GFW. I don't use the "official" GFW release but have my own UCRT64 based build with "mainline" MSYS2, so hit this issue a bit earlier after the MSYS2 runtime updated to 3.5.4. |
Given that I cannot find the patch in https://inbox.sourceware.org/cygwin-patches/?q=WriteQuotaAvailable nor in https://inbox.sourceware.org/cygwin/?q=WriteQuotaAvailable, I suspect that you sent this as a private mail (which is a pretty big no-no in open source)? The lack of response might be due to a vacation, which is even more reason not to send patches a private emails to maintainers. |
Please note that there is now a snapshot with the fix, as I am planning on holding off from releasing a new Git for Windows version because I anticipate a Git v2.47.1 to be released soon, with even more bug fixes. |
In my machine, I fixed it using msys-2.0.dll from GitKraken then copy & replace it to Git usr\bin folder. |
I'm running into this issue as well, I downgraded it to version 2.45.2 |
@kun2001github I would strongly suggest to upgrade to the latest snapshot instead. |
I can confirm that the snapshot from friday fixes the issue. |
FYI, I upgraded to the snapshot and the original issue is gone, but it still didn't get to work fully, it failed at the end and got back
Downgrading to 2.46.0 fixed the issue. It's possible that this is something from my end though. |
@radnvlad since yours is the only report where the issue is not fixed by the snapshot, you are likely hitting a different bug. Please open a separate issue for that, providing ample amounts of information about your specific scenario. It would also be good if you could bisect through the snapshots (always replacing the For all other readers stumbling over this here issue: please upgrade to the latest snapshot. |
Setup
defaults?
Details
Git Bash
Minimal, Complete, and Verifiable example
this will help us understand the issue.
It should be done successfully after a while.
It sometimes hangs. I see the following spawned process, which doesn't use any CPU, and doesn't terminate:
The output is:
The text was updated successfully, but these errors were encountered: