From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: [ANNOUNCEMENT] Updated for 32-bit, new for 64-bit: libsigsegv-2.10-2
Date: Mon, 20 Jul 2015 11:20:00 -0000 [thread overview]
Message-ID: <20150720112049.GP3864@calimero.vinschen.de> (raw)
In-Reply-To: <20150719083756.GB19825@calimero.vinschen.de>
[-- Attachment #1: Type: text/plain, Size: 2713 bytes --]
On Jul 19 10:37, Corinna Vinschen wrote:
> On Jul 18 14:41, Eric Blake wrote:
> > On 07/18/2015 02:11 PM, Corinna Vinschen wrote:
> > > OTOH, calling certain Cygwin functions might require lots of stack.
> > > E.g. open/read/write/close requires more than 2K stack, so MINSIGSTKSZ
> > > shouldn't be too small.
> > >
> > > So, what about MINSIGSTKSZ == 8192 and SIGSTKSZ == 32768?
> > >
> > > Or MINSIGSTKSZ == 16384 and SIGSTKSZ == 65536?
> > >
> > > That could go into Cygwin 2.2.0 which I could release next week.
> >
> > Might help, but feels a little unclean. As I said, old clients of
> > libsigsegv were using the fallback definition of 16k; setting
> > MINSIGSTKSZ to 16k would let the sigaltstack() succeed where it is now
> > failing, but if cygwin ever consumes all 16k rather than the current 400
> > or so bytes, that leaves nothing for the application (normally, an
> > application only expects to use SIGSTKSZ - MINSIGSTKSZ for its own use,
> > if it uses the system-recommended sizing).
>
> Cygwin shouldn't really consume 16K stack by itself when called from the
> application. Large buffers should use the tmp_pathbuf facility throughout.
>
> But there are still functions using big stack buffers. I mention them
> here for bookkeeping as much as for information and discussion:
>
> - Debugging code in dcrt0.cc, initial_env() uses 96K stack on process
> startup. Usually disabled. Non-critical.
>
> - dll_list::alloc, called during DLL initialization uses 64K stack.
> Calling dlopen from the alternate stack would be fatal. The buffer
> is used in code called under Windows loader lock conditions, so this
> could be converted to a static buffer.
>
> - A function called error_start_init uses 32K of stack and is called
> if the env var CYGWIN is set to "error_init:...". That's very unlikely
> from a SEGV handler. Not nice, but probably non-critical.
>
> - pinfo::status_exit is called when a process exits due to a signal
> from Windows. This usually shouldn't happen inside the signal
> handler, but it might. pinfo::status_exit uses a 32K buffer.
>
> - Stracing a process ends up using >48K of stack.
>
> That means even the current 32K are not quite sufficient, though, only
> in unlikely border cases, apparently.
>
> Anyway, I plan to change this in the next few days. Given this, I'll
> set MINSIGSTKSZ to 8K and SIGSTKSZ to 32K in 2.2.
I uploaded snapshots as well as a 2.2.0-0.1 test release. Please
give it a try.
Thanks,
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-07-20 11:20 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <announce.55A98E29.4090001@redhat.com>
2015-07-18 18:18 ` Eric Blake
2015-07-18 20:11 ` Corinna Vinschen
2015-07-18 20:41 ` Eric Blake
2015-07-19 8:38 ` Corinna Vinschen
2015-07-20 11:20 ` Corinna Vinschen [this message]
2015-07-20 13:03 ` Ken Brown
2015-07-20 15:18 ` Corinna Vinschen
2015-07-21 20:06 ` Ken Brown
2015-07-21 20:25 ` Achim Gratz
2015-07-21 20:47 ` Ken Brown
2015-07-22 8:16 ` Corinna Vinschen
2015-07-22 12:10 ` Ken Brown
2015-07-22 16:22 ` Achim Gratz
2015-07-26 17:55 ` Achim Gratz
2015-07-26 21:09 ` Ken Brown
2015-07-20 18:19 ` Eric Blake
2015-07-20 19:02 ` Corinna Vinschen
2015-07-19 11:29 ` Ken Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150720112049.GP3864@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).