This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Running 64 bit Cygwin from 32 bit cmd.exe in 2003


I have noticed something in the new 64 bit Cygwin's behavior that may help 
people if documented.

I have a Windows Server Datacenter 2003 R2 64-bit machine, and I installed 
the new 64 bit Cygwin. I have noticed that if I run bash from the 64 bit 
version of cmd.exe, it works fine:
---
>From C:\WINDOWS\system32\cmd.exe

C:\WINDOWS\system32>C:\cygwin64\bin\bash

Administrator@CWSS /cygdrive/c/WINDOWS/system32
$ 
---
But if I run the same thing from the 32 bit version of cmd.exe, I get 
errors:
---
>From C:\WINDOWS\SysWOW64\cmd.exe

C:\WINDOWS\SysWOW64>C:\cygwin64\bin\bash
      2 [main] bash 1480 C:\cygwin64\bin\bash.exe: *** fatal error in 
forked process - fork: can't reserve memory for parent stack 0x140000 - 
0x340000, (child has 0x30000 - 0x230000), Win32 error 487
    557 [main] bash 1480 open_stackdumpfile: Dumping stack trace to 
bash.exe.stackdump
      2 [main] bash 808 fork: child -1 - forked process 1480 died 
unexpectedly, retry 0, exit code 0x100, errno 11
bash: fork: retry: Resource temporarily unavailable
1005014 [main] bash 1308 C:\cygwin64\bin\bash.exe: *** fatal error in 
forked process - fork: can't reserve memory for parent stack 0x140000 - 
0x340000, (child has 0x30000 - 0x230000), Win32 error 487
1005562 [main] bash 1308 open_stackdumpfile: Dumping stack trace to 
bash.exe.stackdump
1147237 [main] bash 808 fork: child -1 - forked process 1308 died 
unexpectedly, retry 0, exit code 0x100, errno 11
bash: fork: retry: Resource temporarily unavailable
3150329 [main] bash 1600 C:\cygwin64\bin\bash.exe: *** fatal error in 
forked process - fork: can't reserve memory for parent stack 0x140000 - 
0x340000, (child has 0x30000 - 0x230000), Win32 error 487
3150878 [main] bash 1600 open_stackdumpfile: Dumping stack trace to 
bash.exe.stackdump
3292274 [main] bash 808 fork: child -1 - forked process 1600 died 
unexpectedly, retry 0, exit code 0x100, errno 11
bash: fork: retry: Resource temporarily unavailable
7293681 [main] bash 1316 C:\cygwin64\bin\bash.exe: *** fatal error in 
forked process - fork: can't reserve memory for parent stack 0x140000 - 
0x340000, (child has 0x30000 - 0x230000), Win32 error 487
7294273 [main] bash 1316 open_stackdumpfile: Dumping stack trace to 
bash.exe.stackdump
7436522 [main] bash 808 fork: child -1 - forked process 1316 died 
unexpectedly, retry 0, exit code 0x100, errno 11
bash: fork: retry: Resource temporarily unavailable
15432714 [main] bash 2444 C:\cygwin64\bin\bash.exe: *** fatal error in 
forked process - fork: can't reserve memory for parent stack 0x140000 - 
0x340000, (childhas 0x30000 - 0x230000), Win32 error 487
15433365 [main] bash 2444 open_stackdumpfile: Dumping stack trace to 
bash.exe.stackdump
15590738 [main] bash 808 fork: child -1 - forked process 2444 died 
unexpectedly, retry 0, exit code 0x100, errno 11
bash: fork: Resource temporarily unavailable
bash-4.1$ 
---
Contents of C:\WINDOWS\SysWOW64\bash.exe.stackdump

Stack trace:
Frame        Function    Args
00000000000  0018006F3DE (001801E9EFC, 001801E9DA6, 00000030000, 
0000022EE00)
00000000000  00180046F22 (0000022FE68, 00000200000, 00000000000, 
00000000001)
00000000000  00180046F62 (00000140000, 00000340000, 00000030000, 
00000230000)
00000000000  0018004715B (00000000000, 0000022FF00, 00000000000, 
001801C2800)
00000000000  001800471AA (00000000000, 00000000000, 00000000000, 
00000000000)
00000000000  0018004727E (00000000000, 00000000000, 00000000000, 
00000000000)
00000000000  0010046A4D1 (00000000000, 00000000000, 00000000000, 
00000000000)
00000000000  00100401010 (00000000000, 00000000000, 0000022FFA8, 
00000000000)
00000000000  00077D596AC (00000000000, 00000000000, 0000022FFA8, 
00000000000)
End of stack trace
---
The reason I tried running bash from 32 bit cmd.exe is because the Jenkins 
Slave, a 64 bit process itself, runs the 32 bit version of cmd.exe for 
some reason.

I tried this in Windows Server 2008 R2 Datacenter 64 bit, and the errors 
do not occur at all in the 32 bit cmd.exe.

This is not really a problem for me; I can just use the 32 bit version of 
Cygwin. And trying to run 64 bit Cygwin from 32 bit cmd.exe is probably 
silly. Still, a check for bitness might help avoid this unhelpful error. I 
may consider submitting the 32 bit cmd.exe usage as a bug to Jenkins.
I wanted to create this post because it seems no one anywhere on the 
internet has seen these particular errors, so hopefully this post will 
help others track down the issue more quickly. BTW, I discovered the 
bitness of a running cmd.exe by using Task Manager and Process Explorer.

Paul Nickerson
IT Systems Administrator & Support
DeskNet Inc.
Portland, Maine

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]