Git: Git bash stopped working after a Windows 10 update (return of fork error).

Created on 7 Aug 2019  路  15Comments  路  Source: git-for-windows/git

  • [ ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?
$ git --version --build-options

** git version 2.19.1.windows.1
cpu: x86_64
built from commit: 11a3092e18f2201acd53e45aaa006f1601b6c02a
sizeof-long: 4
sizeof-size_t: 8 **
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

** Microsoft Windows [vers茫o 10.0.17763.615] **
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

** Editor Option: VIM
Custom Editor Path: 
Path Option: BashOnly
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Disabled
Enable Builtin Rebase: Disabled
Enable Builtin Stash: Disabled **
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

* An automatic Windows update took place yesterday. Before that, Git bash was working just fine. *

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

* CMD *

** Right-click on a repository directory, then "Git bash here" (the command /usr/bin/bash --login -i appears as the window title) **
  • What did you expect to occur after running these commands?

* A working bash prompt. *

  • What actually happened instead?

* 11 [main] bash 1564 child_copy: stack write copy failed, 0xFFFFBEC0..0x100000000, done 0, windows pid 9020, Win32 error 5
1276 [main] bash 1564 fork: child 7644 - pid 7644, exitval 0x103, errno 11
bash: fork: retry: Resource temporarily unavailable
bash: fork: Resource temporarily unavailable
bash-4.4$ git --version --build-options
106456609 [main] bash 1564 child_copy: stack write copy failed, 0xFFFFC4C0..0x100000000, done 0, windows pid 9020, Win32 error 5
106457967 [main] bash 1564 fork: child 2064 - pid 2064, exitval 0x103, errno 11
bash: fork: retry: Resource temporarily unavailable
bash: fork: Resource temporarily unavailable
bash-4.4$
*

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

* It is not triggered by repositories. I can get the same error if I start git bash from any directory. *

  • Unworkable solutions tried based on previous research:

* Run the 64-bit version of CMD *
* Fix PATH env. variable *
* Replace msys-2.0.dll *

  • Solutions NOT tried due to corporate IT policy:

* Run as administrator *
* Disable anti-virus *
* Disable firewall *

  • Workaround that worked to some extent:

* Put every Git's binaries directories into PATH and run them in CMD directly instead of inside bash *

  • Other symptoms:

* After the same update, the programs (not only Git) are taking much longer to start. *

  • Speculation:

* Something is being attached to all Windows processes (Git included) that somehow is breaking/corrupting anything that relies on fork()-ing. *

  • Other related software that is installed:

* MSYS2: its bash prompt has the same error. pacman quits with GPG-related errors. pacman -S fails because it sees the repository as corrupted (can't check hashes).*

All 15 comments

git version 2.19.1.windows.1

Please upgrade, v2.22.0 is current.

I think it is related to how the proxy in the company's hardwired network works. While in WiFi or in some other network the programs work just fine. I need to do a few more tests to make sure.

git version 2.19.1.windows.1

Please upgrade, v2.22.0 is current.

Oh... my. I installed v2.23 (released yester day) now Git Bash does not even open! The console window closes immediately. How do I solve this disaster?

After a number of trials-and-errors, I managed to capture the message that briefly appears before the console window closes. I've never seen anything quite like that.

image

The "stack write copy failed" thing looks as if it _might_ be a DLL base address problem (which typically affects 32-bit systems, but I saw it very rarely even on 64-bit systems). Maybe following the advice to change the DLL base address manually helps? https://github.com/git-for-windows/git/wiki/32-bit-issues#adjusting-msys-20dlls-address-range-manually

Thanks for helping. I'm running on Windows 10 64-bit and installed the 64-bit installer. At least the installer is named Git-2.23.0-64-bit.exe. How was it possible to have 32-bit binaries getting in the way?

I tried to run the 1st step usr\bin\dash -c '/usr/bin/dash /usr/bin/rebaseall -p' as suggested and I got:
C:\Users\USER\Desktop\Git>usr\bin\dash -c '/usr/bin/dash /usr/bin/rebaseall -p' 1 [main] dash 1271 child_copy: stack write copy failed, 0xFFFFC3F0..0x100000000, done 0, windows pid 16356, Win32 error 5 22690 [main] dash 1271 dofork: child 1272 - pid 16300, exitval 0x103, errno 11 /usr/bin/rebaseall: 29: /usr/bin/rebaseall: Cannot fork

I confirm that it is something related to the network configuration. Maybe proxy- and/or SSH- related. When I connect to the corporate network via VPN or via hardwire, the problem occurs. When I connect at home, WiFi, cellphone 4G gateway, etc. Git works just fine. Weird!

I'd understand it whenever I do a git pull/push/fetch... but it is breaking Git entirely.

I take it as something that attaches to one of Git's inner machinations and causes the crash whenever I connect to the corporate network. Something that apparently took effect in a recent Windows 10 update.

Maybe it is some real-time anti-malware that prevents Git from working correctly?

Thanks for your concern, dscho, but that is unlikely (it's a corporate network with high security measures). But I think it happens just the opposite: something made to improve security in the network in corrupting the machinations (Cygwin, etc.) that make possible for Git to work in Windows. Something in those machinations uses the network for some reason and somehow something gets in the way.

I'm thinking of taking this to the IT guys, but this will certainly lead to a lengthy investigation with no solution soon.

Good luck! And please let us know how it goes.

Of course! I'm starting with the usual format-and-reinstall procedure to try to solve problems with Microsoft products.

After another Windows Update, the problem is apparently gone. I'll keep watching until making sure this issue can be closed. The MSYS2 console is still broken though. So I'm still unsure this can be considered solved.

This problem of mine with Git solved itself after a Windows Update. Figures.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sschlesier picture sschlesier  路  3Comments

drewnoakes picture drewnoakes  路  5Comments

educhana picture educhana  路  5Comments

JoshSchreuder picture JoshSchreuder  路  4Comments

Unknow0059 picture Unknow0059  路  3Comments