unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Carlos O'Donell" <carlos@redhat.com>
To: "Ludovic Courtès" <ludo@gnu.org>, "Ondřej Bílka" <neleai@seznam.cz>
Cc: libc-alpha@sourceware.org, guix-devel@gnu.org
Subject: Re: [PATCH] Gracefully handle incompatible locale data
Date: Fri, 25 Sep 2015 17:20:13 -0400	[thread overview]
Message-ID: <5605BA8D.40907@redhat.com> (raw)
In-Reply-To: <87h9mjeqyy.fsf@gnu.org>

On 09/24/2015 12:12 PM, Ludovic Courtès wrote:
> Ondřej, I think we have been miscommunicating.
> 
> I noticed that a program linked against 2.21 or earlier would abort with
> an assertion failure when it stumbles upon 2.22 locale data.
> 
> All the patch tries to do is change the abort to EINVAL (and skip locale
> data) when that happens.
> 
> I’m not claiming this is perfect, and I agree with you on that point.
> I’m just saying that ignoring the faulty locale data and returning
> EINVAL (which the application can choose to take into account or not) is
> preferable to aborting.
> 
> Does that make sense?

Despite Roland saying "LGTM", I think this is not a good change.

Firstly, it's not the community consensus as Ondrej is pointing out.

https://sourceware.org/glibc/wiki/Style_and_Conventions#Error_Handling

It is a fundamental system misconfiguration issue not to have upgraded
the binary locale data from one release to another.

The community consensus was that user errors like this should fail
immediately, but in ways which the user understands the failure, and
fixes the system.

Returning an error code simply leads to the user ignoring the serious
configuration issue. Worse is that in a locale archive file we now
skip such bad binary archives (_nl_load_locale_from_archive), and
this hides the problem. Worse we might also skip locale files in
directories like /usr/lib/locale/C.utf8, which we might want to always
be loaded as a default UTF-8 locale. I'd rather see an error message
in Fedora than allow that to continue by skipping that locale with
no error given.

We should abort, but the abort error message should be much clearer
about what's going wrong. Therefore I would accept a patch that gives
a clearer error message in this case, but not one that removes the
assert.

Cheers,
Carlos.

  reply	other threads:[~2015-09-25 21:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22 15:27 [PATCH] Gracefully handle incompatible locale data Ludovic Courtès
2015-09-22 18:26 ` Roland McGrath
2015-09-22 19:18 ` Ondřej Bílka
2015-09-22 21:22   ` Ludovic Courtès
2015-09-22 21:50     ` Ondřej Bílka
2015-09-23 21:45       ` Ludovic Courtès
2015-09-24  8:27         ` Ondřej Bílka
2015-09-24 16:12           ` Ludovic Courtès
2015-09-25 21:20             ` Carlos O'Donell [this message]
2015-09-26 10:24               ` Ludovic Courtès
2015-09-28 20:54                 ` Carlos O'Donell
2015-09-29  8:08                   ` Ludovic Courtès
2015-10-08 10:31                     ` Ludovic Courtès
2015-10-13 13:30                     ` Carlos O'Donell
2015-10-13 14:45                       ` Ludovic Courtès
2015-10-28  5:38                         ` Carlos O'Donell
2015-10-13  0:49                   ` Allan McRae
2015-10-13  9:50                     ` Ludovic Courtès
2015-10-13 13:31                     ` Carlos O'Donell
2015-09-23  6:59 ` Andreas Schwab
2015-09-23  7:03   ` Andreas Schwab
2015-09-24  2:15 ` Mark H Weaver
2015-09-24 19:32   ` Ludovic Courtès
2015-10-27 15:30 ` Samuel Thibault
2015-10-27 15:57   ` Ludovic Courtès
2015-10-28  6:19   ` Carlos O'Donell

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5605BA8D.40907@redhat.com \
    --to=carlos@redhat.com \
    --cc=guix-devel@gnu.org \
    --cc=libc-alpha@sourceware.org \
    --cc=ludo@gnu.org \
    --cc=neleai@seznam.cz \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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).