MINGW-packages
MINGW-packages copied to clipboard
git error: "fatal: BUG: disabling cancellation: Invalid argument"
Since some updates, when I try to use git pull
I get the error fatal: BUG: disabling cancellation: Invalid argument
. I use a proxy.
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. The best we can do is go back to 2,16.1.1.
Same problem here with git version 2.16.2. pull, push, log all give the error message "fatal: BUG: disabling cancellation: Invalid argument". If I use the msys2.exe shell they work but in cmd.exe the error message occurs
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. So there is some interprocess communication involved with either bash.exe or mintty.exe
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.
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.
Same on me with MSYS2, git-2.17.0. I need to have msys2 or mingw64/32 windows open, or certain git commands (ie git log
, diff
) fail with the above error. But git --version
or git status
add
run fine.
Very strange.
@sroller, 2.17.0 is available but is not posted here for some reason. A more direct link would be: https://github.com/git-for-windows/git/releases/latest.
I note that the problem happens also with older git version 2.15.0
.
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, Anujay
@wangxuesong29 Could you please detail on what you mean exactly?
@wangxuesong29
Hi! Unfortunately this doesn't work on my end... Also, please consider: a) Git works w/o problems on Windows 7 using the exact same configuration (USB drive). b) Adding an EXE to your PATH environment variable is useless (it's no path); the system will not honor it (lest your "msys2.exe" is a path... ;-).
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. git fetch
works if I have a Mintty Bash window open (MSYS2 or Ming2-w64 64bit), and fails with
> git fetch
BUG: run-command.c:519: disabling cancellation: Invalid argument
otherwise. I'm on Windows 10, I use a proxy as well, and:
> git --version
git version 2.24.0
> which git
/usr/bin/git
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?
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)
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 /bin
directory in MSYS2.
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 mount
command, /bin
is mounted from /usr/bin
so doing the rm -rf /bin
would kill your MSYS2 environment, except for bash.exe
, mintty.exe
, rm.exe
and several dlls.