Help! "fork: permission denied" error 13

4,222 views
Skip to first unread message

Pete Burkindine

unread,
Jul 25, 2016, 3:07:17 AM7/25/16
to git-for-windows
Help!

All of a sudden, without any change to my system, I cannot rebase. 

* I've uninstalled and reinstalled Git for Windows a couple of times, the second installed into my User folder.
* It doesn't matter which repo I'm in.
* It does it in freshly cloned repos, too.
* I gave Authenticated Users full rights on both the Git folder and the repo folder.

Here is the error, which I've had no luck finding information about...

 $ git rebase -i HEAD~3
      0 [main] sh 8284 fork: child -1 - CreateProcessW failed for 'C:\Users\pburkindine\Git\usr\bin\sh.exe', errno 13
/mingw64/libexec/git-core/git-rebase--interactive: fork: Permission denied
    164 [main] sh 5964 fork: child -1 - CreateProcessW failed for 'C:\Users\pburkindine\Git\usr\bin\sh.exe', errno 13
/mingw64/libexec/git-core/git-rebase--interactive: fork: Permission denied
/mingw64/libexec/git-core/git-rebase--interactive: line 126: + : syntax error: operand expected (error token is "+ ")


Please help!  I can't work!

Thanks,
Pete

Johannes Schindelin

unread,
Jul 25, 2016, 4:02:08 AM7/25/16
to Pete Burkindine, git-for-windows
Hi Pete,

On Sun, 24 Jul 2016, Pete Burkindine wrote:

> All of a sudden, without any change to my system, I cannot rebase.
>
> * I've uninstalled and reinstalled Git for Windows a couple of times, the
> second installed into my User folder.
> * It doesn't matter which repo I'm in.
> * It does it in freshly cloned repos, too.
> * I gave Authenticated Users full rights on both the Git folder and the
> repo folder.
>
> Here is the error, which I've had no luck finding information about...
>
> $ git rebase -i HEAD~3
> 0 [main] sh 8284 fork: child -1 - CreateProcessW failed for
> 'C:\Users\pburkindine\Git\usr\bin\sh.exe', errno 13
> /mingw64/libexec/git-core/git-rebase--interactive: fork: Permission denied
> [...]

This sounds like a case for the BLODA ("Big List Of Dodgy Apps"):

https://cygwin.com/faq/faq.html#faq.using.bloda

If you are confused why I refer you to Cygwin: part of Git (e.g. rebase
-i) is implemented as shell script, and to support running those, we use
MSYS2's Bash, which uses the MSYS2 runtime to provide a POSIX emulation
layer, that in turn is a slightly modified Cygwin runtime.

Now, to find out whether you have such a dodgy application messing with
your rebase, open a `cmd` and run

set CYGWIN=detect_bloda
C:\Users\pburkindine\Git\usr\bin\sh.exe --login -i

This should help diagnose things further. For my own education, may I ask
to report back your findings?

Ciao,
Johannes

Pete Burkindine

unread,
Jul 26, 2016, 7:09:39 AM7/26/16
to git-for-windows, peter.bu...@directenergy.com
Hi, Johannes,

Thanks for the reply.

Unfortunately, the response was not very revealing:





Pete Burkindine

unread,
Jul 26, 2016, 7:09:39 AM7/26/16
to git-for-windows, peter.bu...@directenergy.com
Got up with our IT, you are correct, it was caused by an update to Cylance

Andre Terra

unread,
Dec 1, 2017, 5:46:06 AM12/1/17
to git-for-windows
Hey Johannes,

I know I'm resurrecting a thread from 2016 but I found your post on Google and I can't imagine anyone could be more helpful than you as I think I'm having the exact same error Pete had.

So, "for your own education", as you mentioned, here's what I get after running the commands you suggested to Pete:

C:\bin\git>bin\sh.exe --login -i
     84 [main] bash 5548 C:\bin\git\bin\..\usr\bin\bash.exe: *** fatal error in forked process - MapViewOfFileEx '(null)'(0x140), Win32 error 5.  Terminating.
      0 [main] bash 13036 fork: child 5548 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable
    714 [main] bash 3252 C:\bin\git\bin\..\usr\bin\bash.exe: *** fatal error in forked process - MapViewOfFileEx '(null)'(0x140), Win32 error 5.  Terminating.
1394765 [main] bash 13036 fork: child 3252 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable
    419 [main] bash 9648 C:\bin\git\bin\..\usr\bin\bash.exe: *** fatal error in forked process - MapViewOfFileEx '(null)'(0x140), Win32 error 5.  Terminating.
3792152 [main] bash 13036 fork: child 9648 - died waiting for dll loading, errno 11
bash: fork: retry: Resource temporarily unavailable

...This goes on ad eternum until I hit Ctrl+C, which then results in the line below followed by a seemingly workable shell, as you can attest from the results of running "ls"

bash: fork: Resource temporarily unavailable
bash-4.4$ ls
LICENSE.txt         bin  etc           mingw64               tmp           unins000.msg
ReleaseNotes.html   cmd  git-bash.exe  mintty.exe.stackdump  unins000.dat  usr
bash.exe.stackdump  dev  git-cmd.exe   proc                  unins000.exe
bash-4.4$

On the off chance that you (or anyone else) have an idea as to what to do next, I'd deeply appreciate the help.


Best,
Andy

Johannes Schindelin

unread,
Dec 1, 2017, 7:52:42 AM12/1/17
to Andre Terra, git-for-windows
Hi Andre,

On Thu, 30 Nov 2017, Andre Terra wrote:

> I know I'm resurrecting a thread from 2016 but I found your post on Google
> and I can't imagine anyone could be more helpful than you as I think I'm
> having the exact same error Pete had.
>
> So, "for your own education", as you mentioned, here's what I get after
> running the commands you suggested to Pete:
>
> C:\bin\git>bin\sh.exe --login -i

Could you re-run this after setting...

> > set CYGWIN=detect_bloda

Thanks,
Johannes

Andre Terra

unread,
Dec 1, 2017, 1:52:01 PM12/1/17
to Johannes Schindelin, git-for-windows
Johannes,

Sorry, I should have been clearer. I has already set CYGWIN to detect_bloda at that point, so the output you see in my original message is what happens after set CYGWIN=detect_bloda

Thanks again for helping with this.


Best,
Andy
Reply all
Reply to author
Forward
0 new messages