public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "carlos at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/27581] Threaded program crashes under ulimit -s unlimited
Date: Mon, 15 Mar 2021 21:45:15 +0000	[thread overview]
Message-ID: <bug-27581-131-DF0yqiCSvV@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-27581-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=27581

Carlos O'Donell <carlos at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |carlos at redhat dot com

--- Comment #2 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Florian Weimer from comment #1)
> Once you have multiple threads, there is really no such thing as an
> unlimited stack anymore for conceptual reasons, so glibc just picks a 2 MiB
> default and applies it to all the created stacks.

Right the relevant code is in nptl/nptl-init.c
(__pthread_initialize_minimal_internal).

Users still see these values of conceptually muddled, and it's hard to explain
the distinction between executable stack and the relation to thread stack
because there appears to be one but there isn't, there are just defaults being
adjusted to be heuristic matches.

In the case you need more control we provide pthread_setattr_default_np() that
allows you to set a larger default stack size for all threads by default. This
way you can independently control the stack size of all threads and the stack
size of the main program.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-03-15 21:45 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-15 15:46 [Bug libc/27581] New: " jdelvare at suse dot de
2021-03-15 15:54 ` [Bug libc/27581] " fweimer at redhat dot com
2021-03-15 19:24 ` hpj at urpla dot net
2021-03-15 21:45 ` carlos at redhat dot com [this message]
2021-03-19 10:56 ` jdelvare at suse dot de

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=bug-27581-131-DF0yqiCSvV@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).