Can't reserve memory for stack

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Can't reserve memory for stack

dhoyt
I'm using the latest of everything from msys/mingw (built my environment today) and I'm getting the following error when attempting to compile mingw-w64's gcc (using mingw's gcc 4.5.0) from scratch:

    fork: can't reserve memory for stack 0xA0000 - 0x2A0000, Win32 error 0

Has anybody seen this and could help me figure out what to do? Thanks!

Here's the relevant output from the build:

make[5]: Entering directory `/e/work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src'/bin/sh ../libtool --tag CXX   --mode=link /e/Work/build-x86/gcc/obj/./gcc/xgcc -shared-libgcc -B/e/Work/build-x86/gcc/obj/./gcc -nostdinc++ -L/e/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src -L/e/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src/.libs -L/e/Work/build-x86/root/i686-w64-mingw32/lib -L/e/Work/build-x86/root/mingw/lib -isystem /e/Work/build-x86/root/i686-w64-mingw32/include -isystem /e/Work/build-x86/root/mingw/include -B/e/Work/build-x86/root/i686-w64-mingw32/bin/ -B/e/Work/build-x86/root/i686-w64-mingw32/lib/ -isystem /e/Work/build-x86/root/i686-w64-mingw32/include -isystem /e/Work/build-x86/root/i686-w64-mingw32/sys-include    -Wl,-O1  -no-undefined -bindir /e/Work/build-x86/root/bin -Wl,--gc-sections  -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual  -fdiagnostics-show-location=once  -ffunction-sections -fdata-sections   -o libstdc++.la -version-info 6:14:0 -Wl,--version-script=libstdc++-symbols.ver -lm  -rpath /e/Work/build-x86/root/i686-w64-mingw32/lib/../lib32 atomic.lo bitmap_allocator.lo pool_allocator.lo mt_allocator.lo codecvt.lo compatibility.lo compatibility-c++0x.lo compatibility-debug_list.lo compatibility-list.lo complex_io.lo ctype.lo debug.lo functexcept.lo globals_io.lo hash_c++0x.lo hash_tr1.lo hashtable_c++0x.lo hashtable_tr1.lo ios.lo ios_failure.lo ios_init.lo ios_locale.lo limits.lo list.lo debug_list.lo locale.lo locale_init.lo locale_facets.lo localename.lo math_stubs_float.lo math_stubs_long_double.lo stdexcept.lo strstream.lo system_error.lo tree.lo allocator-inst.lo concept-inst.lo fstream-inst.lo ext-inst.lo ios-inst.lo iostream-inst.lo istream-inst.lo istream.lo locale-inst.lo misc-inst.lo ostream-inst.lo sstream-inst.lo streambuf-inst.lo streambuf.lo string-inst.lo valarray-inst.lo wlocale-inst.lo wstring-inst.lo mutex.lo condition_variable.lo chrono.lo thread.lo future.lo atomicity.lo codecvt_members.lo collate_members.lo ctype_members.lo messages_members.lo monetary_members.lo numeric_members.lotime_members.lo basic_file.lo c++locale.lo    ../libsupc++/libsupc++convenience.la
libtool: link:  /e/Work/build-x86/gcc/obj/./gcc/xgcc -shared-libgcc -B/e/Work/build-x86/gcc/obj/./gcc -nostdinc++ -L/e/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src -L/e/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src/.libs -L/e/Work/build-x86/root/i686-w64-mingw32/lib-L/e/Work/build-x86/root/mingw/lib -isystem /e/Work/build-x86/root/i686-w64-mingw32/include -isystem /e/Work/build-x86/root/mingw/include -B/e/Work/build-x86/root/i686-w64-mingw32/bin/ -B/e/Work/build-x86/root/i686-w64-mingw32/lib/ -isystem /e/Work/build-x86/root/i686-w64-mingw32/include -isystem /e/Work/build-x86/root/i686-w64-mingw32/sys-include    -shared -nostdlib e:/Work/build-x86/root/i686-w64-mingw32/lib/dllcrt2.o e:/Work/build-x86/gcc/obj/gcc/crtbegin.o  .libs/atomic.o .libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o .libs/codecvt.o .libs/compatibility.o .libs/compatibility-c++0x.o .libs/compatibility-debug_list.o .libs/compatibility-list.o .libs/complex_io.o .libs/ctype.o .libs/debug.o .libs/functexcept.o .libs/globals_io.o .libs/hash_c++0x.o .libs/hash_tr1.o .libs/hashtable_c++0x.o .libs/hashtable_tr1.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o .libs/list.o .libs/debug_list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/math_stubs_float.o .libs/math_stubs_long_double.o .libs/stdexcept.o .libs/strstream.o .libs/system_error.o .libs/tree.o.libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o .libs/iostream-inst.o .libs/istream-inst.o .libs/istream.o .libs/locale-inst.o .libs/misc-inst.o .libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o .libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o .libs/wstring-inst.o .libs/mutex.o .libs/condition_variable.o .libs/chrono.o .libs/thread.o .libs/future.o .libs/atomicity.o .libs/codecvt_members.o .libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o .libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o .libs/basic_file.o .libs/c++locale.o  -Wl,--whole-archive ../libsupc++/.libs/libsupc++convenience.a -Wl,--no-whole-archive  -L/e/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src -L/e/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src/.libs -L/e/Work/build-x86/root/i686-w64-mingw32/lib -L/e/Work/build-x86/root/mingw/lib -Le:/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src -Le:/Work/build-x86/gcc/obj/i686-w64-mingw32/libstdc++-v3/src/.libs -Le:/Work/build-x86/root/i686-w64-mingw32/lib -Le:/Work/build-x86/root/mingw/lib -Le:/Work/build-x86/gcc/obj/gcc -Le:/Work/build-x86/root/i686-w64-mingw32/bin -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt -luser32 -lkernel32 -ladvapi32 -lshell32 -lmingw32 -lgcc_s -lgcc -lmoldname -lmingwex -lmsvcrt e:/Work/build-x86/gcc/obj/gcc/crtend.o  -Wl,-O1 -Wl,--gc-sections -Wl,--version-script=libstdc++-symbols.ver   -o .libs/libstdc++-6.dll -Wl,--enable-auto-image-base -Xlinker --out-implib -Xlinker .libs/libstdc++.dll.a

E:\msys\bin\sh.exe: *** fork: can't reserve memory for stack 0xA0000 - 0x2A0000, Win32 error 0
E:\msys\bin\sh.exe: *** fork: can't reserve memory for stack 0xA0000 - 0x2A0000, Win32 error 0
      0 [main] sh" 5408 sync_with_child: child 5104(0x27C) died before initialization with status code 0x1
   1568 [main] sh" 5408 sync_with_child: *** child state waiting for longjmp
e:/work/build-x86/gcc/obj/gcc/collect-ld: fork: Resource temporarily unavailable
collect2: ld returned 128 exit status

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't reserve memory for stack

Earnie Boyd
Hoyt, David wrote:
>
> E:\msys\bin\sh.exe: *** fork: can't reserve memory for stack 0xA0000 - 0x2A0000, Win32 error 0
> E:\msys\bin\sh.exe: *** fork: can't reserve memory for stack 0xA0000 - 0x2A0000, Win32 error 0
>        0 [main] sh" 5408 sync_with_child: child 5104(0x27C) died before initialization with status code 0x1
>     1568 [main] sh" 5408 sync_with_child: *** child state waiting for longjmp
> e:/work/build-x86/gcc/obj/gcc/collect-ld: fork: Resource temporarily unavailable
> collect2: ld returned 128 exit status
>

I don't know if this will help with a 64 bit Windows OS but you can try
a rebase of the msys-1.0.dll.  Search the archives for how you can do this.

--
Earnie
-- http://www.for-my-kids.com

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: Can't reserve memory for stack

lrn-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 30.08.2010 15:57, Earnie wrote:

> Hoyt, David wrote:
>>
>> E:\msys\bin\sh.exe: *** fork: can't reserve memory for stack
>> 0xA0000 - 0x2A0000, Win32 error 0 E:\msys\bin\sh.exe: *** fork:
>> can't reserve memory for stack 0xA0000 - 0x2A0000, Win32 error 0
>> 0 [main] sh" 5408 sync_with_child: child 5104(0x27C) died before
>> initialization with status code 0x1 1568 [main] sh" 5408
>> sync_with_child: *** child state waiting for longjmp
>> e:/work/build-x86/gcc/obj/gcc/collect-ld: fork: Resource
>> temporarily unavailable collect2: ld returned 128 exit status
>>
>
> I don't know if this will help with a 64 bit Windows OS but you can
> try a rebase of the msys-1.0.dll.  Search the archives for how you
> can do this.
>
I've rebased msys-1.0.dll to 0x70800000, and that didn't help with
this particular error.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOu+xJAAoJEOs4Jb6SI2Cwj1sIAKHjpCn7xtZQzxph92vIQ7Si
Db9vtlRuM6nzMANJ/SSeszKXJfBtF0OrZQACFRylbsHCrLASYjzxwI39UUR/fvkt
X9P1JCKNJRHria5AUfbiedTkJTArcJRuhkrTnpgXxErrKy4aGQkDjirFarsSSKhH
/NDHeIGtcp9rslP/xzjyQNeuMxCA5r/WTJrth+IDTZo0BJaGz+1Ryomiz7lCQgvJ
4WAhG1Q+GlsEg2wpNZENJipBklMCoVvBQcIs37rWrCXKdlm/mKWjcA08tUyqHlAM
RP3uj7cT192sw1O2V3BY3qcUgGrdzL4rzm9/7cR3r099HdrhQoEITquD08oARGI=
=vwP3
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Can't reserve memory for stack

revelator
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I can confirm a rebase works on win7 64 though at times it will still
crash partially (does not kill sh.exe but throws a memory error
sometimes but not very often).
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOu/lwAAoJEIjGvG7Y4HU8BCUH/3MAeLm1N4YJgCYHs8b/HxhL
rZir4CkOmZl/wb5qbkbqE/rwR21OHQhfjUI2dNFkn2xuy9/krJURWfw29CH/fup3
nezO401kGbwdJBRfV3uUW+WYSs+SkW3KzF9gsFyhHQ9eGpO9WYux605YsfAnCXZN
ziDh9vPdPb2CD5i8QYYA+oHSWB7tBOgJsnIgL6dFRuMBgwGXz82Y48rj2gOgUgwG
+LYsXcvlrJTcxlsmUxDzvWSSBMpXpPGmQ10C/QhHJWklextKwRT72xe6L8QbA9zJ
i2syCAI60SdJxQJduam+GzNma4zCXwL1pUEQBTwZkMw4QtQHulVlGrAZBRuUDiU=
=4Gp3
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Can't reserve memory for stack

lrn-2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 10.11.2011 20:18, Ralph Engels wrote:
> I can confirm a rebase works on win7 64 though at times it will
> still crash partially (does not kill sh.exe but throws a memory
> error sometimes but not very often).
Which dlls did you rebase, and to which addresses? Which version of
gcc were you building?

As a side-note: i've managed to (hopefully) work around this by
`make'ing in gcc build directory, waiting until the crash, `cd'ing
into $builddir/x86_64-w64-mingw32/libgcc , `make'ing again, then
`cd'ing back to $builddir and `make'ing once again. Apparently, the
problem is in a mind-numbing combination of recursive make invocations
and shell scripts.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOvBLSAAoJEOs4Jb6SI2Cwp2MH/2F4twQtk4NoBKipvUSGL7KM
DwLEWvWMwoitGAnqaFafGqyeU1nOA7UqOMMtAmK0a8JojZ8HtNKJTzbslEFmFj8+
0lgrQ3FaLfPTuxyLrYFOk6Xe315vAz214/9/LMfG/e+N9B40khvJVz+DDsJU1/gL
tKytP69gGHkUvUz+aMyMMqJhRK/ElwFHqPcYz4zCyHoutUCT0KwXDOVI8PbNCpfX
azo9NYT2jzuU2B6+cvXzEHzEt2vI/rXmz/poxvukVzhcIKUNLzTOzKYLkdoYN3Wv
ZYZU4jruWjNPGLYldUVV5W+1kNbmw6chccQT+y5+Tne5yeImfrCM2FPMILrKRaM=
=YVn3
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Can't reserve memory for stack

Earnie Boyd
In reply to this post by lrn-2
LRN wrote:

> On 30.08.2010 15:57, Earnie wrote:
>> Hoyt, David wrote:
>>>
>>> E:\msys\bin\sh.exe: *** fork: can't reserve memory for stack
>>> 0xA0000 - 0x2A0000, Win32 error 0 E:\msys\bin\sh.exe: ***
>>> fork: can't reserve memory for stack 0xA0000 - 0x2A0000, Win32
>>> error 0 0 [main] sh" 5408 sync_with_child: child 5104(0x27C)
>>> died before initialization with status code 0x1 1568 [main] sh"
>>> 5408 sync_with_child: *** child state waiting for longjmp
>>> e:/work/build-x86/gcc/obj/gcc/collect-ld: fork: Resource
>>> temporarily unavailable collect2: ld returned 128 exit status
>>>
>
>> I don't know if this will help with a 64 bit Windows OS but you
>> can try a rebase of the msys-1.0.dll.  Search the archives for
>> how you can do this.
>
> I've rebased msys-1.0.dll to 0x70800000, and that didn't help with
> this particular error.

You can also need to disable virus checkers and some devices.  I've
seen talk on Cygwin developers about base addresses and how it affects
Cygwin, you might want to review those archives.

--
Earnie
-- http://www.for-my-kids.com

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|

Re: Can't reserve memory for stack

revelator
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rebased msys-1.0.dll to 0x70000000 and so far working fine unless i
try running several shell windows at once. Earnie is correct some
antivirus and even some drivers can play havoc with the msys-1.0.dll,
one driver i noticed was an older logitech keyboard driver though
newer versions seem to behave correctly. I can upload my dll if you
want ?.

Regards Ralph.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOvEbLAAoJEIjGvG7Y4HU8JjoIAI2g9X4nLCdI8JDT5KJx2LaM
XY9Bp0nLMj+KDwx+rTYkC+ZHzoi1ce6DPnnf6nCDb531SvpmvKlbIHLIo+ilYic2
4MnzuR+d3anBnaN0124QZyCiTCSso3FZgtaPXfT7gNipNHwLGoadwrF3i0gV8on8
HVyZpmiv/BLfGvk+Z1W284m0EafFrBWbYnarI3eihXg5ffSp8NPIIYL4lO+5avIN
NwRUaEcPpi/hED1mKMT8XebXCMo86bLhzOACao+dzvFgNVv4pPQSuRo/ZLObc2+6
b/ecaAtqtQc9s5Uv12ymniJdfrdPglIg72XIRV5pkhLuwuvjUynTlRf5Tl/3zvM=
=dC9y
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe