Comment 9 for bug 1768877

Pedro Linha (pedropl) wrote :

I've reinstalled ubuntu 18.04 on the same machine. Choose "C" as default locale. The only package that I've choose on installation was OpenSSH server.

Here are the commands on the first login (using a serial-over-lan terminal):

------------------------
root@knlf1:~# locale
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
root@knlf1:~# locale-gen --lang en_US
Generating locales (this might take a while)...
  en_US.UTF-8...corrupted size vs. prev_size
/usr/sbin/locale-gen: line 177: 2922 Aborted localedef $no_archive -i $input -c -f $charset $locale_alias $locale
 done
Generation complete.
root@knlf1:~#
----------------------

Debbuging a little bit I've found the specific line on locale-gen script that produces the error (localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8).

localedef has a "verbose" output. So...

----------------------

root@knlf1:~# localedef -v -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
/usr/share/i18n/locales/iso14651_t1_common:7120: LC_COLLATE: symbol `pure-ta-zh' not known
[warning] LC_NAME: field `name_gen' not defined
[verbose] LC_CTYPE: table for class "upper": 94715077278256 bytes
[verbose] LC_CTYPE: table for class "lower": 94715077281472 bytes
[verbose] LC_CTYPE: table for class "alpha": 94715077284640 bytes
[verbose] LC_CTYPE: table for class "digit": 94715077287856 bytes
[verbose] LC_CTYPE: table for class "xdigit": 94715077291072 bytes
[verbose] LC_CTYPE: table for class "space": 94715077294288 bytes
[verbose] LC_CTYPE: table for class "print": 94715077297504 bytes
[verbose] LC_CTYPE: table for class "graph": 94715077300672 bytes
[verbose] LC_CTYPE: table for class "blank": 94715077303888 bytes
[verbose] LC_CTYPE: table for class "cntrl": 94715077307104 bytes
[verbose] LC_CTYPE: table for class "punct": 94715077310320 bytes
[verbose] LC_CTYPE: table for class "alnum": 94715077313488 bytes
[verbose] LC_CTYPE: table for class "combining": 94715077316704 bytes
[verbose] LC_CTYPE: table for class "combining_level3": 94715077319920 bytes
[verbose] LC_CTYPE: table for map "toupper": 0 bytes
[verbose] LC_CTYPE: table for map "tolower": 140258418968639 bytes
[verbose] LC_CTYPE: table for map "totitle": 50331644 bytes
[verbose] LC_CTYPE: table for width: 0 bytes
root@knlf1:~#

-----------------------

Where those huge numbers came from (around 140 terabytes)???

Round 2...

Installed 17.10. Same procedure, same commands:

-----------------------

Ubuntu 17.10 knlf1 ttyS0

root@knlf1:/home/dummy# locale
LANG=C
LANGUAGE=
LC_CTYPE="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_COLLATE="C"
LC_MONETARY="C"
LC_MESSAGES="C"
LC_PAPER="C"
LC_NAME="C"
LC_ADDRESS="C"
LC_TELEPHONE="C"
LC_MEASUREMENT="C"
LC_IDENTIFICATION="C"
LC_ALL=
root@knlf1:/home/dummy# locale-gen --lang en_US
Generating locales (this might take a while)...
  en_US.UTF-8...*** Error in `localedef': corrupted size vs. prev_size: 0x00000000058c2750 ***
/usr/sbin/locale-gen: line 177: 2892 Aborted localedef $no_archive -i $input -c -f $charset $locale_alias $locale
 done
Generation complete.
root@knlf1:/home/dummy#

--------------------

Same error...

Any ideas?

Cheers!