delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2015/06/30/15:56:08

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=VhuoE9NSsPyWchJ+ktf01ilnsMtgWF6dFNzCmwr4HJoCS5fHl0HbN
xh/0nUyHkpSDKokcTokFzzCC/KzJ+cHx7IhsL5Qv/OR86wuCntVtaYYL9fPl04DC
sheuaGmev8P67CY+37EKDxjHshcd8UA225BsOtvFM4tE0v4i3APHN0=
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=pbnfvxE6RTC9cABgrBviqv2Jm7g=; b=IWWugWcamt7ZDfA436XQE8Efzl1+
fE/oDtfKpFoJAuEl/r265kJ9Db36FwYnQYj2+NUOBkxqgkv3By0wq06DXPkEgmuC
WUSpd2d/Cd9vCz0YbiyMWS5HwSKDSUHRCg9ll4guo2gbfcOqZqO8KOuiOTNMMgjz
osVpwvcgke0L1SA=
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
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: Tue, 30 Jun 2015 21:55:47 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com, Ben Woodard <woodard AT redhat DOT com>
Subject: Re: [ANNOUNCEMENT] TEST RELEASE: Cygwin 2.1.0-0.1
Message-ID: <20150630195547.GG2918@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, Ben Woodard <woodard AT redhat DOT com>
References: <20150622110835 DOT GE28301 AT calimero DOT vinschen DOT de> <20150626111249 DOT GS31223 AT calimero DOT vinschen DOT de> <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>
MIME-Version: 1.0
In-Reply-To: <20150627145259.GB23036@calimero.vinschen.de>
User-Agent: Mutt/1.5.23 (2014-03-12)

--/aVve/J9H4Wl5yVO
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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 former
> > >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.
> >=20
> > Hi Corinna and Ben,
> >=20
> > It works now, in the sense that emacs doesn't crash, and it produces the
> > message "Re-entering top level after C stack overflow".  I tested both
> > 32-bit and 64-bit Cygwin.  My test consisted of evaluating the followin=
g in
> > the emacs *scratch* buffer:
> >=20
> > (setq max-specpdl-size 83200000
> >       max-lisp-eval-depth 640000)
> > (defun foo () (foo))
> > (foo)
> >=20
> > (The 'setq' is to override emacs's built-in protection against too-deep=
ly
> > nested lisp function calls.)
> >=20
> > On the other hand, emacs doesn't really make a full recovery.  For exam=
ple,
> > if I try to call a subprocess (e.g., 'C-x d' to list a directory), I ge=
t a
> > fork error:
> >=20
> > Debugger entered--Lisp error: (file-error "Doing vfork" "Resource
> > temporarily unavailable")
>=20
> 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=20
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.


Corinna

--=20
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

--/aVve/J9H4Wl5yVO
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJVkvRDAAoJEPU2Bp2uRE+gIbMP/iH+yjawUup8HLW69rBJAaaC
o5tdVoWRVPqsaqWUpbgloiKUWNo04YHLADlBP4Mz95jNEI/2Y2v55/qBjlTHK9HB
bCW6UpYgzmQpkSloYi+CilntwPD/TM/iFU7854QGspk8AImTigZXt++1PQ/WUcKR
8AHcpH8xpchfkJycjE3Mnin6Nl7a644Rbsx1ge6BEw/k8kkemzMgKAuwaRwpncrK
e3S0KO6UHT0PBkosVF8cWp///3JVK2+YIYCDP731X11FDKNQWxDlVOK1aKg8/OGm
q/Eog/yM+njdwf5CkU1REvm99rJ7WhgmwG74gT3wsvi2uc0rpW5zItCC6eI12xQS
mHn3WwBMngyK0QAThX9daGpSPCAbquj/t1DqMDhUHp6FgAMSW7AUKaapGsNoK/7H
Zj+xr0so+JodURtvDbTe53hFSxhSp9RjRucukTtaBvCeiWby0rpa7LFjPtVmF1F6
FxrtYQvghfwjrgqBtJZmW348Il0f77zebY59HV+OQIbwWfV88DSDrhlCwEim+205
VghcoNYjT/SMSguR2N3vsppaBPRRLb0ASUiHxiAGMQ/EP9RggawlXC9nBmz9xqOb
bDhI8hPNp/b10KPU4O7WO2kUoYaYDqHqPbN8RJo6XpumTX8s3nNrzy2NbSM1hk9u
dqy0CamzkRcfOpS6kJLK
=Z2SB
-----END PGP SIGNATURE-----

--/aVve/J9H4Wl5yVO--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019