fork problem on Windows XP 64 bit

1,467 views
Skip to first unread message

Ivan Kanis

unread,
Mar 15, 2011, 5:45:49 AM3/15/11
to msy...@googlegroups.com
Hello,

I have a problem when running a very simple script on Windows XP 64 bit:

#!/bin/sh

rm -f foo

# vim:et:sw=4:ts=4:

I get the following error:

C:\bob>"\Program Files\Git\bin\sh.exe" foo.sh
C:\Program Files\Git\bin\sh.exe: *** fork: can't reserve memory for
stack 0x4A0000 - 0x6A0000, Win32 error 0
0 [main] sh.exe" 2472 sync_with_child: child 2496(0x330) died before
initialization with status code 0x1
233 [main] sh.exe" 2472 sync_with_child: *** child state waiting for
longjmp

I have searched the group for a similar error but didn't find
anything. Could someone point me on how to troubleshoot this?

Kind regards,
--
Ivan Kanis, Release Manager, Vision Objects,
Tel +33 2 28 01 84 44, Fax +33 2 40 25 89 20
http://www.visionobjects.com

Success is counted sweetest
By those who ne'er succeed.
To comprehend a nectar
Requires sorest need.
-- Emily Dickinson

Johannes Schindelin

unread,
Mar 15, 2011, 6:11:01 AM3/15/11
to Ivan Kanis, msy...@googlegroups.com
Hi,

On Tue, 15 Mar 2011, Ivan Kanis wrote:

> I have a problem when running a very simple script on Windows XP 64 bit:
>
> #!/bin/sh
>
> rm -f foo
>
> # vim:et:sw=4:ts=4:
>
> I get the following error:
>
> C:\bob>"\Program Files\Git\bin\sh.exe" foo.sh
> C:\Program Files\Git\bin\sh.exe: *** fork: can't reserve memory for
> stack 0x4A0000 - 0x6A0000, Win32 error 0
> 0 [main] sh.exe" 2472 sync_with_child: child 2496(0x330) died before
> initialization with status code 0x1
> 233 [main] sh.exe" 2472 sync_with_child: *** child state waiting for
> longjmp
>
> I have searched the group for a similar error but didn't find
> anything. Could someone point me on how to troubleshoot this?

A quick workaround might be to download
http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=msysgit.git;a=blob;f=mingw/bin/rebase.exe;hb=refs/heads/devel
copy it to the bin/ directory, and the launch a cmd.exe, cd to the bin
directory, and change the address of the msys-1.0.dll via

rebase -b 0x67000000 msys-1.0.dll

as described here:
http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=msysgit.git;a=commit;h=71f78b1816e3ff841f737672d43af36d099cb26f
(the symptom is different, but the reason probably the same).

Ciao,
Johannes

Johannes Schindelin

unread,
Mar 15, 2011, 7:16:42 AM3/15/11
to Ivan Kanis, msy...@googlegroups.com
Hi,

On Tue, 15 Mar 2011, Ivan Kanis wrote:

> Johannes Schindelin <Johannes....@gmx.de> wrote:
>
> >> I get the following error:
> >>
> >> C:\bob>"\Program Files\Git\bin\sh.exe" foo.sh
> >> C:\Program Files\Git\bin\sh.exe: *** fork: can't reserve memory for
> >> stack 0x4A0000 - 0x6A0000, Win32 error 0
> >> 0 [main] sh.exe" 2472 sync_with_child: child 2496(0x330) died before
> >> initialization with status code 0x1
> >> 233 [main] sh.exe" 2472 sync_with_child: *** child state waiting for
> >> longjmp
> >

> > A quick workaround might be to download
> > http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=msysgit.git;a=blob;f=mingw/bin/rebase.exe;hb=refs/heads/devel
> > copy it to the bin/ directory, and the launch a cmd.exe, cd to the bin
> > directory, and change the address of the msys-1.0.dll via
> >
> > rebase -b 0x67000000 msys-1.0.dll
>

> Thanks for your quick answer. I have tried it and got the same error.

You might want to play with the value (maybe 0x40000000 does the trick).

> I have tried upgrading from SP1 to SP2 without luck.
>
> I have ran the latest snapshot of msys. I see the same problem.
>
> It's clearly a msys problem and I'll report it on the mingw user list.

Well, it is the same issue. Some .dll's address range clashes with
msys-1.0.dll's.

> Sorry for the noise...

Hopefully you can work around the issue with a different base address.

Ciao,
Johannes

Ivan Kanis

unread,
Mar 15, 2011, 7:01:48 AM3/15/11
to Johannes Schindelin, msy...@googlegroups.com
Hi Johannes,

Johannes Schindelin <Johannes....@gmx.de> wrote:

>> I get the following error:
>>
>> C:\bob>"\Program Files\Git\bin\sh.exe" foo.sh
>> C:\Program Files\Git\bin\sh.exe: *** fork: can't reserve memory for
>> stack 0x4A0000 - 0x6A0000, Win32 error 0
>> 0 [main] sh.exe" 2472 sync_with_child: child 2496(0x330) died before
>> initialization with status code 0x1
>> 233 [main] sh.exe" 2472 sync_with_child: *** child state waiting for
>> longjmp
>

> A quick workaround might be to download
> http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=msysgit.git;a=blob;f=mingw/bin/rebase.exe;hb=refs/heads/devel
> copy it to the bin/ directory, and the launch a cmd.exe, cd to the bin
> directory, and change the address of the msys-1.0.dll via
>
> rebase -b 0x67000000 msys-1.0.dll

Thanks for your quick answer. I have tried it and got the same error.

I have tried upgrading from SP1 to SP2 without luck.

I have ran the latest snapshot of msys. I see the same problem.

It's clearly a msys problem and I'll report it on the mingw user list.

Sorry for the noise...


--
Ivan Kanis, Release Manager, Vision Objects,
Tel +33 2 28 01 84 44, Fax +33 2 40 25 89 20
http://www.visionobjects.com

If it works, it's obsolete.
-- Marshall McLuhan

Ivan Kanis

unread,
Mar 16, 2011, 6:10:18 AM3/16/11
to Johannes Schindelin, msy...@googlegroups.com
Hi Johannes,

I was using %SystemRoot%\system32\cmd.exe instead of
%WINDIR%\SysWOW64\cmd.exe as my shell. I stumbled on the solution by
looking at msys.bat.

Take care,

Transo

unread,
Apr 8, 2011, 8:54:13 AM4/8/11
to msysGit


On 15 mar, 13:01, Ivan Kanis <msys...@kanis.fr> wrote:
> Hi Johannes,
>
>
>
> Johannes Schindelin <Johannes.Schinde...@gmx.de> wrote:
> >> I get the following error:
>
> >> C:\bob>"\Program Files\Git\bin\sh.exe" foo.sh
> >> C:\Program Files\Git\bin\sh.exe: ***fork: can't reserve memory for
> >>   stack 0x4A0000 - 0x6A0000, Win32 error 0
> >> 0 [main]sh.exe" 2472 sync_with_child: child 2496(0x330) died before
> >>   initialization with status code 0x1
> >> 233 [main]sh.exe" 2472 sync_with_child: *** child state waiting for
> >>   longjmp
>
> > A quick workaround might be to download
> >http://pacific.mpi-cbg.de/cgi-bin/gitweb.cgi?p=msysgit.git;a=blob;f=m...
> > copy it to the bin/ directory, and the launch a cmd.exe, cd to the bin
> > directory, and change the address of the msys-1.0.dll via
>
> >    rebase -b 0x67000000 msys-1.0.dll
>
> Thanks for your quick answer. I have tried it and got the same error.
>
> I have tried upgrading from SP1 to SP2 without luck.
>
> I have ran the latest snapshot of msys. I see the same problem.
>
> It's clearly a msys problem and I'll report it on the mingw user list.
>
> Sorry for the noise...
> --
> Ivan Kanis, Release Manager, Vision Objects,
> Tel+33 2 28 01 84 44begin_of_the_skype_highlighting            +33 2 28 01 84 44      end_of_the_skype_highlighting,  Fax +33 2 40 25 89 20http://www.visionobjects.com
>
> If it works, it's obsolete.
>     -- Marshall McLuhan

Hi, I have the same Issue on a virtual XP 64 bits.
Is there any fix for this bug or can we use a particular old version
to make sh.exe not Forking?

Thanks!
Reply all
Reply to author
Forward
0 new messages