** Description changed:
- /var/lib/lightdm/.cache/unity-greeter/state records the last username to
- be selected. In 0.2.8-0ubuntu1.1 a lot of binary garbage gets written as
- well (typically over 500KB).
+ Impact:
+ A software bug causes garbage data to be written to the unity greeter state
file which makes file large to open causing a slow down.
- The most visible consequence of this is a very slow response to
- switching users, eg using the arrow keys, on some systems. This may be
- what is being seen in several other bug reports (eg bug #945450),
- although it's hard to be sure.
+ Test Case:
+ 1. Stop lightdm
+ $ sudo stop lightdm
+ 2. Remove greeter state file
+ $ sudo rm ~lightdm/.cache/unity-greeter/state
+ 3. Start lightdm
+ $ sudo start lightdm
+ 4. Pick user and log in normally
+ Expected result:
+ ~lightdm/.cache/unity-greeter/state exists and contains the key last-user
which is set to the user that just logged in
+ Observed result:
+ File exists but has garbage after last-user key
- The slowness seems to be due to the time taken to write all the garbage,
- and maybe the generation of a segmentation error at the end of it.
- Enabling lightdm logging with --log-dir=/var/log/lightdm on the exec
- line in /etc/init/lightdm.conf, I see the following:
-
- unity-greeter.vala:496: Failed to write state: Error writing to file:
- Bad address
-
- Judging by the timestamp, this seems to occur right at the time of the
- slowdown, and from the contents of the file the garbage seems to be a
- dump of memory contents following the correct data, maybe all the way to
- the end of the data segment.
-
- There's also a log message at the startup about being unable to read the
- state, presumably due to the corruption. Unfortunately, deleting the
- state file just causes another garbage one to be created.
-
- The relevant section of unity-greeter.vala is:
-
- state.set_value ("greeter", "last-user", username);
- var data = state.to_data ();
- try
- {
- state_file.replace_contents ((uint8[])data, null, false,
FileCreateFlags.NONE, null);
- }
- catch (Error e)
- {
- debug ("Failed to write state: %s", e.message);
- }
-
- so either state.to_data is returning garbage or
- state_file.replace_contents is writing out too much data.
-
- If I build a local version of unity-greeter with the call to replace-
- contents removed, the log message goes away and, most importantly, so
- does the slowdown.
-
- Unfortunately, I haven't been able to produce a full fix for the
- problem. I'm wondering if the real issue is to do with the passing of
- data between vala and glib.
+ Regression Potential:
+ Chance of causing the last logged in user to be broken.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1005642
Title:
Garbage written to state file, causing slow UI
To manage notifications about this bug go to:
https://bugs.launchpad.net/unity-greeter/+bug/1005642/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs