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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; q=dns; s= default; b=cMGpMbu0vJY3NOFfiKL2YCaw16RajViXFfOJMb+v4wP6KYIHkP1BL YT3q3iURmTVRuGbyou5Dy0MJv+21GaSwxpziFI9+vMDO7dKX3bx/xo/xyDfGeHtd CR1TTGtn64SrgyqkjfkEVhsQ8dwyhqhZ0apHFywOByWJl6PpPaLzCU= 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:date:from:to:subject:message-id:reply-to :references:mime-version:content-type:in-reply-to; s=default; bh=bzWjdlY8oQ0KHRqCdBra0hFXcDY=; b=YBQymzmkldSLOB6ZWM9th/qnFtTF DPg/qmM4xRg0M7Ngi7q4Cw5eSrdnP5vu3HwJTfkenSauRqBHWBfnPLPiZj2C3BRt xZspP+5BgklWMDv1bX6qcXgA81mUy0HOoPFJN13Pqf3IPb37BVPu4sBPesR7vcO9 WXBp6UX4DtZBdsE= 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=-5.4 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY autolearn=no version=3.3.2 X-HELO: calimero.vinschen.de Date: Wed, 1 Jul 2015 12:47:48 +0200 From: Corinna Vinschen To: cygwin AT cygwin DOT com Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.1.0-0.1 Message-ID: <20150701104748.GH2918@calimero.vinschen.de> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <558D3F4C DOT 6090207 AT cornell DOT edu> <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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="fCcDWlUEdh43YKr8" Content-Disposition: inline In-Reply-To: <5592F86E.8070803@cornell.edu> User-Agent: Mutt/1.5.23 (2014-03-12) --fCcDWlUEdh43YKr8 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 6/26/2015 4:05 PM, Corinna Vinschen wrote: > >>>>As for getrlimit(RLIMIT_STACK), I changed that as outlined in my form= er > >>>>mail in git. On second thought, I also changed the values of > >>>>MINSIGSTKSZ and SIGSTKSZ. Instead of 2K and 8K, they are now defined > >>>>as 32K and 64K. The reason is that we then have enough space on the > >>>>alternate stack to install a _cygtls area, should the need arise. > >>>> > >>>>I created new developer snapshots on https://cygwin.com/snapshots/ > >>>>Please give them a try. > >>>> > >>>>Remember to tweak STACK_DANGER_ZONE. You'll have to rebuild emacs > >>>>anyway due to the change to [MIN]SIGSTKSZ. > >>> > >>>Hi Corinna and Ben, > >>> > >>>It works now, in the sense that emacs doesn't crash, and it produces t= he > >>>message "Re-entering top level after C stack overflow". I tested both > >>>32-bit and 64-bit Cygwin. My test consisted of evaluating the followi= ng in > >>>the emacs *scratch* buffer: > >>> > >>>(setq max-specpdl-size 83200000 > >>> max-lisp-eval-depth 640000) > >>>(defun foo () (foo)) > >>>(foo) > >>> > >>>(The 'setq' is to override emacs's built-in protection against too-dee= ply > >>>nested lisp function calls.) > >>> > >>>On the other hand, emacs doesn't really make a full recovery. For exa= mple, > >>>if I try to call a subprocess (e.g., 'C-x d' to list a directory), I g= et a > >>>fork error: > >>> > >>>Debugger entered--Lisp error: (file-error "Doing vfork" "Resource > >>>temporarily unavailable") > >> > >>The problem is probably that there are still resources in use which > >>didn't get free'd. I'll check next week if I can do anything about it. > >>Ideally with a simple testcase than emacs :} > > > >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. >=20 > 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. Corinna --=20 Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat --fCcDWlUEdh43YKr8 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJVk8VUAAoJEPU2Bp2uRE+gS3AP/1mzPGvAEHcgKrg8mTkj2oVe QlUo0x+KP1JTKRrAk8wsnwPZqnBBH7tvD2FUgY/36K9pcwWdTpUygphVCSpFwwHE kjjDhXw/j/Yej4e6s/nuzEo32DArc5K2ZuI305VGGg/avEyhILu3pASGufcETwm9 G1cjWpj3p9Qq1XY2ftHzRjj0N35XBvUWt0JxR+f+W8QEOkGuiX8WTZ5KgmspBnmW 2M701oNFK1erqev9BawXONRJG3i6qUY5vGw6fuHyGf2URK9vhM6syP1sPq+jPO0f gyh0BfctTEMZX96mKtxLJlklnaR9g03ANW9ZtrcZv3TCu5naiMPwrVDg7YRjzt7C OQR4qctZJ0KcOZYJ2Ig0+Vt33OMa5FmbA2iIcoGBTp7ZmutIay/pCa1aS58MHSg8 7oILIHkS3wsHrdgHWI6VCp8MY7wLBlmACHOd2ebZkbSYfKnD6kblhsmMQS1dwcNy mnBU8bkTmLa6pRUqnzig8jbL12lUrClrMpaEsgqqQcwYYOVw4gmu1agXh7f+vLxE qhwfcrPAe/jk0duYKhJhW+1XPpU9+ntAe7g8/Jr3WQdE9l5kc2gtMz7QQRTkEdAl bQM+juRtjt9Ae+3oJTDcP+wS1dT6rVtocTl/y8fgv21O1mV9KeQ2YIvJZs2l9fvc bXgyZPQdpDkHim/4r7uF =fhjn -----END PGP SIGNATURE----- --fCcDWlUEdh43YKr8--