X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; q=dns; s=default; b=q+hrjXXBPwtpP0LIBd/bHNICXLDeILJhV5Pq0bRDGre yflUdVi0zVWaxL3sG4PlxH5VoLtDGXK6Y9XU1ga4mJG6keSp+8pZhE3PriaBsMKX DP4mp1NosVwJ2hN3YcvIQSIysOyENr4V6Sz5vZveRhzRuxcDHMAxvxNtlJeGcPYc = DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:message-id:date:from:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; s=default; bh=e+IcVg1BQHmwW7G5+Puxfcs0ca0=; b=Cg+stC+ztZfoxkovV Ty0vRFPawIljx7lkJYXNM6h54tLFkdUBsfY6RzBR2KzX+N4h152gRgSirrIxBVR6 Re6xbtaY/6XF/nicQP6m1kIAPr1N27h8Mvx/uQLHIPoK/udVOWovDa1UpvyekOqa GeaL88vviM+aJNePTB9N4tNed8= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: limerock02.mail.cornell.edu X-CornellRouted: This message has been Routed already. Message-ID: <55949D9A.7060900@cornell.edu> Date: Wed, 01 Jul 2015 22:10:34 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.1.0-0.1 References: <20150626141437 DOT GV31223 AT calimero DOT vinschen DOT de> <558D62D7 DOT 8010709 AT cornell DOT edu> <20150626153647 DOT GX31223 AT calimero DOT vinschen DOT de> <558D8409 DOT 2000400 AT cornell DOT edu> <20150626200512 DOT GA30636 AT calimero DOT vinschen DOT de> <558DD1F3 DOT 4010301 AT cornell DOT edu> <20150627145259 DOT GB23036 AT calimero DOT vinschen DOT de> <20150630195547 DOT GG2918 AT calimero DOT vinschen DOT de> <5592F86E DOT 8070803 AT cornell DOT edu> <20150701104748 DOT GH2918 AT calimero DOT vinschen DOT de> <20150701135749 DOT GN2918 AT calimero DOT vinschen DOT de> <559449AF DOT 9010804 AT cornell DOT edu> In-Reply-To: <559449AF.9010804@cornell.edu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes On 7/1/2015 4:12 PM, Ken Brown wrote: > On 7/1/2015 9:57 AM, Corinna Vinschen wrote: >> On Jul 1 12:47, Corinna Vinschen wrote: >>> On Jun 30 16:13, Ken Brown wrote: >>>> On 6/30/2015 3:55 PM, Corinna Vinschen wrote: >>>>> On Jun 27 16:52, Corinna Vinschen wrote: >>>>>> On Jun 26 18:28, Ken Brown wrote: >>>>>>> On the other hand, emacs doesn't really make a full recovery. For example, >>>>>>> if I try to call a subprocess (e.g., 'C-x d' to list a directory), I get a >>>>>>> fork error: >>>>>>> >>>>>>> Debugger entered--Lisp error: (file-error "Doing vfork" "Resource >>>>>>> temporarily unavailable") >>>>>> [...] >>>>> Just FYI, I don't know yet what happens exactly, but this has nothing >>>>> to do with the alternate stack. The child process fails with a status >>>>> code 0xC00000FD, STATUS_STACK_OVERFLOW. Which is kind of weird, given >>>>> that the stack overflow has been averted by calling siglongjmp. >>>>> >>>>> I have a hunch. The stack state in the parent is so that TEB::StackLimit >>>>> points into the topmost guard area which, when poked into, triggers the >>>>> stack overflow exception. When forking, Cygwin performs exactly this: >>>>> It pokes into the stack to push the guard page out of the way, thus >>>>> causing the stack memory to be commited, which in turn allows to copy >>>>> the stack content from parent to child. >>>>> >>>>> Ok, I'm not sure if I can debug this soon, but at leats it's not >>>>> related to sigaltstack handling nor is it a regression. >>>> >>>> Thanks for the info, that's good to know. Just out of curiosity, were you >>>> able to modify your testcase for this, or did you test with emacs? >>> >>> I just added a fork call to my testcase right after the last printf. >> >> My hunch was correct, apparently. I changed the way the stack info >> is set up for the child so only the actually used part of the stack is >> prepared for the stack copy in the child. This not only avoids the >> stack overflow in the child, it should shave a few nanoseconds from >> the time a fork takes ;) >> >> I uploaded new developer snapshots to https://cygwin.com/snapshots/ and >> I'm just building and uploading a new test release. >> >> Please give it another try. > > That fixes it. Thanks! I may have spoken too soon. As I repeat the experiment on a different computer, with a build from a slightly different snapshot of the emacs trunk, emacs crashes when I type 'C-x d' with the following stack dump: Stack trace: Frame Function Args 00100A3E240 00180071CC3 (00000829630, 000008296D0, 00000000000, 0000082CE00) 00030000002 001800732BE (00000000000, 00000000002, 00100A48C80, 00000000002) 00000000000 00000006B40 (00000000002, 00100A48C80, 00000000002, 00100A48768) 00000000000 21000000003 (00000000002, 00100A48C80, 00000000002, 00100A48768) End of stack trace $ addr2line 00180071CC3 -e /usr/lib/debug/usr/bin/cygwin1.dbg /usr/src/debug/cygwin-2.1.0-0.3/winsup/cygwin/exception.h:175 $ addr2line 001800732BE -e /usr/lib/debug/usr/bin/cygwin1.dbg /usr/src/debug/cygwin-2.1.0-0.3/winsup/cygwin/exceptions.cc:1639 The next two days are pretty busy for me, but I'll try to provide further information as soon as I have a chance. Ken -- 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