Bug#286717: glibc: locale initialisation failure if cannot mmap locale.alias
Package: glibc
Severity: minor
Tags: l10n
If VM is limited (e.g. with ulimit -v 1800), the output of "sort" fails
the "sort -c" check if $LANG is set; the upstream coreutils maintainer
(Paul Eggert) alleges that this may be due to a glibc set-up problem or
perhaps a bug.
Paul writes:
I suspect this is a problem with your GNU C library setup, not with
"sort" per se. glibc attempts to mmap the locale-archive file as a
performance speedup, and falls back on the locale.alias file if the
locale-archive can't be mmapped (which in this case it can't, because
you're low on memory). Perhaps these two sources of locale information
are inconsistent on your host. Or possibly you have found a glibc bug.
Most likely you can work around the bug by setting LC_ALL="C" in your
environment
More details can be found at
http://savannah.gnu.org/bugs/?func=detailitem&item_id=11004, which is
the initial bug report against coreutils. This includes a typescript
demonstrating the problem, and strace output of both the failing case
and the case where there is no problem (i.e. where VM is not limited).
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8-1-k7-smp
Locale: LANG=en_GB.ISO-8859-15, LC_CTYPE=en_GB.ISO-8859-15 (charmap=ISO-8859-15)
Reply to: