-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
git error: "fatal: BUG: disabling cancellation: Invalid argument" #3351
Comments
Reinstallation seemed to fix, but the problem reappeared and this time reinstallation doesn't fix. The problem is present even if the proxy configuration is deleted. |
Tracked upstream as git-for-windows/git#1481. |
The error message is different. Are you sure it's the same problem? |
Yes the error messages are related. Differences are only made by presence and absence of proxy and probably Git for Windows running in a slimmer MSYS2 environment. |
Same problem here with git version 2.16.2. pull, push, log all give the error message |
I can't repro. I don't know what happens at your end. |
Just found out that it works in cmd.exe if you have msys2.exe running but not using it. As soon as you close the msys2 shell - boom it does not work anymore. |
It seems the problem was solve upstream. Will there be a new package for msys2 available? I'm running 2.16.2 (64bit) and I'm still having the described problem. |
Same on me with MSYS2, git-2.17.0. I need to have msys2 or mingw64/32 windows open, or certain git commands (ie Very strange. |
@sroller, 2.17.0 is available but is not posted here for some reason. A more direct link would be: |
I note that the problem happens also with older |
Any news on this? This bug keeps nagging me even in git 2.18.0. The same constellation (my MSys2 installation is run from a USB drive) works with Windows 7 while it fails in Windows 10 (1709). |
In my case this was caused by a path to a different instance of msys64 preceding a path to the Git binaries in the PATH environment variable. Removing the path to msys64 fixed the problem. |
@dmytrol's solution fixed it for me, I removed the msys64 from PATH and after rebooting, git works again. |
dmytrol's solution DID NOT fix for me, as the path was right. In my case as henkman writes it works in cmd.exe if msys window is open (https://github.com/Alexpux/MINGW-packages/issues/3351#issuecomment-368065275). |
Hi All, Downgrading the version of git to 2.16.1 helps this issue, one can downgrade the Git version by downloading and installing the same in Windows. link;- https://github.com/git-for-windows/git/releases/tag/v2.16.1.windows.1 Regards, |
@wangxuesong29 |
@wangxuesong29 Hi! Once I read something about Windows 10 having problems with the relocation addresses of MSys2 executables. I followed the recipe, but it wouldn't work either. I'm still at loss... |
Still we have not isolated the root-cause of the issue, and why one installation affects the other. |
No double installation here, just MSys2's git... |
Just msys2 installation for me, and it doesn't work from any shell if msys2 shell is not open. But if I open a msys2 shell, it works even from every shell. |
I see the same behavior as @neclepsio.
otherwise. I'm on Windows 10, I use a proxy as well, and:
|
I have no clue about the underlying causes, but if it helps someone I was facing this issue (fatal: BUG disabling cancellation: Invalid argument when trying to run git branch --merged) and it was fixed by following @wangxuesong29's suggestion (ie: removing c:\msys64\usr\bin from path). Not sure what the consequences of this for other applications might be though... |
Are you sure there is no other git.exe in your path? |
I cannot guarantee that. I can only say that I was experiencing the fatal: BUG described above when trying to run git branch --merged and that it was fixed by removing c:\msys64\usr\bin from the path as per @wangxuesong29 suggestion |
No "double" git.exe here; however, in my MSys2 installation there's a hard link between /usr/bin/git.exe and /bin/git.exe, and there's a /mingw64/bin/git which calls /usr/bin/git. I renamed/copied/... several combinations but the error remains (other than in Windows 7) |
There's no |
Hm, I'm tempted to say "you're wrong" (as I do have a /bin and a /usr/bin directory), but may be this is the core of the problem. Here both directories are hardlinked. How would I get rid of this association? Just rm -rf /bin seems to be too dangerous... |
Addendum: /bin does not exist outside of MSys2 (e.g. using Windows Explorer), but is visible inside of mintty. |
According to the |
Interesting. Who would mount /bin to /usr/bin? Checked /etc/fstab => nope. |
Update: Found this in github/MSys2: Alexx83 - 2014-06-24 Now we remove mounting /usr to / in MSYS2. |
I think that's still done to keep high compatibility with Cygwin, which MSYS2 is based on. |
Any news on the original topic? |
The problem still exists when running
Curiously, if a msys2 shell ( |
Still cannot reproduce any problems with Git. I can use it just fine from both CMD and MSYS2 and MINGW shells. |
Is there a way I can produce more debugging information on this problem? |
I have deleted my old answer. Simple answer: There are two
|
Probably not.
I‘m using the identical portable installation from my USB drive on my Windows 7 (ok), my Windows 10 (ok), and my company Windows 10 (fails).
I guess - meanwhile - that the company one is heavily locked down (although I am a local admin) in terms of so-called „security features“. I‘ve already tried a lot but to no avail...
… On 6. Apr 2021, at 11:31, Maksim Beliaev ***@***.***> wrote:
hey guys,
once you install MSYS2 you automatically add env variable that points to bin of MSYS. After upgrade of git you may get your git installation in PATH env var be later in the list.
Once git is called in terminal, shell looks for executable in path and finds MSYS2 git first.
Just edit your environment variables the way, that first comes "git" and then "MSYS2"
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
This error happens also when I invoke git in emacs eshell:
|
Same issue: Win10 Windows Command Prompt, git pull and git clone fail in command prompt unless an instance of an MSYS shell is running. There is only one instance of git on this machine. Possibly relevant, Strawberry Perl and Miniconda are installed and in the path.
|
@rwreay otherwise install git for windows in parallel and ensure proper paths in env vars (see my previous message) |
Yes, you can. MSYS2 programs are like other Win32 programs, nothing special. But you have to make sure that the |
Thank you for providing a workaround. I use git in Emacs/magit. When a MingW64 window is open, git works fine also. |
This problem occurs when there is only msys2 directories in my path.
|
I'm having the same issue. Strangely, some of the git subcommands work if I redirect the output to a temporary file. For example: C:\tmp\repo>git log
BUG: run-command.c:519: disabling cancellation: Invalid argument
C:\tmp\repo>git log > test && type test
commit a78d08b9bdb401a5ddfb5bea97240af7c49e9795
Merge: 482afb59 fd82aa28
... |
In my case, just open msys2_shell.cmd previosly and it works :S |
I was also looking for solution, and what @sansalinas ^^^ proposed worked for me too, though I wanted to avoid the window being visible, and launched mintty (which seems to launch bash, and probably that made it working) - e.g. in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup (or per user in C:\Users[User Name]\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup) I've added a batch file that does this: |
Hey all, |
I moved However, the symptoms disappeared after updating to git-2.42.0. |
Since some updates, when I try to use
git pull
I get the errorfatal: BUG: disabling cancellation: Invalid argument
. I use a proxy.The text was updated successfully, but these errors were encountered: