The system is very slow. The memory is not freed after closing a program. (-pae)

Bug #569711 reported by VasiaUVI
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
xserver-xorg-video-ati (Ubuntu)
Expired
Low
Unassigned

Bug Description

Binary package hint: xorg

After entering in Lucid and opening for example Firefox my system is became very very slow. After closing the program the memory is not cleared.
I've put a comment on this bug report https://bugs.launchpad.net/ubuntu/+source/xorg-server/+bug/565981 but I have already GLX ver.1.2.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: xorg 1:7.5+5ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-21.32-generic-pae 2.6.32.11+drm33.2
Uname: Linux 2.6.32-21-generic-pae i686
Architecture: i386
CurrentDmesg: [ 55.621351] ADDRCONF(NETDEV_UP): wlan0: link is not ready
Date: Sun Apr 25 13:01:45 2010
DkmsStatus: Error: [Errno 2] No such file or directory
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
MachineType: ASUSTeK Computer Inc. X51R
PccardctlIdent:
 Socket 0:
   no product info available
PccardctlStatus:
 Socket 0:
   no card
ProcCmdLine: BOOT_IMAGE=/boot/vmlinuz-2.6.32-21-generic-pae root=UUID=c6a1f42b-d0de-4dc6-996e-1052239c0145 ro splash quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xorg
dmi.bios.date: 07/31/2007
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 209
dmi.board.asset.tag: ATN12345678901234567
dmi.board.name: X51R
dmi.board.vendor: ASUSTeK Computer Inc.
dmi.board.version: 1.0
dmi.chassis.asset.tag: ATN12345678901234567
dmi.chassis.type: 10
dmi.chassis.vendor: ASUSTeK Computer Inc.
dmi.chassis.version: 1.0
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr209:bd07/31/2007:svnASUSTeKComputerInc.:pnX51R:pvr1.0:rvnASUSTeKComputerInc.:rnX51R:rvr1.0:cvnASUSTeKComputerInc.:ct10:cvr1.0:
dmi.product.name: X51R
dmi.product.version: 1.0
dmi.sys.vendor: ASUSTeK Computer Inc.
system:
 distro: Ubuntu
 codename: lucid
 architecture: i686
 kernel: 2.6.32-21-generic-pae

Revision history for this message
VasiaUVI (vasiauvi) wrote :
Bryce Harrington (bryce)
affects: xorg (Ubuntu) → xserver-xorg-video-ati (Ubuntu)
Bryce Harrington (bryce)
Changed in xserver-xorg-video-ati (Ubuntu):
status: New → Confirmed
Revision history for this message
Bryce Harrington (bryce) wrote :

Please elaborate a bit further, the information you've provided so far is insufficient to analyze this problem. Collect some data showing the memory leak (as described in bug 565981), itemize steps to reproduce, and elaborate on what you've already tested so far (versions, configuration settings, etc.) I notice you have the -pae kernel loaded, so you might want to see if you can reproduce it with the regular kernel. If it is a regression, you should identify when the problem started happening. If you still have older kernels installed, try booting earlier versions.

Changed in xserver-xorg-video-ati (Ubuntu):
status: Confirmed → Incomplete
summary: The system is very slow. The memory is not freed after closing a
- program.
+ program. (-pae)
Revision history for this message
VasiaUVI (vasiauvi) wrote :

Hello,
This is what I've tried:
vasia@vasia-laptop:~$ uname -a
Linux vasia-laptop 2.6.32-21-generic-pae #32-Ubuntu SMP Fri Apr 16 09:39:35 UTC 2010 i686 GNU/Linux
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
1071 objects
61136896 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ glxinfo | grep "GLX version"
GLX version: 1.2
vasia@vasia-laptop:~$ lspci | grep VGA
01:05.0 VGA compatible controller: ATI Technologies Inc RC410 [Radeon Xpress 200M]
vasia@vasia-laptop:~$ pid=`pidof X` ; for t in `seq 1 10`; do eog /usr/share/backgrounds ; echo `grep "object bytes" /sys/kernel/debug/dri/0/gem_objects` `ps ocomm,vsz,rss $pid |grep X`; done
61599744 object bytes Xorg 41696 28328
61521920 object bytes Xorg 41696 28364
61472768 object bytes Xorg 41696 28364
61661184 object bytes Xorg 41696 28364
61870080 object bytes Xorg 41696 28364
62435328 object bytes Xorg 41696 28364
62341120 object bytes Xorg 41696 28376
62935040 object bytes Xorg 41696 28376
62844928 object bytes Xorg 41696 28388
63094784 object bytes Xorg 41696 28404
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
1219 objects
63545344 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ sync
vasia@vasia-laptop:~$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
[sudo] password for vasia:
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects1169 objects
63094784 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ #!!!!!!!!!!!after 2 hours
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
1243 objects
63492096 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ pid=`pidof X` ; for t in `seq 1 10`; do eog /usr/share/backgrounds ; echo `grep "object bytes" /sys/kernel/debug/dri/0/gem_objects` `ps ocomm,vsz,rss $pid |grep X`; done
63918080 object bytes Xorg 42532 15848
64094208 object bytes Xorg 42532 15892
64184320 object bytes Xorg 42532 15964
64446464 object bytes Xorg 42532 15532
64839680 object bytes Xorg 42532 15624
64831488 object bytes Xorg 42532 15616
65155072 object bytes Xorg 42532 15640
65298432 object bytes Xorg 42532 15568
65437696 object bytes Xorg 42532 15500
65826816 object bytes Xorg 42532 15068

I have 1GB of RAM but use only 880 MB! No Compiz is running!
Just after starting Ubuntu I had more than 600MB used. Opened Firefox and Terminal and tried the above commands.

Cone out and after 2 hours came back and my system was EXTREMELY slow.
Done the next commands that you see above.
An other thing, it's possible to have the same kernel installed 2 times?
Here is what I have:
Setting up grub-pc (1.98-1ubuntu6) ...
Installation finished. No error reported.
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.32-21-generic-pae
Found initrd image: /boot/initrd.img-2.6.32-21-generic-pae
Found linux image: /boot/vmlinuz-2.6.31-21-generic-pae
Found initrd image: /boot/initrd.img-2.6.31-21-generic-pae
Found memtest86+ image: /boot/memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda1
done

I've installed the generic kernel but "pae" is appearing 2 times!
In Swap I have 400MB and 800MB from RAM used...
Thanks!

Revision history for this message
VasiaUVI (vasiauvi) wrote :

I've managed to install the generic kernel and here are the same steps like above:
vasia@vasia-laptop:~$ uname -a
Linux vasia-laptop 2.6.32-21-generic #32-Ubuntu SMP Fri Apr 16 08:10:02 UTC 2010 i686 GNU/Linux
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
1144 objects
61763584 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ glxinfo | grep "GLX version"
GLX version: 1.2
vasia@vasia-laptop:~$ pid=`pidof X` ; for t in `seq 1 10`; do eog /usr/share/backgrounds ; echo `grep "object bytes" /sys/kernel/debug/dri/0/gem_objects` `ps ocomm,vsz,rss $pid |grep X`; done
62128128 object bytes Xorg 43996 32204
62402560 object bytes Xorg 43996 32204
62562304 object bytes Xorg 43996 32204
63094784 object bytes Xorg 43996 32204
63336448 object bytes Xorg 43996 32204
63262720 object bytes Xorg 43996 32204
63840256 object bytes Xorg 43996 32204
64065536 object bytes Xorg 43996 32204
64303104 object bytes Xorg 43996 32204
64544768 object bytes Xorg 43996 32204
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
1322 objects
64417792 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ sync
vasia@vasia-laptop:~$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
[sudo] password for vasia:
vasia@vasia-laptop:~$ #here the memory cache was released. I have on panel the System Monitor
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects1169
cat: /sys/kernel/debug/dri/0/gem_objects1169: No such file or directory
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
1300 objects
64008192 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total

For now it's seems that the memory is OK.
I will make the same steps after 1 hour!

By the way, what is the POLKITD PID? It's has the highest CPU usage and some time also memory usage!
Thanks!

Revision history for this message
Bryce Harrington (bryce) wrote : Re: [Bug 569711] Re: The system is very slow. The memory is not freed after closing a program. (-pae)

On Thu, Apr 29, 2010 at 05:49:58PM -0000, VasiaUVI wrote:
> I've managed to install the generic kernel and here are the same steps like above:
>
> For now it's seems that the memory is OK.
> I will make the same steps after 1 hour!

Thanks, so this is suggesting it is something particular to the -pae
kernel, can you confirm this observation once you've done additional
testing?

> By the way, what is the POLKITD PID? It's has the highest CPU usage and some time also memory usage!
> Thanks!

Sorry, dunno, I've not heard of polkitd before. Given its high cpu/mem
usage, do you think it is the thing that is bugged here, rather than X?

Revision history for this message
VasiaUVI (vasiauvi) wrote :

After 40 minutes the computer is very slow. I have opened only Firefox and Terminal.
This Polkitd is taking 300MB of memory...and highest CPU.

The commands:
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
2299 objects
77660160 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ pid=`pidof X` ; for t in `seq 1 10`; do eog /usr/share/backgrounds ; echo `grep "object bytes" /sys/kernel/debug/dri/0/gem_objects` `ps ocomm,vsz,rss $pid |grep X`; done
77631488 object bytes Xorg 48984 22588
77975552 object bytes Xorg 48984 22592
78684160 object bytes Xorg 48984 22592
78983168 object bytes Xorg 48984 22592
79327232 object bytes Xorg 48984 22640
79646720 object bytes Xorg 48984 22640
79953920 object bytes Xorg 48984 22688
80289792 object bytes Xorg 48984 22688
80265216 object bytes Xorg 48984 22688
80912384 object bytes Xorg 48984 22692
vasia@vasia-laptop:~$ cat /sys/kernel/debug/dri/0/gem_objects
2415 objects
80769024 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total
vasia@vasia-laptop:~$ sync
vasia@vasia-laptop:~$ sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
#here the memory cache is not freed!
I've killed polkitd and the memory was freed:
ps -e | grep polkitd

But the memory is slow filling up although I don't open other applications!

Now I will close firefox to see if the memory is freed!

Revision history for this message
VasiaUVI (vasiauvi) wrote :

After closing Firefox the memory was freed!
But nevertheless my impression is that the system is working much more slower than 9.10.

Could I done some more tests? Do you have any idea?
Thank for your patience!

Revision history for this message
VasiaUVI (vasiauvi) wrote :

>Given its high cpu/mem
usage, do you think it is the thing that is bugged here, rather than X?

I don't know what to say! I will investigate further and I will give an answer!

Revision history for this message
Bryce Harrington (bryce) wrote :

On Thu, Apr 29, 2010 at 07:12:51PM -0000, VasiaUVI wrote:
> >Given its high cpu/mem
> usage, do you think it is the thing that is bugged here, rather than X?
>
> I don't know what to say! I will investigate further and I will give an
> answer!

Thanks.

Since the memory gets freed once firefox is exited, perhaps you have a
general performance issue rather than just a memory leak.

There are some known performance issues in -ati with KMS enabled. If
you haven't tried it already, you could test if booting the kernel with
the option radeon.modeset=0 makes it perform well with no degredation.

Revision history for this message
VasiaUVI (vasiauvi) wrote :

Hello,
I really don't know what is happening with my Ubuntu system.
I've tried like you said with radeon.modeset=0 but is the same slow and heavy system.
I've tried to kill, destroy, remove, ....explode....this polkit daemon but it's appearing every time.
I've tried:
start-stop-daemon -K -n polkit
update-rc.d -f polkitd remove
but after boot is still appearing! My cache memory is high and also the both CPUs are constant at 50%.
After 30 min - 1hour the memory is full and the system is much more heavy than before.
Maybe is because of general performance, maybe of other bug, but the idea is that I use Ubuntu from 8.04 version and I didn't saw this behavior before!

How can I murder(kill) :) this polkitd/polkit service??After this I will investigate to see if there are other issues!
Thanks!

Revision history for this message
VasiaUVI (vasiauvi) wrote :

I've managed to make the issue disappear!
I've deleted from /home folder the .pulse folder.
It seems that in that folder I had some "processes", or something like this, so quickly born and killed that I couldn't seen in the task manager and because of this the CPU was at 50% and maybe this was influencing also the polkitd service.

Changed in xserver-xorg-video-ati (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Roberto (rgs) wrote :

I have an always growing gem_objects count, 2BG of memory gets eventually full and extreme swapping starts. Closing apps never drops the count down. I have ATI radeon RV280, KMS enabled, Ubuntu 10.04, no external repositories, no ppa, just plain Ubuntu installation fully updated. Tried with -generic kernel and a custom compiled 2.6.33.3 kernel from kernel.org, both are the same.

If I disable KMS then xorg enters an infinite loop or something like that, it can't be killed with "kill -9" and the computer must be rebooted with sysrq (different bug, first appeared on Karmic but still present on Lucid), so I must have KMS enabled.

Revision history for this message
shankao (shankao) wrote :

As per comment #11, it seems that the original reported got it solved in a way unrelated to the -ati package.

Is this bug still affecting anyone? If not, I suggest this bug should be marked as "Invalid" instead.

Revision history for this message
penalvch (penalvch) wrote :

VasiaUVI, this bug was reported a while ago and there hasn't been any activity in it recently. We were wondering if this is still an issue? If so, could you please test for this with the latest development release of Ubuntu? ISO images are available from http://cdimage.ubuntu.com/daily-live/current/ .

If it remains an issue, could you please run the following command in the development release from a Terminal (Applications->Accessories->Terminal), as it will automatically gather and attach updated debug information to this report:

apport-collect -p xserver-xorg-video-ati REPLACE-WITH-BUG-NUMBER

Please note, given that the information from the prior release is already available, doing this on a release prior to the development one would not be helpful.

Thank you for your understanding.

Helpful bug reporting tips:
https://wiki.ubuntu.com/ReportingBugs

Changed in xserver-xorg-video-ati (Ubuntu):
importance: Undecided → Low
status: Fix Committed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in xserver-xorg-video-ati (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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