My swap memory gets full after 5-6hours of computer usage on 10.04

Bug #560859 reported by Utkarsh Sengar
This bug report is a duplicate of:  Bug #565981: [KMS] gem objects not deallocated. Edit Remove
62
This bug affects 11 people
Affects Status Importance Assigned to Milestone
xserver-xorg-video-intel (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

I am running Ubuntu 10.04

RAM: 1GB
Swap Memory: 2.84GB

I notice after 5-6 hours of usage the swap memory gets full and I have to restart my computer.

The apps I generally run is Eclipse, Firefox, Pidgin and Dropbox.

How do you guys want me to get the dump, since I am not sure which app is causing the memory leak?

Tags: lucid
Revision history for this message
Ascaronth (ziobello1) wrote :

It happens to me too... I have 1.2GiB RAM and 1.6GiB Swap Memory but after maybe 10 hours the swap partition gets full and things get really slow, although RAM usage is almost always around 30%

Revision history for this message
Rickard Närström (riccetn) wrote :

You should be able to get per-process memory usage information from the system monitor.

Revision history for this message
Ascaronth (ziobello1) wrote :

Yes I checked that but the program that used the most memory was "Alarm Clock" which used ~40MiB and it was the only program running, not even Empathy was running. After I closed Alarm Clock 0.05GiB of space on my swap partition freed, going to 1.55GiB used, and than I was able to start Firefox, which then used the free swap space leaving RAM alone (same usage as before I launched Firefox). When I tried to launch Firefox when swap space was full it just crashed on startup, which took a considerable amount of time (~30-40 seconds). Hope this helps.

Revision history for this message
Rickard Närström (riccetn) wrote :

System Monitor is hiding some memory usage information by default, try to activate some of the other memory usage related columns in the settings for system monitor and see if it can give some clues to what is leaking.

If you find the leaking process can you also paste the content of /proc/$PID/maps where $PID is the process id of the leaking process.

Revision history for this message
Götz Christ (g-christ) wrote :

Since some days this happens to me too. Is this bug not duplicate or related to bug 501715 ? At least I think it is ureadahead fault, because htop doesn't display any process consuming that much of memory.

In a Kubuntu 10.04 system with only Firefox running, the swap is now 890 MB full, in Karmic it was at most ~130 MB used. After I disactivate the swap, the system becomes very slow, and then the programs start to crash. Only restarting helps, but for about 2-3 hours.

free -m
             total used free shared buffers cached
Mem: 1470 1223 246 0 10 783
-/+ buffers/cache: 430 1040
Swap: 2070 890 1180

Revision history for this message
Götz Christ (g-christ) wrote :

After uninstalling ureadahead (and restarting) the very high memory usage remains. I also installed the Karmic kernel 2.6.31-20 but the problem remains. So I think that ureadahead and the kernel are not the problem. But which component is?

I attach a screenshot displaying htop. From the RAM 518 MB are only applications. The rest should be cache and buffer, but I don't think it is, the swap wouldn't be ~1.2 GB full.

If I don't do anything. After some hours the ram and swap usage is the same, but If I open and close programs, the ram and swap usage increases. In the screenshot it is possible to see that Xorg is using 3.9% of the memory (only from the RAM?), and it is the process that used the most of the memory!

How can we find which program / process has the problem?

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

Same problem here. I'm interested if you did a clean install or just upgraded from Karmic? Also are you using any additional applications? This are the applications I use on a daily basis: Firefox, OpenOffice, SMPlayer, Liferea, Skype, Pidgin, Synaptic, Screenlets, Thunderbird, Caffeine, Tomboy, Sunbird.

Revision history for this message
Götz Christ (g-christ) wrote :

I did and upgrade from Karmic. I use KDE, Firefox, OpenOffice, SMPlayer, Amarok.. Will do a fresh installation in the weekend to see if this gets better, Also I haven't tried with a new user. But I think the problem should not be from programs like those. Something from the OS it self, but don't know what.

Revision history for this message
Bernhard Schmidt (berni) wrote :

I have the same problem with a box upgraded from Karmic. Gnome, I almost exclusively use Firefox, Thunderbird 3, gnome-terminal and pidgin. No process has apparent high memory consumption. RAM is hardly used, with 1.2G of 2G swapped. Gets gradually worse until one has to restart after a couple of days. High I/O wait. ureadahead is removed/purged but it hasn't become much better.

Memory/Swap is not reclaimed when I do a full logout/login cycle, so I don't think it's an application with a memory leak.

Revision history for this message
Mingming Ren (portis25) wrote :

I have this problem. My 2G memory has been occupied in 5 hours.

Log-out and relogin can make the memory back. So I have to log out every 5 hours.

Changed in ubuntu:
status: New → Confirmed
Revision history for this message
Mingming Ren (portis25) wrote :

Another observation is that when I try to disable swap when the system becomes so slow,
sudo swapoff -a
It fails, and gives an error like" Cannot allocate memory".

I'm wondering if this is related to xorg or intel video driver.
When the memory is occupied,

cat /proc/dri/0/gem_objects

shows more than 1G object bytes.

I remember last year, there was a serious memory leakage in intel video driver. But I'm not sure if it's the same bug.

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

I wanted to ask you all about what graphic card you have, but I was hesitant because I thought that I might sound stupid. I also have Intel graphic card and I noticed that my cache memory increases by changing to full screen and back to windowed mode in SMPlayer. This is the output of cat /proc/dri/0/gem_objects (taken while there is still memory left, but again an enormous amount used by cache)
1212 objects
789098496 object bytes
3 pinned
23965696 pin bytes
96223232 gtt bytes
260308992 gtt total

I have no idea if this is normal or not.
The problem is that right now I am using the intel driver from xorg-edgers PPA repository, but I had the same high memory usage problem with Lucid's default intel driver.

Revision history for this message
mo (deez) wrote :

I also have an Intel card and experience the memory fill-up, with no apparent applications using up the memory (2GB physical, 1.5GB swap).

I installed Lucid fresh with a beta1 CD.

"lspci -vv" relevant part:

00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
        Subsystem: Lenovo Device 20e4
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
        Latency: 0
        Interrupt: pin A routed to IRQ 29
        Region 0: Memory at f2000000 (64-bit, non-prefetchable) [size=4M]
        Region 2: Memory at d0000000 (64-bit, prefetchable) [size=256M]
        Region 4: I/O ports at 1800 [size=8]
        Capabilities: [90] Message Signalled Interrupts: Mask- 64bit- Queue=0/0 Enable+
                Address: fee0100c Data: 41b1
        Capabilities: [d0] Power Management version 3
                Flags: PMEClk- DSI+ D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-
        Kernel driver in use: i915
        Kernel modules: i915

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

Do all the bug reporters here use Intel graphic cards?

Revision history for this message
Utkarsh Sengar (utkarsh2012) wrote :

Yes, I also have an Intel Graphics card.

After the most recent Ubuntu 10.04 update, my swap problem is solved but there is still some memory leak in Pidgin, which hogs up the RAM in no time.

Revision history for this message
Christian Dröge (christian-d) wrote :

I have a Radeon HD 3300 onboard and I am also affected by this issue. It seems, that the number of objects and the objects bytes in /proc/dri/0/gem_objects increases. Every ~2 minutes it uses 20 MB more memory. Also this bug seems to be related to #565981

$ date; cat /proc/dri/0/gem_objects
Mi 21. Apr 00:10:50 CEST 2010
791 objects
227811328 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total

$ date; cat /proc/dri/0/gem_objects
Mi 21. Apr 00:12:15 CEST 2010
821 objects
240357376 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total

$ date; cat /proc/dri/0/gem_objects
Mi 21. Apr 00:18:04 CEST 2010
978 objects
281116672 object bytes
0 pinned
0 pin bytes
0 gtt bytes
0 gtt total

Revision history for this message
Götz Christ (g-christ) wrote :

I have also an Intel (865 G) gfx card: As Christian Dröge says, Bug 565981 seem to be related / the cause.

00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
        Subsystem: ASRock Incorporation Device 2572
        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
        Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx+
        Latency: 0
        Interrupt: pin A routed to IRQ 16
        Region 0: Memory at f0000000 (32-bit, prefetchable) [size=128M]
        Region 1: Memory at ff280000 (32-bit, non-prefetchable) [size=512K]
        Region 2: I/O ports at ec00 [size=8]
        Capabilities: <access denied>
        Kernel driver in use: i915
        Kernel modules: i915

Revision history for this message
Rickard Närström (riccetn) wrote :

Thanks a lot for all the information, assigning to the intel driver to see if we can get a solution to this.

affects: ubuntu → xserver-xorg-video-intel (Ubuntu)
Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Ubuntu-x-swat] [Bug 560859] [NEW] My swap memory gets full after 5-6hours of computer usage on 10.04

Could you run “cat /sys/kernel/debug/dri/0/gem_objects” when your swap
is getting full and paste the top two lines of output here? I strongly
suspect this will be a duplicate of bug #565981.

Bryce Harrington (bryce)
tags: added: lucid
Revision history for this message
Petar Velkovski (pvelkovski) wrote :

$cat /sys/kernel/debug/dri/0/gem_objects
2268 objects
-2137550848 object bytes
3 pinned
23965696 pin bytes
106426368 gtt bytes
260308992 gtt total

$free
             total used free shared buffers cached
Mem: 2052036 1985652 66384 0 12144 1449360
-/+ buffers/cache: 524148 1527888
Swap: 2048248 54020 1994228

Revision history for this message
Petar Velkovski (pvelkovski) wrote :

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 1020|grep X`; done
2060451840 object bytes
2071638016 object bytes
2088755200 object bytes
2100027392 object bytes
2112102400 object bytes
2121998336 object bytes
2133086208 object bytes
2144800768 object bytes
-2144907264 object bytes
-2130034688 object bytes

Notice the sign change!! :)

Revision history for this message
Nicolas Valcarcel (nvalcarcel) wrote :

That happens to me, i've 4 Gb RAM and it get's up to 90%, but after restarting the browser it gets to 30% again.

Revision history for this message
portis (portis24) wrote : Re: [Bug 560859] Re: My swap memory gets full after 5-6hours of computer usage on 10.04

https://wiki.ubuntu.com/X/Testing/GEMLeak

It works for me.

On Wed, Apr 21, 2010 at 4:40 PM, Nicolas Valcárcel <
<email address hidden>> wrote:

> That happens to me, i've 4 Gb RAM and it get's up to 90%, but after
> restarting the browser it gets to 30% again.
>
> --
> My swap memory gets full after 5-6hours of computer usage on 10.04
> https://bugs.launchpad.net/bugs/560859
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Mingming Ren (portis25) wrote :
Revision history for this message
Chris Halse Rogers (raof) wrote : Re: [Ubuntu-x-swat] [Bug 560859] Re: My swap memory gets full after 5-6hours of computer usage on 10.04

 duplicate 565981

Yup; this is the GEM leak alright. That should now be fixed; marking as
a duplicate.

Revision history for this message
Fayer Michael (fayer012) wrote :

I think bug #565981 is not the duplicate. I have very similar case with Ascaronth (#3). Alarm-clock use out memory very quickly. I set up quite a lot (144; every 10 minutes, 24 hours) alerts. This should be a bug. I am using Ubuntu 10.04 LTS (GNOME). Alarm-clock was installed by synaptic.

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.