gnome-settings-daemon leaks memory

Bug #293318 reported by Tom Rothamel
70
This bug affects 6 people
Affects Status Importance Assigned to Milestone
gnome-settings-daemon (Ubuntu)
Fix Released
High
William Grant
Intrepid
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: gnome-settings-daemon

gnome-settings-daemon_2.24.0-0ubuntu3.1_amd64.deb leaks memory at the rate of a meg every few seconds, rendering the system unusable.

Reverting to gnome-settings-daemon_2.24.0-0ubuntu3_amd64.deb prevents the problem from occuring.

William Grant (wgrant)
Changed in gnome-settings-daemon:
assignee: nobody → wgrant
importance: Undecided → High
status: New → In Progress
Revision history for this message
William Grant (wgrant) wrote :

Please attach /var/log/Xorg.0.log and the output of lshal.

Revision history for this message
ssymo (ssyymmoo) wrote :

same problem with gnome-settings-daemon_2.24.0-0ubuntu3.1

Revision history for this message
ssymo (ssyymmoo) wrote :
Revision history for this message
Krzysztof Janowicz (janowicz) wrote :

same for me (at the moment 1.3 GB).

Revision history for this message
William Grant (wgrant) wrote :

Please try gnome-settings-daemon ~wgrant3 (NOT ~wgrant2) from https://launchpad.net/~wgrant/+archive. It should be there in about 6 minutes.

Revision history for this message
ssymo (ssyymmoo) wrote :

gnome-settings-daemon ~wgrant3 works fine!
Thanks!

Revision history for this message
William Grant (wgrant) wrote :

Argh, so some of my code is at fault :(

At least it narrows it down.

Revision history for this message
William Grant (wgrant) wrote :

OK, try ~wgrant4.

Revision history for this message
ssymo (ssyymmoo) wrote :

~wgrant4 does not work, still present the leak of memory, and the layout of keyboard is changed from Italian to US

Revision history for this message
onyxrev (entp) wrote :

I can confirm this problem. It's been taking down my work machine when it hits a bit over a gig. It appears to be exacerbated when I run System > Preferences > Mouse, giving me the error that gnome-settings-daemon cannot be started.

Revision history for this message
William Grant (wgrant) wrote :

I'd like lshal output, /var/log/Xorg.0.log and ~/.xsession-errors from everybody with this problem, please.

Revision history for this message
bia (ebia.tty0) wrote :

yes,on my ubuntu 810 HP laptop, version 2.24.0-0ubuntu3.1 of gnome-setting-daemon is problematic(100% cpu usage,fail to start with gnome-sappereance-properties.and some shortcuts of keyboard didn't work any more),when i down grade it to 2.24.0-0ubuntu3.0, it's working well.....
hope it fixed in next update..

Revision history for this message
Víctor Jiménez (capitangolo) wrote :

On my laptop gnome-settings-daemon had 100% cpu usage. My /var/log/Xorg.0.log was a 118Mb file containing:

(EE) xf86OpenSerial: Cannot open device /dev/input/wacom
 No such file or directory.
Error opening /dev/input/wacom : No such file or directory

I've removed wacom references from /etc/X11/xorg.conf and now cpu usage is back to normal.

Revision history for this message
Pascal Lamblin (blip-aigri) wrote :

This workaround worked for me too.

Revision history for this message
William Grant (wgrant) wrote :

Please post the relevant section of your xorg.conf, so I can reproduce and fix it.

Revision history for this message
Víctor Jiménez (capitangolo) wrote :
Revision history for this message
Stefan Matting (stefan-matting) wrote :

I can confirm. Since I have a wacom tablet myself and the same lines in my xorg.conf caused the memory leak and high CPU usage of gnome-settings-daemon (20%) and Xorg (60%).

Revision history for this message
William Grant (wgrant) wrote :

Thanks, I've been able to reproduce and hopefully fix the problem. ~wgrant6 should be in my PPA in about 10 minutes; please try that.

Revision history for this message
onyxrev (entp) wrote :

Having seen the same 510MB log file as the others with the same lines, I updated to ~wgrant6, which appears to have fixed the issue.

Revision history for this message
J. Bruce Fields (bfields-fieldses) wrote :

My x.org.conf had a lot of pointer device sections (I'm not sure where they came from); after I removed them, I no longer saw the problem. good-xorg.conf (after the change) and bad-xorg.conf (before the change) attached.

Revision history for this message
J. Bruce Fields (bfields-fieldses) wrote :
Revision history for this message
J. Bruce Fields (bfields-fieldses) wrote :

I also tried going back to the "bad" xorg.conf, installing ~wgrant6, and rebooting, and found that also served to fix the memory leak/cpu usage problem.

Revision history for this message
William Grant (wgrant) wrote :

An intrepid-proposed debdiff is coming shortly. Here's a description of the problem and its fix:

==
The problem was broken X input devices defined in xorg.conf - in particular, tablet entries without the corresponding serial device actually existing.

The touchpad setting code in gnome-settings-daemon looked for DevicePresence notifications, and checked if they were of the DeviceAdded type. If they were, it proceeded to reconfigure all input devices. Setting the touchpad properties requires opening each device, and checking if it has the right properties. When X sees a device open request for the non-existent tablet, it revives the X device to look for the serial device, which triggers another DeviceAdded event. g-s-d notices this. Rinse. Repeat. Chaos ensues.

The fix for this was to dig through the xserver code and work out that I should be looking for DeviceEnabled rather than DeviceAdded. The device for the missing tablet never finishes initialising, so never fires a DeviceEnabled.

Since the Synaptics touchpad driver now reports itself as being of type XI_TOUCHPAD rather than XI_MOUSE, I also added further checks to not even bother opening a device if it isn't an XI_TOUCHPAD.

Revision history for this message
William Grant (wgrant) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :

Accepted into intrepid-proposed, please test and give feedback here. Please see https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in gnome-settings-daemon:
status: New → Fix Committed
Revision history for this message
Martin Pitt (pitti) wrote :

2.24.0-0ubuntu3.2 copied to jaunty.

Changed in gnome-settings-daemon:
status: In Progress → Fix Released
Revision history for this message
bia (ebia.tty0) wrote :

:)

Revision history for this message
Víctor Jiménez (capitangolo) wrote :

Updated from intrepid-proposed... all ok. Thanks ^^.

Revision history for this message
Martin Pitt (pitti) wrote :

working fine for me, too.

Revision history for this message
Martin Pitt (pitti) wrote :

Copied to intrepid-updates.

Changed in gnome-settings-daemon:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.