gnome-control-center.real crashed with SIGSEGV in g_utf8_validate()

Bug #1556684 reported by Wise Melon on 2016-03-13
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Ubuntu GNOME
Low
Unassigned
accountsservice (Ubuntu)
Low
Gunnar Hjalmarsson
gnome-control-center (Ubuntu)
High
Unassigned

Bug Description

I wanted to install Japanese through the gnome-control-center, so I opened it, went to the "Region & Language" section, clicked "Language", searched for "Japanese", when I found it I clicked on it (a tick appeared next to it), and finally I clicked "Done". Now what then should have happened is it should have asked me if I wanted to install the language packs it would then present to me and I would be able to continue with the installation... What instead happened was it hanged for a while and then finally outputted in Terminal:

    (gnome-control-center.real:1726): common-cc-panel-WARNING **: Language ja_JP.UTF-8 not installed, trying to intall it
    Segmentation fault (core dumped)

The full output in Terminal was:

    ** (gnome-control-center.real:1726): WARNING **: Ignoring launcher landscape-client-settings (missing desktop file)

    ** (gnome-control-center.real:1726): WARNING **: Ignoring launcher language-selector (missing desktop file)

    ** (gnome-control-center.real:1726): WARNING **: Ignoring launcher ubuntuone-installer (missing desktop file)

    (gnome-control-center.real:1726): common-cc-panel-WARNING **: Couldn't get LANG locale -- Copying interrupted

    (gnome-control-center.real:1726): GnomeDesktop-CRITICAL **: gnome_get_language_from_locale: assertion '*locale != '\0'' failed

    (gnome-control-center.real:1726): GnomeDesktop-CRITICAL **: gnome_get_country_from_locale: assertion '*locale != '\0'' failed

    (gnome-control-center.real:1726): common-cc-panel-WARNING **: Couldn't get LANG locale -- Copying interrupted

    (gnome-control-center.real:1726): GnomeDesktop-CRITICAL **: gnome_get_language_from_locale: assertion '*locale != '\0'' failed

    (gnome-control-center.real:1726): common-cc-panel-WARNING **: Language ja_JP.UTF-8 not installed, trying to intall it
    Segmentation fault (core dumped)

I have tested this bug and it is present in Ubuntu GNOME 15.10 with GNOME 3.18 and 16.04 with GNOME 3.19 VMs, however I cannot reproduce it on the host (15.10 with GNOME 3.18).

ProblemType: Crash
DistroRelease: Ubuntu 16.04
Package: gnome-control-center 1:3.19.90-0ubuntu1~xenial1 [origin: LP-PPA-gnome3-team-gnome3-staging]
ProcVersionSignature: Ubuntu 4.4.0-12.28-generic 4.4.4
Uname: Linux 4.4.0-12-generic i686
ApportVersion: 2.20-0ubuntu3
Architecture: i386
CrashCounter: 1
CurrentDesktop: GNOME
Date: Sun Mar 13 20:45:54 2016
ExecutablePath: /usr/bin/gnome-control-center.real
InstallationDate: Installed on 2016-03-04 (9 days ago)
InstallationMedia: Ubuntu-GNOME 16.04 LTS "Xenial Xerus" - Alpha i386 (20160225.1)
ProcCmdline: /usr/bin/gnome-control-center.real
SegvAnalysis:
 Segfault happened at: 0xb5b30c10 <g_utf8_validate+256>: movzbl (%ebx),%eax
 PC (0xb5b30c10) ok
 source "(%ebx)" (0x13e9c381) not located in a known VMA region (needed readable region)!
 destination "%eax" ok
SegvReason: reading unknown VMA
Signal: 11
SourcePackage: gnome-control-center
StacktraceTop:
 g_utf8_validate () from /lib/i386-linux-gnu/libglib-2.0.so.0
 g_variant_new_string () from /lib/i386-linux-gnu/libglib-2.0.so.0
 g_variant_new_strv () from /lib/i386-linux-gnu/libglib-2.0.so.0
 ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
 ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
Title: gnome-control-center.real crashed with SIGSEGV in g_utf8_validate()
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

tags: removed: need-i386-retrace
Tim Lunn (darkxst) on 2016-03-13
Changed in ubuntu-gnome:
milestone: none → xenial-ppa
milestone: xenial-ppa → xenial
Tim Lunn (darkxst) wrote :

This looks like a language-selector bug

`/usr/share/language-tools/language2locale ja_JP` does not return a valid locale

affects: gnome-control-center (Ubuntu) → language-selector (Ubuntu)
Tim Lunn (darkxst) wrote :

Also language-options returns just "ja" for Japanese, so that would explain the continual not installed messages in gnome-control-center although that would be harmless.

information type: Private → Public
Gunnar Hjalmarsson (gunnarhj) wrote :

I think the language2locale script does the right thing:

$ /usr/share/language-tools/language2locale ja_JP
ja_JP.UTF-8
$ /usr/share/language-tools/language2locale ja
ja_JP.UTF-8
$

Two thoughts (haven't looked at the g-c-c code at this time):

* If the locale has not (yet) been generated, i.e. is not included in a 'locale -a' output, language2locale will just return a newline. Can it be that the script is called prematurely?

* Can it possibly be a "UTF-8" vs. "utf8" confusion?

Tim Lunn (darkxst) wrote :

I have found a couple of minor bugs that might help, will upload to a ppa later

Tim Lunn (darkxst) wrote :

ok, I have uploaded a gnome-control-center to ppa:darkxst/langpacks that should fix this, and a few other issues

Tim Lunn (darkxst) wrote :

debdiff for reference

I will upload once tested more.

Tim Lunn (darkxst) wrote :

Gunnar, part of this comes down to confusion between language vs locale, sometime the locale gets stuffed into language var and passed to language2locale

The following returns a blank line also
/usr/share/language-tools/language2locale ja_JP.UTF-8

could it instead just return the inputted locale?

tags: added: patch
Gunnar Hjalmarsson (gunnarhj) wrote :

On 2016-03-16 08:29, Tim wrote:
> could it instead just return the inputted locale?

Yes, it would be an easy fix, and wouldn't hurt anywhere else AFAICT. Would the change help in 16.04 (i.e. are we in a hurry)?

affects: language-selector (Ubuntu) → accountsservice (Ubuntu)
Tim Lunn (darkxst) wrote :

well I fixed the two places that I found causing warnings, but maybe there are more in the less utilised code paths. Though pretty sure I squished the one that was causing the issues (when accountservice didnt yet have a language registered)

Gunnar Hjalmarsson (gunnarhj) wrote :

Ok, as a safety measure I just uploaded a change which in effect is what you asked for.

Changed in accountsservice (Ubuntu):
assignee: nobody → Gunnar Hjalmarsson (gunnarhj)
importance: Undecided → Low
status: New → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package accountsservice - 0.6.40-2ubuntu8

---------------
accountsservice (0.6.40-2ubuntu8) xenial; urgency=medium

  * debian/patches/0009-language-tools.patch:
    - Make the language2locale script return a locale name also when
      the argument is a complete locale name including codeset
      (LP: #1556684).

 -- Gunnar Hjalmarsson <email address hidden> Wed, 16 Mar 2016 12:42:00 +0100

Changed in accountsservice (Ubuntu):
status: Fix Committed → Fix Released

I have tested your fix and I still get this as the output but no Japanese install:

    ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher gufw (missing desktop file)

    ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher landscape-client-settings (missing desktop file)

    ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher language-selector (missing desktop file)

    ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher ubuntuone-installer (missing desktop file)

    (gnome-control-center.real:3528): common-cc-panel-WARNING **: Language ja_JP.UTF-8 not installed, trying to intall it
    Segmentation fault (core dumped)

On Thu, Mar 17, 2016, at 02:27 AM, Nikita Yerenkov-Scott wrote:
> I have tested your fix and I still get this as the output but no
> Japanese install:
>
> ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher
> gufw (missing desktop file)
>
> ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher
> landscape-client-settings (missing desktop file)
>
> ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher
> language-selector (missing desktop file)
>
> ** (gnome-control-center.real:3528): WARNING **: Ignoring launcher
> ubuntuone-installer (missing desktop file)
>
> (gnome-control-center.real:3528): common-cc-panel-WARNING **:
> Language ja_JP.UTF-8 not installed, trying to intall it
> Segmentation fault (core dumped)
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1556684
>
> Title:
> gnome-control-center.real crashed with SIGSEGV in g_utf8_validate()
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu-gnome/+bug/1556684/+subscriptions

You still have the old gnomes controls center, are you testing on 16.04?
--
  Tim Lunn
  <email address hidden>

Gunnar Hjalmarsson (gunnarhj) wrote :

Tim,

I was wrong in comment #55 at bug #1551283. The problem I had was (first time) *switching* of display language; *installing* a new language from Region & Language worked fine for me (still does).

g-c-c 1:3.18.2-1ubuntu6~xenial2 in your PPA fixes the language switching issue for me. The warning messages still appear when you start g-c-c from terminal, but apparently they are/were unrelated to my issue.

Tim Lunn (darkxst) wrote :

On 17/03/16 17:49, Gunnar Hjalmarsson wrote:
> Tim,
>
> I was wrong in comment #55 at bug #1551283. The problem I had was (first
> time) *switching* of display language; *installing* a new language from
> Region & Language worked fine for me (still does).
Yeh I've not been able to reproduce nikita's crash, however apparently that is on 15.10
>
> g-c-c 1:3.18.2-1ubuntu6~xenial2 in your PPA fixes the language switching
> issue for me. The warning messages still appear when you start g-c-c
> from terminal, but apparently they are/were unrelated to my issue.
which warning? about is/not installed, or the LANG locale failed ones?
>

Gunnar Hjalmarsson (gunnarhj) wrote :

On 2016-03-17 09:48, Tim wrote:
> On 17/03/16 17:49, Gunnar Hjalmarsson wrote:
>> The warning messages still appear when you start g-c-c from
>> terminal, but apparently they are/were unrelated to my issue.
>
> which warning? about is/not installed, or the LANG locale failed
> ones?

The same warning messages as Nikita showed in comment #13 IIRC, including "Language ja_JP.UTF-8 not installed". (Not the "segmentaion fault" message, of course, but that's not a warning OTOH...)

I am testing this on Ubuntu GNOME 16.04 with GNOME 3.19, but no matter what I do, I don't seem to be able to install your PPA's version of the gnome-control-center over the current version, not even removing the old one and reinstalling, it just reinstalls the old one.

Tim Lunn (darkxst) wrote :

Test on a clean install, you can't install gnome-control-center 3.18 alongside 3.19.

@Tim, Ah, that might be it, I didn't look at the versions in such detail...

@Tim, Ok, I have tested your version on Ubuntu GNOME 16.04 Beta 1 with GNOME 3.18, and though it hangs longer, it still gives a similar output and a segmentation fault. I can provide the core dump if you want?

Gunnar Hjalmarsson (gunnarhj) wrote :

Also the beta 1 ISO is history now. Have you updated all the packages?

sudo apt-get update
sudo apt-get dist-upgrade

@Gunnar, Yes, that's what I started off by doing. Everything was up-to-date when I tried this.

Changed in ubuntu-gnome:
status: New → Fix Released
importance: Undecided → Low
Gunnar Hjalmarsson (gunnarhj) wrote :

Possibly closed prematurely, since there is g-c-c code in Tim's PPA which should get in. Adding a g-c-c task to denote it.

Changed in gnome-control-center (Ubuntu):
importance: Undecided → High
status: New → Triaged

@Tim, I have tested again using the updated packages in your PPA and now it crashes immediately as I open the "Region & Language" section, I don't even see the section, as soon as I click the button to go there it crashes and the output in Terminal is this:

    ** (gnome-control-center:1762): WARNING **: Ignoring launcher gufw (missing desktop file)

    ** (gnome-control-center:1762): WARNING **: Ignoring launcher landscape-client-settings (missing desktop file)

    ** (gnome-control-center:1762): WARNING **: Ignoring launcher language-selector (missing desktop file)

    ** (gnome-control-center:1762): WARNING **: Ignoring launcher ubuntuone-installer (missing desktop file)

    (gnome-control-center:1762): common-cc-panel-WARNING **: Language en_GB.UTF-8 not installed, trying to install it
    Segmentation fault (core dumped)

So that update seems to break things even more...

Tim Lunn (darkxst) wrote :

the Ignoring launcher messages are unrelated.

The crash was 32-bit only, uploading a fix now

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-control-center - 1:3.18.2-1ubuntu6

---------------
gnome-control-center (1:3.18.2-1ubuntu6) xenial; urgency=medium

  * debian/patches:
    - ubuntu-region-packagekit.patch:
       fix detection of installed language packs (LP: #1556684)
       fix typo, thanks Nikita (LP: #1556693)
       fix crash on 32-bit systems
    - 52_region_language.patch:
       improve debug message
       fix locale warning
    - ubuntu-region-langpack-install.patch:
       check for missing language packs when loading region panel, this will
       pull in packs that arent included with the installer (LP: #1525281)

 -- Tim Lunn <email address hidden> Sun, 20 Mar 2016 15:26:18 +1100

Changed in gnome-control-center (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers