public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: libc-alpha@sourceware.org
Subject: RFC: tunables failure indications...
Date: Thu, 05 Dec 2019 22:44:00 -0000	[thread overview]
Message-ID: <xn8snqv1db.fsf@greed.delorie.com> (raw)


Re: https://sourceware.org/bugzilla/show_bug.cgi?id=25035
"sbrk() failure handled poorly in tunables_strdup"

The current failure mode for tunables is: if we can't allocate memory,
we delete the tunables env var and pretend it didn't exist, without
telling the user anything happened.

I think we should do better, but I don't know what.

IMHO tunables are "hints" but there should be *some* feedback when a
tunable can't be honored because of internal failures (vs tunables
that don't apply to the current arch, etc).

In the BZ noted above, where *sbrk* fails, I'm inclined to just
SIGSEGV because... well... *sbrk* just failed at the start of a
program.  Something has gone horribly wrong, even if the program
continues to run normally after that (it happens in our own testsuite
sometimes).

The helper functions in malloc return error codes for invalid values,
which the tunables harness completely ignores.  Not even a printf.

So... what is a reasonable thing for the user to expect, when a
tunable they specify cannot be honored?

             reply	other threads:[~2019-12-05 22:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 22:44 DJ Delorie [this message]
2019-12-06  8:33 ` Siddhesh Poyarekar
2019-12-10 16:26   ` Carlos O'Donell
2019-12-10 16:36     ` Siddhesh Poyarekar
2019-12-11 22:01       ` DJ Delorie
2019-12-12  3:50         ` Siddhesh Poyarekar
2019-12-12  4:03           ` DJ Delorie
2019-12-12  4:08             ` Siddhesh Poyarekar
2019-12-12 17:51               ` Carlos O'Donell
2019-12-13 18:48                 ` DJ Delorie
2019-12-13 20:14                   ` Carlos O'Donell
2019-12-13 20:36                     ` DJ Delorie
2019-12-13 20:41                       ` Carlos O'Donell
2019-12-16 22:16                         ` DJ Delorie

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=xn8snqv1db.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=libc-alpha@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).