You are not logged in.

#1 2016-08-05 21:55:44

alx741
Member
From: Cuenca, Ecuador
Registered: 2016-04-18
Posts: 6
Website

locale-gen gives segmentation fault

Hello everyone,

Today I did `sudo pacman -Syyu`, one of the updated packages is 'glibc (2.24-1)'. Then I restarted the computer and tmux does not longer work, it gives:

invalid LC_ALL, LC_CTYPE or LANG

`locale` gives:

locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
...

Trying `sudo locale-gen` gives a segfault:

Generating locales...
   en_US.UTF-8.../bin/locale-gen: line 41: 2147 Segmentation fault   localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale

Tried `sudo pacman -S glibc` to reinstall glibc with no results.
Tried to comment out everything in /etc/locale.conf but 'en_US.UTF-8' again with no results.

Kernel: 4.6.4-1-ARCH  x86_64 GNU/Linux

Also with the update Firefox 48 hangs when reproducing youtube videos in case that might me relevant/related.

If this problem is related to glibc 2.24-1 I think I can't be the only one in trouble.

Last edited by alx741 (2016-08-05 23:38:57)


Daniel Campoverde Carrión [alx741]
GPG key id: 12622B78 (keys.gnupg.net)
http://silly-bytes.blogspot.com/

Offline

#2 2016-08-05 23:13:07

dakota
Member
Registered: 2016-05-20
Posts: 273

Re: locale-gen gives segmentation fault

I don't know what the answer is, but could this be related? (from today's pacman log)

[2016-08-05 15:52] [ALPM] warning: /etc/locale.gen installed as /etc/locale.gen.pacnew

Last edited by dakota (2016-08-05 23:14:35)


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#3 2016-08-05 23:25:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: locale-gen gives segmentation fault

@Dakota shouldn't be, and there's no segfault here. @alx741 Do you have an intel cpu, and did you apply the microcode updates?

Offline

#4 2016-08-05 23:34:00

alx741
Member
From: Cuenca, Ecuador
Registered: 2016-04-18
Posts: 6
Website

Re: locale-gen gives segmentation fault

@V1del  I have an Intel code i3-2328M, but I haven't applied any microcode update (don't even know if there is any for this particular chip).

Edit:

`dmesg | grep microcode` gives:

442:[    0.641370] microcode: CPU0 sig=0x206a7, pf=0x10, revision=0x28
443:[    0.641394] microcode: CPU1 sig=0x206a7, pf=0x10, revision=0x28
444:[    0.641419] microcode: CPU2 sig=0x206a7, pf=0x10, revision=0x28
445:[    0.641440] microcode: CPU3 sig=0x206a7, pf=0x10, revision=0x28
446:[    0.641552] microcode: Microcode Update Driver: v2.01 <tigran@aivazian.fsnet.co.uk>, Peter Oruba

So apparently I got some updates, how can this affect the locales?

Edit 2:

hhmmm actually reading the wiki entry about this (https://wiki.archlinux.org/index.php/microcode), I have not update my processor microcode, which is nice because it would be pretty scary that pacman could trigger microcode updates without the user awareness.

Last edited by alx741 (2016-08-05 23:43:09)


Daniel Campoverde Carrión [alx741]
GPG key id: 12622B78 (keys.gnupg.net)
http://silly-bytes.blogspot.com/

Offline

#5 2016-08-06 02:11:03

mpan
Member
Registered: 2012-08-01
Posts: 1,188
Website

Re: locale-gen gives segmentation fault

@alx741:
Make sure your locale configuration is fine, according to the Wiki. Ensure yourself that neither system-wide locale configuration files and profile files, nor your per-user ones set some strange values. Making temporarily a new user and checking if locale works for is a good test too.

If your configuration is right:

$ which locale-gen
$ which localedef
$ pacman -Qo /usr/lib/locale
$ pacman -Qo /usr/bin/locale-gen
$ pacman -Qo /usr/bin/localedef
$ sha1sum /usr/bin/locale-gen

Should give:

/usr/bin/locale-gen
/usr/bin/localedef
/usr/lib/locale/ is owned by glibc 2.24-1
/usr/bin/locale-gen is owned by glibc 2.24-1
/usr/bin/localedef is owned by glibc 2.24-1
6be06024b1ab1261ff60b039c69fe66a7c5872fc  /usr/bin/locale-gen

If not, pacman -Syu.

If that doesn’t help, backup and remove /usr/lib/locale/locale-archive and try locale-gen. If this doesn’t help, restore the backed-up file. Otherwise it’s fixed.

If not yet fixed, backup and remove /usr/lib/locale/locale-archive, and try calling localedef directly:

# localedef -i en_US -c -f UTF-8 en_US.UTF-8

Restore the backed-up locale-archive (independent on the result of the test) and report if localedef itself works or not.

Last edited by mpan (2016-08-06 02:11:53)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#6 2016-08-06 02:49:00

alx741
Member
From: Cuenca, Ecuador
Registered: 2016-04-18
Posts: 6
Website

Re: locale-gen gives segmentation fault

@mpan thank you for such complete response. Here are the results:

The configuration looks good, the files you mentioned correspond to the right package (glibc 2.24-1) and the SHA1 of locale-gen is correct.

Removing 'locale-archive' and running locale-gen gives the same segmentation fault and running 'localedef -i en_US -c -f UTF-8 en_US.UTF-8' alone to generate the 'locale-archive' does segfault as well:

$ sudo localedef -i en_US -c -f UTF-8 en_US.UTF-8

zsh: segmentation fault  sudo localedef -i en_US -c -f UTF-8 en_US.UTF-8

Daniel Campoverde Carrión [alx741]
GPG key id: 12622B78 (keys.gnupg.net)
http://silly-bytes.blogspot.com/

Offline

#7 2016-08-06 09:35:01

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: locale-gen gives segmentation fault

Are more details of the segmentation fault available in a coredump? (man coredumpctl)  Might also be a zsh quirk, what happens if you try in bash?

Offline

#8 2016-08-06 15:56:29

alx741
Member
From: Cuenca, Ecuador
Registered: 2016-04-18
Posts: 6
Website

Re: locale-gen gives segmentation fault

Well, doing  `coredumpctl dump`

gives:

           PID: 6459 (localedef)
           UID: 0 (root)
           GID: 0 (root)
        Signal: 11 (SEGV)
     Timestamp: Sat 2016-08-06 10:44:18 ECT (5min ago)
  Command Line: localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
    Executable: /usr/bin/localedef
 Control Group: /user.slice/user-1000.slice/session-c1.scope
          Unit: session-c1.scope
         Slice: user-1000.slice
       Session: c1
     Owner UID: 1000 (alx)
       Boot ID: f87a32753ae54763bb5d7ea1913775f8
    Machine ID: d78ec15989a54707b303ec1357cda7e5
      Hostname: amy
      Coredump: /var/lib/systemd/coredump/core.localedef.0.f87a32753ae54763bb5d7ea1913775f8.6459.1470498258000000000000.lz4
       Message: Process 6459 (localedef) of user 0 dumped core.

                Stack trace of thread 6459:
                #0  0x00007f35eb4d3c0f execvpe (libc.so.6)
                #1  0x00007f35eb4f5663 __spawni_child (libc.so.6)
                #2  0x00007f35eb50381f __clone (libc.so.6)

                Stack trace of thread 6458:
                #0  0x00007f35eb5037f1 __clone (libc.so.6)
Refusing to dump core to tty.

and GDB (coredumpctl gdb) says that

warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
Core was generated by `localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f35eb4d3c0f in execvpe () from /usr/lib/libc.so.6
[Current thread is 1 (LWP 6459)]

So apparently it tries to execute something [execvpe()] and fails, but can't really tell why. I guess I'll try to take a look at the code and see what it's doing right there.

Last edited by alx741 (2016-08-06 15:57:25)


Daniel Campoverde Carrión [alx741]
GPG key id: 12622B78 (keys.gnupg.net)
http://silly-bytes.blogspot.com/

Offline

#9 2016-08-12 22:02:07

rafaeltp
Member
Registered: 2016-08-12
Posts: 1

Re: locale-gen gives segmentation fault

Did you find a solution? I am having the same problem with glibc 2.24-2, including firefox, google-chrome (AUR) and chromium hanging.

I was not able to fix it, but downgraded to glibc to 2.23-5 and the problem is gone (so it seems  like an issue is 2.24-1+).
BTW, I am on a x86_64, with 4.6.4-1-ARCH kernel if that matters.

Offline

#10 2016-08-12 23:45:12

alx741
Member
From: Cuenca, Ecuador
Registered: 2016-04-18
Posts: 6
Website

Re: locale-gen gives segmentation fault

I didn't downgrade but stick to the current version and re-generated my locales using the instalation cd by mounting my root partition on /mnt , then arch-chroot /mnt and locale-gen.

Then I just updated again and and Firefox seems to be more stable now.

I'm hopping the problem will be gone in the next glibc update but i'll keep a backup of /usr/lib/locale/locale-archive in my home directory just in case the next update remove my locales again.


Daniel Campoverde Carrión [alx741]
GPG key id: 12622B78 (keys.gnupg.net)
http://silly-bytes.blogspot.com/

Offline

Board footer

Powered by FluxBB