X.org leaks the world

Bug #51000 reported by Oliver Klee
This bug report is a duplicate of:  Bug #98783: MASTER: memory leak. Edit Remove
2
Affects Status Importance Assigned to Milestone
xorg (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I'm using Kubuntu Dapper i386 upgraded from Breezy on an AMD Athlon 1400 MHz system with 1.5 GB of RAM and an Nvidia graphics card on an Asus A7A266 board.

When working, usually I have the following programs open at the same time (I'll attach a complete typical process list):
- Firefox
- Thunderbird
- Eclipse (using the Sun's Java JRE)
- Amarok
- Psi
- Skype
- Krusader

After a I while (a few hours), my system tends to get sluggish. Top reveals that the X.org process is using most of my memory (it uses about 1 GB of RAM). Closing Thunderbird, Firefox, Skype, Amarok, Krusader and Eclipse doesn't help. Logging out and in again (and thus restarting the X server) makes the memory usage go back to normal.

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : Process list

This is the output of "ps -Ef" quite at the beginning of a KDE session (so the memory usage still is okay).

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : Process list after working for a few hours

This time the leak didn't seem to be that extreme. Maybe this is helpful nonetheless.

Revision history for this message
Gary Coady (garycoady) wrote :

Hi Oliver,
can you mail the result of running "xrestop" when this issue occurs?

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : the output of "ps -ef" when this issue occurs

the output of "ps -ef" when this issue occurs

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : the output of "top" when this issue occurs

the output of "top" when this issue occurs

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : the output of "xrestop" when this issue occurs

the output of "xrestop" when this issue occurs

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : the output of "ps -ef" after this issue has occured, after closing the "big" applications, but before restarting X

the output of "ps -ef" after this issue has occured, after closing the "big" applications, but before restarting X

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : the output of "top" after this issue has occured, after closing the "big" applications, but before restarting X

the output of "top" after this issue has occured, after closing the "big" applications, but before restarting X

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote : the output of "xrestop" after this issue has occured, after closing the "big" applications, but before restarting X

the output of "xrestop" after this issue has occured, after closing the "big" applications, but before restarting X

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote :

About Eclipse and Java: I'm running the Eclipse from http://eclipse.org/, not from the deb. I'm using the Sun JRE deb http://ubuntu.tower-net.de/ubuntu/ for it.

Revision history for this message
Oliver Klee (launchpad-oliverklee) wrote :

A few dates ago, I've update to the official sun-java5 packages from Ubuntu. With these, the problem still occurs. In addition, the problem also occurs without Amarok running.

Revision history for this message
Tessa (unit3) wrote :

I'm seeing this same issue using the NVidia binary drivers (from the linux-restricted-modules-k8 packages). After about a day, memory usage on X is out of control (218M VIRT, 159M RES). xrestop shows the following:

xrestop - Display: localhost:0
          Monitoring 36 clients. XErrors: 3
          Pixmaps: 114693K total, Other: 864K total, All: 115558K total

res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
3a00000 264 64 1 3347 142 83587K 12K 83599K ? Bug #51000 in
2600000 11 48 1 25 18 9260K 2K 9262K ? Spark - graeme
3400000 5074 36 0 2539 7641 8707K 298K 9006K 6263 notification-d

Spark is a java IM client, and "Bug #51000" is the Firefox browser window I've got open on this bug.

Top shows that both X and Firefox are using more memory than you'd expect they should be:

4857 root 17 0 219m 159m 12m R 27 7.9 56:55.59 Xorg
 6319 graemehu 15 0 322m 101m 25m S 0 5.1 7:53.50 firefox-bin

Note that these usage numbers, both in Firefox and X, steadily climb with the system sitting idle until there is no free memory left.

Revision history for this message
Tessa (unit3) wrote :

Interestingly, if I close Firefox, the xrestop numbers drop about what you'd expect (~83 MB):

xrestop - Display: localhost:0
          Monitoring 35 clients. XErrors: 0
          Pixmaps: 30777K total, Other: 841K total, All: 31619K total

res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
2600000 11 48 1 25 18 9287K 2K 9290K ? Spark - graeme
3400000 5074 36 0 2539 7640 8707K 298K 9006K 6263 notification-d

However, the actual memory usage of X hasn't dropped anywhere near that much:

 4857 root 16 0 203m 146m 12m S 35 7.3 58:52.79 Xorg

And with only 30 MB being used for pixmaps (according to xrestop), there's no explanation for why X is still using 146MB of RAM.

Is there any other way than xrestop to figure out what X's memory is being used for?

Revision history for this message
Tessa (unit3) wrote :

I'm finding in edgy with the latest NVidia drivers that I'm no longer seeing this behavior with X. Firefox still sucks up RAM, but it gets freed when Firefox quits. So maybe this is more caused by bugs in specific video drivers than by Xorg itself?

Revision history for this message
Rouben (rouben) wrote :

Thanks for the bug report, you've done a terrific job attaching relevant and useful data!

If possible, I'd like you to try and replicate this problem with the open source "nv" driver, if you don't mind. Also, trying a more up to date version of the binary driver also seems like a good idea (uninstall Ubuntu package and build the latest stable driver off nvidia.com). Perhaps this is an nVidia binary driver issue, as Graeme Humphries suggested, in which case, if Dapper ships a bad nVidia driver, perhaps we can ask the packagers to include a more recent release in the next Dapper update batch?

Thanks again!

Changed in xorg:
assignee: nobody → rouben
status: Unconfirmed → Needs Info
Rouben (rouben)
Changed in xorg:
assignee: rouben → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for xorg (Ubuntu) because there has been no activity for 60 days.]

To post a comment you must log in.