From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28421 invoked by alias); 31 Jul 2013 18:21:24 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 28395 invoked by uid 89); 31 Jul 2013 18:21:23 -0000 X-Spam-SWARE-Status: No, score=1.2 required=5.0 tests=AWL,BAYES_50,RDNS_NONE,SPF_HELO_PASS,SPF_PASS autolearn=no version=3.3.1 Received: from Unknown (HELO mail-gw2.desknetinc.com) (66.63.81.147) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 31 Jul 2013 18:21:22 +0000 Received: from mail-gw2.desknetinc.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id 1474EF8CEC for ; Wed, 31 Jul 2013 14:21:14 -0400 (EDT) Received: by mail-gw2.desknetinc.com (Postfix, from userid 503) id 85787F8CEF; Wed, 31 Jul 2013 14:21:13 -0400 (EDT) Received: from domino-me.desknetinc.com (domino-me.desknetinc.com [10.129.0.33]) by mail-gw2.desknetinc.com (Postfix) with ESMTP id 1DB51F8CEC for ; Wed, 31 Jul 2013 14:21:12 -0400 (EDT) To: cygwin@cygwin.com MIME-Version: 1.0 Subject: Running 64 bit Cygwin from 32 bit cmd.exe in 2003 X-KeepSent: D25DD164:FC7630EB-85257BB9:005F1762; type=4; name=$KeepSent From: Paul.Nickerson@desknetinc.com Message-ID: Date: Wed, 31 Jul 2013 19:08:00 -0000 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-07/txt/msg00722.txt.bz2 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