www.delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-SWARE-Spam-Status: | No, hits=-1.2 required=5.0 tests=AWL,BAYES_00 |
X-Spam-Check-By: | sourceware.org |
X-VirusChecked: | Checked |
X-Env-Sender: | hkehoe AT budcat DOT com |
X-Msg-Ref: | server-3.tower-144.messagelabs.com!1289418193!79197851!1 |
X-StarScan-Version: | 6.2.9; banners=budcat.com,-,- |
Message-ID: | <4CDAF5D0.8080306@budcat.com> |
Date: | Wed, 10 Nov 2010 13:43:12 -0600 |
From: | Heath Kehoe <hkehoe AT budcat DOT com> |
User-Agent: | Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 |
MIME-Version: | 1.0 |
To: | "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com> |
Subject: | Problem with fork() in latest snapshot |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
--------------030901010509070201050208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I have ruby 1.9.2 which I built from source. It works fine in cygwin 1.7.7 and earlier, but in the current snapshot when it does a fork, the child process dies pretty much instantly. I've put together a test case (see attached) which replicates what ruby is doing so that this problem can be repro'd without needing to build ruby. It seems that the failure only happens when the fork call is in a dll, and it also seems to depend on manipulating threads in close proximity to the fork. Here's the test program under 1.7.7: $ uname -a CYGWIN_NT-6.1-WOW64 hkehoe1 1.7.7(0.230/5/3) 2010-08-31 09:58 i686 Cygwin $ ./testfork Before fork After fork pid=5060 After fork pid=0 subprocess status 0 (0x0) And here it is in the snapshot: $ uname -a CYGWIN_NT-6.1-WOW64 hkehoe1 1.7.8s(0.233/5/3) 20101102 14:03:08 i686 Cygwin $ ./testfork Before fork After fork pid=3808 subprocess status 32512 (0x7f00) Note the missing 'After fork' message from the child and the -127 exit status. An strace of testfork will reveal this error occurring shortly after the fork returns in the child: --- Process 2944, exception C0000005 at 610E4B8C (the process ID is the child's) ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ --------------030901010509070201050208 Content-Type: application/octet-stream; name="testfork.tgz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="testfork.tgz" H4sIAOT02kwAA+1YbW/aSBDOV/wrtqlS2RQCJECk0kTiGtpDDaRKSHu6XmUZ ew17GBt51yS5a/77zaxfsA0hbdXkpDuPFGLPzs7OzjzzeG1BubA9f1bbeTyp gxy1Wjv1g3ar3W7A/UGzedCQ+kh2Go1mu906OjhsgF3j8KDd3CGtR4wpkYAL wydkZzqjU4/eb3fqzQ3mkitOff4UcT2RiLj+uLt981HWeLD+7VZU/3ZL6hvN w3Z9h9QfJZqc/M/rrzBXENyZiheGPzErxJwafhmvl5+/aMrfSglBoiNKVK2j 3CnKvx10IT9Nkv4fGDNqM2dLB/ywPNT/zVX/HzUP6tj/R4etov+fQgzHeUVi EOzTG6oo5u0kUViZYVMpTUyTVCekyoEjqEVI9ZNTqVapa4wdWjUC4VXZ3JjQ 6tjgdG1g4fkimuEFAhUOGx/DX3q9fYNUPZILIh2Dkg73FQkfXPkJq0i9zPbi iKHq5qxSvwEsSgzeE+vZfuy/6sRu/lP8l/T/KsE/fY0H+r99tDr/1Q9abej/ 1mG9UfT/U4jynLmmE1iUvObCYt7+9CSlClwG2qyO+r6bM+Ns4hpOTnfLa4LN 6br22mAiq12IqU8NuY6i1Mpk4HFBPJu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DWLFvemjGrMEm0he8NfFZ J1bZzAGuBVShVkvUFl1pK+Sy/+4jYPpisMXgsvfuY+5hCGY4rMKoftkbDbqX 7wGq4QykUm0Tl64z2Nb46XwhbvMb+PEAFj4NP6bht7V7+LS0DdUbXHrh21vi c3tptz4FIoONJyNYVpELpj4J4ooLhqdn+EUyf9B7wB1KF2r45q1J/g/5bfcX zAwl6BgYC21t2wn4FJnPC0RkS+NvkbguNODqNklD2mnXhh1II4zweM+SZIgf PDW4l6bMVtEVnlSUEnZQSArYJzCElAjDaAKl5QJbCM8U1QZYS/PSGkNHc4B8 uVwOToAw4PkhJ2uyBe+wVaMgeTBe+B68zeAbjyECDqxN1PrN3o0mZ+NfxAyS u+vFp9hCCimkkEIKKaSQQgoppJBCvl3+AbIUW74AKAAA --------------030901010509070201050208 Content-Type: text/plain; charset=us-ascii -- 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 --------------030901010509070201050208--
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |