3

enter image description here

When i use git bash it says"Failed to fork child process: Resource temporarily unavailable.DLL rebasing may be required. See 'rebaseall --help'." How can I fix this problem?

When I use tortoiseGit to stash I got some message like this

> git.exe stash save -- "12"

0 [main] sh (7224) D:\Program Files (x86)\Git\usr\bin\sh.exe: *** fatal error - cygheap base mismatch detected - 0x1360400/0x12F0400.
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.
0 [main] sh 13140 fork: child -1 - forked process 7224 died unexpectedly, retry 0, exit code 0xC0000142, errno 11
D:\Program Files (x86)\Git\mingw32/libexec/git-core\git-stash: fork: retry: No child processes    
2
  • what version of Git are you using? On which OS? (Windows 32 or 64 bits?) Commented Jul 21, 2016 at 4:53
  • OS Win10 X64 Git version v2.7.2 Commented Jul 21, 2016 at 4:58

5 Answers 5

21

I had faced the same issue one morning. I tried to uninstall the Git just to see if it was corrupted and it pointed me to shut down few processes that go like sh.exe in the Task manager. After I killed them, I was able to open the Git bash successfully.

Cheers!

Sign up to request clarification or add additional context in comments.

7 Comments

The OP probably meant ssh.exe instead of sh.exe, and yes -- killing these worked for me as well. Thanks for saving me the trouble of doing a full reboot.
I have sh.exe and not ssh.exe !
It was ssh.exe for me.
Want to add that for me it was bash.exe. Look for either sh.exe or bash.exe and kill the process.
I had the same issue and had to kill ssh-agent.exe
|
8

Here is the fix.

  1. Go to you Windows Defender Security Center settings
  2. Click on App & Browser Control
  3. At the bottom click on the "Exploit Protection Settings" link
  4. Go to "Program Settings" and click on the "Add program to customize" -> "Choose exact file path"
  5. Add "C:\Program Files\Git\usr\bin\sh.exe" and "C:\Program Files\Git\usr\bin\bash.exe"
  6. Override and turn off the following: Mandatory ASLR, Randomize memory allocations (Bottom-up ASLR)
  7. Click "Apply" and now everything should work fine.

Also add these other binaries from the same folder: expr.exe, uname.exe, grep.exe, rm.exe

Good luck,
Gabriel

3 Comments

but why does aslr has anything to do with git?
The unix commands are not written with ASLR in mind so they break. Git uses unix commands so it breaks. See my answer below for a simpler way to fix this by reinstalling git with the ASLR setting choice.
There may be multiple executables of bash.exe and similars under Git installation. I had both /usr/bin/bash.exe and /bin/bash.exe.
0

Try instead the portable version of Git for Windows 2.9.2:

  • unzip PortableGit-2.9.2-64-bit.7z.exe anywhere you want (like D:\git\git2.9.2),
  • remove from your PATH D:\Program Files (x86)\Git related paths
  • add to your PATH D:\git\git2.9.2;D:\git\git2.9.2\bin;D:\git\git2.9.2\cmd;D:\git\git2.9.2\usr\bin

Then, from a CMD session:

  • cd to a git repo
  • type bash -i --login and check the bash works properly

Comments

0

In my case since git bash was working before restarting my machine fix the issue.

Try by restarting your machine first, Hopefully it will fix it.

Comments

0

The issue is that the windows security feature ASLR prevents these unix commands from working. They are not written with ASLR in mind so they break.

The simple fix is to reinstall git for windows. The final setting before you can click install is a checkbox for disabling ASLR for all the commands. Check it. Now the underlying fork will work. Thus all of git once again works.

You can also laboriously do it manually like @Gabriel Bercea above, but this is simpler and will not miss some use case.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.