24

Having trouble starting Git Bash, not sure where in the stack my errors are occuring. Running Windows 10, Git Bash, ConEmu and Vagrant.

When I start Git Bash, either through ConEmu or the application directly, I receive the following message:

0 [main] bash 4696 fork: child 528 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes
1263234 [main] bash 4696 fork: child 684 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes
3519490 [main] bash 4696 fork: child 2020 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes
7764494 [main] bash 4696 fork: child 7064 - died waiting for dll loading, errno 11
bash: fork: retry: No child processes

I don't know enough about Git Bash (or bash, for that matter) to figure out what's going on and all the answers I can find are about Cygwin.

Nate Anderson
  • 777
  • 2
  • 7
  • 26

6 Answers6

23

Same issue happened with COMODO Firewall since last update.

  1. Adding Git folder to File Rating > File List as trusted file

  2. Adding Git folder to Advanced protection > Milanescious > Shell code exclusion

  3. Setting git-bash.exe as allowed application in Firewall > Application Rules (this one may be optional, but it won't hurt anyway)

Solved the issue on Windows 10.

Side note : Turning COMODO firewall off does not solve the issue, this is quite misleading... But adding exclusions rules does fix the problem.

Other side note: if you use Comodo Firewall, you should consider uninstalling it... It has bugged and ruined my windows install, i've got a lot of BSOD as soon as i removed it... When i think of it in hindsight, he was the root cause of a lot of problem. I mean, how in the world a Firewall could silently block an application or infinite sandboxing it without even a notification. Plus the removall is a pain in the ass, uninstaller crash one time out of two...

Anthony Raymond
  • 7,434
  • 6
  • 42
  • 59
  • 1
    That solves my problem. I did not have to add anything to Firewall, though. Anyway thanks for the answer. – Celdor Apr 13 '17 at 09:43
  • Nice :). I wasn't a 100% sure about the `Firewall > Application Rules`, since i tested a lot of thinks to get it work. – Anthony Raymond Apr 13 '17 at 12:08
  • Thank you, it also worked for me on Windows 7. On a site note, it made Git/SourceTree faster (I guess a sign that before that there was already some kind of conflict going on in the background). I still have a few error messages left, though (but they don't seem to cause any issue) – user14764 Apr 19 '17 at 19:18
  • Made my git faster as well. – Anthony Raymond Apr 20 '17 at 06:24
  • 2
    I tried disabling comodo entirely - and I mean all it's components - this did not help and it confused me as I was sure it was the culprit. After adding the rules it works fine now. Thanks! – Justas Apr 20 '17 at 22:24
  • 1
    Same for me.... I can't get why some protection is still active when desabled..... – Anthony Raymond Apr 21 '17 at 07:05
  • 1
    TL;DR for others: aside from Comodo, another answer in this post points to [BeyondTrust](https://stackoverflow.com/a/49118872/295686) [PowerBroker](https://stackoverflow.com/a/44158372/295686) antivirus; there is a [bug filed](https://github.com/git-for-windows/git/issues/1244) mentioning Cylance (my issue), so I think it is safe to generalize this to a 'check your antivirus logs' - obviously resolutions will differ by AV software and may require IT intervention in a corporate environment. – mlhDev Jun 05 '18 at 19:57
  • In case it's not apparent: this problem is _not_ specific to Git Bash - if you use `git.exe`, like me, allowing it through Windows Firewall solves this too. – Paul Aug 31 '20 at 18:37
9

Turns out Comodo Antivirus was auto-sandboxing Git Bash. Adding Git Bash as an exception to the sandboxing rules solved my problem.

Hope this saves someone else an hour.

Nate Anderson
  • 777
  • 2
  • 7
  • 26
  • 2
    How did you fix it? I've disabled everything in comodo and still seeing the issue... – Bogdan Varlamov Apr 07 '17 at 04:34
  • 1
    @BogdanVarlamov I had to delete Git Bash and reinstall. I think I disabled Comodo sandboxing entirely, or maybe there are filters for specific .exe. Then reinstall Git Bash. Then update Comodo sandboxing with your desired settings. It's been awhile and I don't use the same environment, so that's from memory. YMMV. – Nate Anderson Apr 10 '17 at 15:03
  • 2
    I ended up uninstalling Comodo...not being able to use Git Bash easily is an absurd failure in their product. – Bogdan Varlamov Apr 11 '17 at 03:26
  • I'm running into this now after their last update. I disabled everything (including firewall and HIPS) but it's still blocking it. Not sure what else I could do. Uninstalling comodo fixed it for me. I don't even know if it's a "bug" in comodo or if msys needs to update how they call some windows api. – Matt Apr 11 '17 at 20:37
  • @Bogdan The feature in question that prevents Git Bash is explicitly one that prevents shell code injection which is what's being prevented here. You can turn it off or add exclusions to it specifically. But yeah, it's annoying that it took so long to figure out the feature even exists for something that I thought was just a network firewall. – Jahed Apr 11 '17 at 23:11
  • @Jahed, I did try to look through the settings to turn it off, but after wasting about an hour I decided I would just get rid of Comodo...where are the specific settings to fix git bash that you changed? – Bogdan Varlamov Apr 12 '17 at 05:35
  • @Bogdan Varlamov: how did you manage to uninstall? I tried, but the uninstaller failed. Running a brand new installer on top of it failed too. Loos like I'm stuck with Comodo for the rest of my PC's life :/ – user14764 Apr 19 '17 at 19:20
  • @Jahed: for me, turning off the code injection thing didn't fix it. I really had to add Git the to exclusion list, even with the feature disabled.... #snafu – user14764 Apr 19 '17 at 19:22
  • Look at my answer, there is some exclusions that need to be added. – Anthony Raymond Apr 21 '17 at 07:09
  • @user14764, the uninstaller worked for me...sorry :( – Bogdan Varlamov Apr 22 '17 at 20:43
8

The company I work for has BeyondTrust PowerBroker on corporate computers, and that turned out to be the source of the problem.

I solved it by adding a the key ExcludedProfilerApps to HKLM\SOFTWARE\Policies\BeyondTrust\PBDesktops with the value C:\Program Files\Git\*.

Here is a link to some discussion of the issue.

Git Bash complained about some permissions on startup, but I didn't notice any other issues.

Installing Git 2.7.0, as @rakehell have mentioned, also resolved the issue.

Wernsey
  • 5,411
  • 22
  • 38
  • Thanks for this tip! My company also uses BeyondTrust PowerBroker and this worked for me. My Git Bash was located in a different directory than `C:\Program Files\Git`, so I had to add that directory to `ExcludedProfilerApps` instead. – Scott Griffiths Jun 29 '18 at 14:27
4

I have solved this by adding an exclusion for the entire git directory in (c:\Program Files\Git\*):

Advanced Settings -> Advanced Protection -> Miscellaneous -> Detect shellcode injections

See this https://forums.comodo.com/news-announcements-feedback-cis/comodo-internet-security-v10016209-released-t118704.0.html;msg854022#msg854022

Akimi
  • 41
  • 1
  • 2
3

I had this problem on Win 7 and installed 5 versions of Git working backwards from the latest as well as run every solution I could find by Googling. However, the only thing that worked was this version: 2.7.0

The subsequent updates, 2.7.0.1 and 2.7.0.2, did not work.

HTH

rakehell
  • 323
  • 2
  • 11
  • Whoever worrying for older version here is the link : https://github.com/git-for-windows/git/releases?after=v2.8.1.windows.1 – Aman Adhikari Mar 27 '17 at 15:13
  • FYI, this was the only thing that worked for me as well. I had 2.15 installed and it failed miserably, but 2.7.0 got it working. It even launched Git bash as a MINGW64 app with all the nice ASCII colors. Before, it was just a glorified command prompt that threw error messages all the time. – Chris Clark Dec 01 '17 at 14:01
1

It is definitely a BeyondTrust /firewall issue.

Here is what happened on my Windows 7 laptop:

  • Git (via msi installer) was installed in the local programs directory : C:\Users\myusername\AppData\Local\Programs\Git
  • But the regedit shows a different value here -> HKLM ->SOFTWARE\Policies\BeyondTrust\PBDesktops shows the value C:\Program Files\Git*

Solution :

  • Copy the Git folder from C:\Users\myusername\AppData\Local\Programs\ and paste it to C:\Program Files
Thyag
  • 1,217
  • 13
  • 14