Software center page changes add between 2 and 6 meg to the memory size

Bug #1058523 reported by Dave Morley on 2012-09-29
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fix Released
software-center (Ubuntu)

Bug Description

Grab myutils from lp:~davmor2/+junk/testscripts
From xpresser/xp_trial run import myutils
Run it against software center with myutils.statinfo('software-center')

1. Open USC give it about 20secs it will level out at about 170 meg
2. Click on an app run myutils.statinfo('software-center')
3. Click on All Software and run myutils.statinfo('software-center')
4. Click on a different app and run myutils.statinfo('software-center')
5. Click on All Software and run myutils.statinfo('software-center')
6. Click on the same app again and run myutils.statinfo('software-center')

My assumption is that the webkit display isn't dropping info once the page is no longer displayed.

This is good for speed returning to a page but is drastically increasing the memory footprint of USC when searching through a selection of apps for a new user not familiar with the application names.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: software-center
ProcVersionSignature: Ubuntu 3.5.0-16.24-generic 3.5.4
Uname: Linux 3.5.0-16-generic x86_64
ApportVersion: 2.5.3-0ubuntu1
Architecture: amd64
Date: Sat Sep 29 09:37:21 2012
InstallationMedia: Ubuntu 12.10 "Quantal Quetzal" - Beta amd64 (20120926)
PackageArchitecture: all
 PATH=(custom, no user)
SourcePackage: software-center
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Dave Morley (davmor2) wrote :
Changed in software-center (Ubuntu):
importance: Undecided → Low
Michael Vogt (mvo) wrote :

Thanks for your bugreport.

I can reproduce this in quanal. This is made more complicated by the fact that I get a increase in the reported memory
just by scrolling the up-and-down in the lobbyview while there are no objects reported in the garbage collector (gc).
Even when disabling all custom drawing and all size-allocaiton signals.

Michael Vogt (mvo) wrote :

I (finally) managed to find one of the sources for this problem. It looks like our "sotware-center.css" file causes some css that has a memory leak to be drawn.

To reproduce:
- open a tool like htop and sort by memory usage
- run software-center and scroll around the lobby
- watch the htop RES column for software-center increase just from scrolling

Note that this does not increase any python visible object count, just the RES data.
When the software-center.css is disabled this stops leaking memory.

I will try to build a stock Gtk test case next.

Changed in software-center (Ubuntu):
status: New → Confirmed
importance: Low → Medium
Michael Vogt (mvo) wrote :

It turns out that "text-shadow" appears to be leaking memory. I submitted a upstream report with a testcase.

Changed in software-center:
importance: Unknown → Medium
status: Unknown → New
Michael Vogt (mvo) on 2012-10-16
Changed in software-center (Ubuntu):
status: Confirmed → In Progress
Sebastien Bacher (seb128) wrote :

note that the gtk issue has been fixed today in upstream git:

affects: software-center → gtk
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package software-center -

software-center ( quantal-proposed; urgency=low

  * data/ui/gtk3/css/softwarecenter.css:
    - drop "text-shadow" from the CSS as its causing a memory
      leak (LP: #1058523)
 -- Michael Vogt <email address hidden> Tue, 16 Oct 2012 18:07:08 +0200

Changed in software-center (Ubuntu):
status: In Progress → Fix Released
Changed in gtk:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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