dx-packages team mailing list archive
-
dx-packages team
-
Mailing list archive
-
Message #31223
[Bug 1443178] [NEW] Accounts Service always relies on language fallback if never set by the user
Public bug reported:
current build number: 169
device name: mako
channel: ubuntu-touch/devel-proposed
alias: ubuntu-touch/vivid-proposed
last update: 2015-04-12 20:38:14
version version: 169
version ubuntu: 20150412
version device: 20150210
version custom: 20150412
This causes a bad side effect when changing volume via indicator-sound,
as that will cause a sync to accountsservice in order to sync the
volume. Once that sync happens, it will request the user properties, and
in case the user doesn't have a valid language at
/var/lib/AccountsService/users/<user>, it will always rely on the
fallback, which would be fine if calculating the fallback wasn't 't so
cpu or i/o intensive (and that happens multiple times).
As a test, just flash latest vivid image on mako, don't set any language
when the wizard shows up, run top and then change the volume by pressing
volume up/down. This is what I see with mako:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2609 phablet 20 0 499660 121220 52688 S 7.6 6.5 0:41.69 unity8
5600 phablet 20 0 3676 1760 1288 R 6.0 0.1 0:00.19 language-option
1312 root 20 0 211532 15572 11344 S 1.9 0.8 0:07.25 unity-system-co
1316 phablet 20 0 36532 3792 2928 S 1.3 0.2 0:01.66 accounts-daemon
And the reason why:
src/user.c
...
static void
user_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
User *user = USER (object);
...
case PROP_LANGUAGE:
if (user->language)
g_value_set_string (value, user->language);
else
g_value_set_string (value, user_get_fallback_value (user, "Language"));
break;
case PROP_FORMATS_LOCALE:
if (user->formats_locale)
g_value_set_string (value, user->formats_locale);
else
g_value_set_string (value, user_get_fallback_value (user, "FormatsLocale"));
break;
user_set_property never gets called unless the user changes the system
language from system-settings or wizard.
Once you change the language, it will set a valid language at
/var/lib/AccountsService/users/<user>, causing this behavior to stop.
Another bad side effect of this issue is that it takes quite a while for
accountsservice to reply back to indicator-sound when the sync happens,
possibly causing sync aborts (as indicator-sound only waits 1 second
before triggering another sync).
Some possible ways to fix this issue:
1) Make wizard to set language even when the selected language is already the default one;
2) Change accountsservice to save the fallback value at the first time it gets that from the system;
** Affects: canonical-devices-system-image
Importance: Undecided
Status: New
** Affects: accountsservice (Ubuntu)
Importance: Undecided
Status: New
** Affects: unity8 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: unity8 (Ubuntu)
Importance: Undecided
Status: New
** Also affects: canonical-devices-system-image
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of DX
Packages, which is subscribed to accountsservice in Ubuntu.
Matching subscriptions: dx-packages
https://bugs.launchpad.net/bugs/1443178
Title:
Accounts Service always relies on language fallback if never set by
the user
Status in the base for Ubuntu mobile products:
New
Status in accountsservice package in Ubuntu:
New
Status in unity8 package in Ubuntu:
New
Bug description:
current build number: 169
device name: mako
channel: ubuntu-touch/devel-proposed
alias: ubuntu-touch/vivid-proposed
last update: 2015-04-12 20:38:14
version version: 169
version ubuntu: 20150412
version device: 20150210
version custom: 20150412
This causes a bad side effect when changing volume via indicator-
sound, as that will cause a sync to accountsservice in order to sync
the volume. Once that sync happens, it will request the user
properties, and in case the user doesn't have a valid language at
/var/lib/AccountsService/users/<user>, it will always rely on the
fallback, which would be fine if calculating the fallback wasn't 't so
cpu or i/o intensive (and that happens multiple times).
As a test, just flash latest vivid image on mako, don't set any
language when the wizard shows up, run top and then change the volume
by pressing volume up/down. This is what I see with mako:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
2609 phablet 20 0 499660 121220 52688 S 7.6 6.5 0:41.69 unity8
5600 phablet 20 0 3676 1760 1288 R 6.0 0.1 0:00.19 language-option
1312 root 20 0 211532 15572 11344 S 1.9 0.8 0:07.25 unity-system-co
1316 phablet 20 0 36532 3792 2928 S 1.3 0.2 0:01.66 accounts-daemon
And the reason why:
src/user.c
...
static void
user_get_property (GObject *object,
guint param_id,
GValue *value,
GParamSpec *pspec)
{
User *user = USER (object);
...
case PROP_LANGUAGE:
if (user->language)
g_value_set_string (value, user->language);
else
g_value_set_string (value, user_get_fallback_value (user, "Language"));
break;
case PROP_FORMATS_LOCALE:
if (user->formats_locale)
g_value_set_string (value, user->formats_locale);
else
g_value_set_string (value, user_get_fallback_value (user, "FormatsLocale"));
break;
user_set_property never gets called unless the user changes the system
language from system-settings or wizard.
Once you change the language, it will set a valid language at
/var/lib/AccountsService/users/<user>, causing this behavior to stop.
Another bad side effect of this issue is that it takes quite a while
for accountsservice to reply back to indicator-sound when the sync
happens, possibly causing sync aborts (as indicator-sound only waits 1
second before triggering another sync).
Some possible ways to fix this issue:
1) Make wizard to set language even when the selected language is already the default one;
2) Change accountsservice to save the fallback value at the first time it gets that from the system;
To manage notifications about this bug go to:
https://bugs.launchpad.net/canonical-devices-system-image/+bug/1443178/+subscriptions
Follow ups
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Pat McGowan, 2015-10-21
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Launchpad Bug Tracker, 2015-05-21
-
[Bug 1443178] Update Released
From: Brian Murray, 2015-05-21
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Launchpad Bug Tracker, 2015-05-21
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-05-14
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Chris J Arges, 2015-05-13
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Chris J Arges, 2015-05-13
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Launchpad Bug Tracker, 2015-05-12
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-05-12
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-05-12
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-05-11
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-05-07
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Sebastien Bacher, 2015-05-07
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-05-01
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-04-13
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Michał Sawicz, 2015-04-13
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Michał Sawicz, 2015-04-13
-
[Bug 1443178] Re: Accounts Service always relies on language fallback if never set by the user
From: Gunnar Hjalmarsson, 2015-04-13
-
[Bug 1443178] [NEW] Accounts Service always relies on language fallback if never set by the user
From: Ricardo Salveti, 2015-04-12
References