Garbage written to state file, causing slow UI

Bug #1005642 reported by Neil Mayhew on 2012-05-28
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
GTK+
Invalid
Undecided
Unassigned
Unity Greeter
Fix Released
High
Michael Terry
light-themes
Invalid
Undecided
Unassigned
unity-greeter (Ubuntu)
High
Unassigned
Precise
High
Robert Ancell

Bug Description

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.

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

Regression Potential:
Chance of causing the last logged in user to be broken.

Neil Mayhew (neil.mayhew) wrote :

I found a relatively simple workaround:

  STATE=/var/lib/lightdm/.cache/unity-greeter/state
  sudo rm -f $STATE
  echo | sudo tee $STATE

This creates an empty state file owned by root which unity-greeter (running as the lightdm user) cannot overwrite and therefore cannot corrupt. It means the greeter no longer preselects the user who logged in last, but for some people that's a price worth paying. It also provides an easy way to test the bahaviour of unity-greeter to identify what is causing a particular slowdown.

However, the real problem still needs to be fixed and (hopefully) an SRU (stable release update) submitted for 12.04.

Robert Ancell (robert-ancell) wrote :

I think Michael found a solution to this

Changed in unity-greeter:
assignee: nobody → Michael Terry (mterry)
status: New → Triaged
importance: Undecided → High
Michael Terry (mterry) on 2012-05-29
Changed in unity-greeter:
status: Triaged → In Progress
Jeb E. (jebeld17) wrote :

Using 3D acceleration and the official ATi GPU drivers fixes the LightDM problem, as well. But a problem is that once those drivers are installed, then the exact same thing happens to Unity that happened to LightDM before... Slow responses and slow graphics

Neil Mayhew (neil.mayhew) wrote :

It's been 4 weeks since Michael's fix for this was merged into trunk. Any chance this bug report could be updated?

Even better, could an SRU be made?

1. It looks like the fix could be cherry-picked easily from trunk

2. The impact on users is significant:
      - serious performance degradation on low-end systems
      - potential security implications of dumping memory to a disk file

Jeb E. (jebeld17) wrote :

LightDM has too many flaws. GDM needs to be made the Ubuntu default once more until the development team gets things straightened out with LightDM.

Sebastien Bacher (seb128) wrote :

@Jeb: that's not an user forum, you are free to use gdm if you like

Sebastien Bacher (seb128) wrote :

Hey Michael, do you think we could SRU that fix for the LTS .1?

Changed in unity-greeter (Ubuntu):
importance: Undecided → High
status: New → Fix Committed
Changed in unity-greeter:
status: In Progress → Fix Committed
Changed in unity-greeter (Ubuntu Precise):
milestone: none → ubuntu-12.04.1
assignee: nobody → Michael Terry (mterry)
importance: Undecided → High
status: New → Triaged
Jeb E. (jebeld17) wrote :

I found the problem causing most, if not all of the mouse problems on LightDM: The Ambiance and/or Radiance themes. To fix the problem, install the Ubuntu Tweak PPA "ppa:tualatrix/ppa", install Ubuntu Tweak, and go to Ubuntu Tweak<Tweaks<Login Settings. Change the GTK theme to something else besides Ambiance or Radiance. A good, solid choice may be Adwaita.

Hope this solved all of your problems :)

Jeb E. (jebeld17) wrote :

*edit: Choose Adwaita as the GTK theme. No others work.

Sebastien Bacher (seb128) wrote :

is the issue happening only in the greeter? the same theme is used for the session...

The attachment "Untitled.png" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Changed in lightdm:
status: New → Invalid
no longer affects: lightdm
Changed in unity-greeter:
status: Fix Committed → Fix Released
Changed in unity-greeter (Ubuntu):
status: Fix Committed → Fix Released
Changed in unity-greeter (Ubuntu Precise):
assignee: Michael Terry (mterry) → Sebastien Bacher (seb128)
status: Triaged → In Progress
description: updated
Changed in unity-greeter (Ubuntu Precise):
assignee: Sebastien Bacher (seb128) → Robert Ancell (robert-ancell)
Jeb E. (jebeld17) on 2012-07-26
Changed in light-themes:
status: New → Confirmed
Jeb E. (jebeld17) wrote :

Please note that if a different greeter theme is used in LightDM, the lag issue also stops. Unity-Greeter needs to be handled by LightDM as a .conf file, not through the other stuff 12.04 currently has to control configuration. Every LightDM greeter I use that is controlled by a .conf file works perfectly fine, with no errors.

Changed in lightdm:
status: New → Confirmed
assignee: nobody → Jeb E. (jebeld17)
Jeb E. (jebeld17) wrote :

Text patch created:

Jeb E. (jebeld17) on 2012-07-28
Changed in lightdm:
assignee: Jeb E. (jebeld17) → nobody
assignee: nobody → Jeb E. (jebeld17)
assignee: Jeb E. (jebeld17) → nobody
no longer affects: lightdm

Hello Neil, or anyone else affected,

Accepted unity-greeter into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/unity-greeter/0.2.8-0ubuntu1.2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in unity-greeter (Ubuntu Precise):
status: In Progress → Fix Committed
tags: added: verification-needed
Miklos Juhasz (mjuhasz) wrote :

I followed the steps of the test case described in the bug description and I confirm that the proposed package resolves this issue.

tags: added: verification-done
removed: verification-needed

The verification of this Stable Release Update has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package unity-greeter - 0.2.8-0ubuntu1.2

---------------
unity-greeter (0.2.8-0ubuntu1.2) precise-proposed; urgency=low

  * debian/patches/state-file-garbage.patch:
    - Don't write garbage to the state file (LP: #1005642)
 -- Robert Ancell <email address hidden> Thu, 26 Jul 2012 15:32:35 +0200

Changed in unity-greeter (Ubuntu Precise):
status: Fix Committed → Fix Released
Max Bowsher (maxb) wrote :

This bug does not appear to related to light-themes, marking bugtask Invalid.

tags: removed: patch
Changed in light-themes:
status: Confirmed → Invalid
Changed in gtk:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers