Skip to content
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 Bash won't run on Windows 10 - Error: Could not fork child process:Resource temporarily unavailable (-1). DLL rebasing may be required; see 'rebaseall / rebase --help'.- #2872

Closed
1 task done
SexyPantz opened this issue Oct 25, 2020 · 12 comments
Labels

Comments

@SexyPantz
Copy link

SexyPantz commented Oct 25, 2020

  • 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.29.1.windows.1
cpu: x86_64
built from commit: e6d53c456169235fe72602e2b4d985934fa9ad23
sizeof-long: 4
sizeof-size_t: 8
shell-path: /bin/sh
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
$ cmd.exe /c ver

Microsoft Windows [10.0.19041572]
  • 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: SublimeText
Custom Editor Path: 
Default Branch Option:  
Path Option: Cmd
SSH Option: OpenSSH
Tortoise Option: false
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Git Pull Behavior Option: Merge
Use Credential Manager: Core
Performance Tweaks FSCache: Enabled
Enable Symlinks: Disabled
Enable Pseudo Console Support: Disabled

  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

Exploit proctection settings are all set to default and Controlled folder access is off

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

git bash

I just tried running git-bash.exe 
  • What did you expect to occur after running these commands?
open the bash console like usual
  • What actually happened instead?
The bash console window opend but with an error message:
Error: Could not fork child process:Resource temporarily unavailable (-1). DLL rebasing may be required; see 'rebaseall / rebase --help'.
Before closing the window
  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?
https://github.com/git/git

git
So basically I tried running Git Bash on Win 10 (git version 2.91.1.winsows.1) and the only to get this console message:
Error: Could not fork child process:Resource temporarily unavailable (-1). DLL rebasing may be required; see 'rebaseall / rebase --help'.
Before closing the window
Tried lurking through the forums and google and apparently it has to do with the way Git handles credential and Window's newest security update.

Basically most fixes had to do with giving certain git binaries exceptions in the Exploit protection settings. That did not work for me. Other fixed involved downloading "scripts" from randos on the forums that told me they had found a way to work around Windows security settings, that seemed to me like a terrible idea.

I've also reinstalled git several times, choosing different options, rebooted my pc. Nothing works.

@dscho
Copy link
Member

dscho commented Oct 26, 2020

This sounds familiar. Maybe it is a running instance of ssh-agent.exe?

@SexyPantz
Copy link
Author

SexyPantz commented Oct 26, 2020

I've tried most of the proposed solution in that thread. It's does not appear that I'm running separate instances of bash.exe, ssh-agent or another binary or service. All that pops up both on tasklist or the Task Manager is a git-bash.exe when I try to run said program, which is expected.
I also tried the "stealing post-install.bash from the git portable installation" solution, it did not work.
One weird thing did happen. Before I tried anything I uninstalled, rebooted and installed git again, then I tried running Git Bash, this showed up in the terminal:

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
1 [main] bash 1305 dofork: child -1 - forked process 16304 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
bash: fork: retry: Resource temporarily unavailable
0 [main] bash (8292) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0xFDC408/0x11DC408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
1074728 [main] bash 1305 dofork: child -1 - forked process 8292 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
bash: fork: retry: Resource temporarily unavailable
0 [main] bash (15948) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0xFDC408/0x12BC408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
3152061 [main] bash 1305 dofork: child -1 - forked process 15948 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
bash: fork: retry: Resource temporarily unavailable
 7221373 [main] bash 1305 dofork: child -1 - forked process 15920 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
bash: fork: retry: Resource temporarily unavailable
0 [main] bash (2180) C:\Program Files\Git\usr\bin\bash.exe: *** fatal error - cygheap base mismatch detected - 0xFDC408/0x12DC408.
This problem is probably due to using incompatible versions of the cygwin DLL.
Search for cygwin1.dll using the Windows Start->Find/Search facility
and delete all but the most recent version.  The most recent version *should*
reside in x:\cygwin\bin, where 'x' is the drive on which you have
installed the cygwin distribution.  Rebooting is also suggested if you
are unable to find another cygwin DLL.
15288109 [main] bash 1305 dofork: child -1 - forked process 2180 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
bash: fork: Resource temporarily unavailable
bash-4.4$

After I pressed enter the terminal closed by itself. I tried looking for cygwin1.dll but could not find it. I downloaded and installed Cygwin. I couldn't, this errors popped up

1

Regardless, this did nothing. My problem persists.

@SexyPantz
Copy link
Author

I tried using GitHub for Windows, it failed cloning repos and got basically the same error message i got from git (see first error from comment above). It appears to be a cygwin error but I can't find a way to fix it or work around it.

@dscho
Copy link
Member

dscho commented Oct 28, 2020

Basically most fixes had to do with giving certain git binaries exceptions in the Exploit protection settings

I vaguely remember that some users tried to exclude Git from overzealous anti-malware but that was simply ignored, they had to disable the anti-malware completely. PowerBroker seemed to be involved in one of those cases.

We also saw cases where a driver (NVIDIA?) injected a .dll that prevented things from working. Seeing as Cygwin itself does not work for you, I suspect that something like that might be at play.

@SexyPantz
Copy link
Author

SexyPantz commented Oct 28, 2020

I tried disabling Windows antivirus that didn't work . Could be the NVIDIA drivers (they are on the BLODA list), but so far reinstalling them or changing versions did not work. The only solution I have left is to reinstall windows and hope for the best.

@Kumar141
Copy link

Kumar141 commented Jan 3, 2021

I'm facing the same problem and couldn't get any solution. So if any of you have any solution then please let me know.
I've 2.30.0 V and running on windows10, everything else is same and the problem too as shown in the image. The problem occurred just after installing and opening git bash. I did try reinstalling, downloading older versions, downloading 32bit git, restarting computer but none helped.
Also I installed it on my sis' laptop (same configuration and the latest version) and it started without any problem. So please lemme know the solution, Thanks.

@ghost
Copy link

ghost commented Jan 9, 2021

It could be due to Windows Mandatory ASLR (Windows Defender > App & browser control > Exploit protection > Mandatory ASLR). Also see #1412.

@dscho
Copy link
Member

dscho commented Jan 10, 2021

It could be due to Windows Mandatory ASLR (Windows Defender > App & browser control > Exploit protection > Mandatory ASLR). Also see #1412.

Good point. @knoftrix maybe you could open a PR to add that information to our known issues?

@CaptainMaxD
Copy link

Matthias AND Mike muchas Gracias!!! Tuve que desinstalar Windows. Quise instalar Kali y no pude. Volví a instalar Windows 10 y de ahí no pude avanzar porque se cortó internet y tengo pocos datos. Hasta la próxima semana no arreglan Internet. Así que hasta la semana que viene estoy estancada. Les aviso cuando pueda seguir. Muchas Gracias 😊

@CaptainMaxD
Copy link

Solucioné el problema reinstalando windows 10. Gracias.

@dscho dscho added the unclear label Feb 22, 2021
@jeremywood-ai
Copy link

jeremywood-ai commented Jun 11, 2022

This continues to be an exact same issue with Windows 11. Listed "fixes" do not correct the rebasing issues.

This is a borrowed solution, but corrects the issue:

Get-Item -Path "C:\Program Files\Git\usr\bin\*.exe" | %{ Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages }

Ref: https://stackoverflow.com/questions/8107319/cygwin-git-error-cygheap-base-mismatch-detected/48446934#48446934

@dscho
Copy link
Member

dscho commented Jun 13, 2022

This continues to be an exact same issue with Windows 11. Listed "fixes" do not correct the rebasing issues.

This is a borrowed solution, but corrects the issue:

Get-Item -Path "C:\Program Files\Git\usr\bin\*.exe" | %{ Set-ProcessMitigation -Name $_.Name -Disable ForceRelocateImages }

Ref: https://stackoverflow.com/questions/8107319/cygwin-git-error-cygheap-base-mismatch-detected/48446934#48446934

How is this in any shape or form different from what we already tell users who care to read Git for Windows' Release Notes?

What's more, this text was added in a PR that you already found.

Since there is nothing we can realistically do about this here ticket, I will close it.

@dscho dscho closed this as not planned Won't fix, can't repro, duplicate, stale Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants