Bug 327291 - Memory Leak
Summary: Memory Leak
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: 4.11.2
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-07 20:00 UTC by abulak
Modified: 2016-08-29 11:37 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
my kwin config file (6.12 KB, application/octet-stream)
2013-11-07 20:00 UTC, abulak
Details
kwin supportInformation (5.21 KB, application/octet-stream)
2013-11-07 22:42 UTC, abulak
Details
kwin --replace valgrind.log (124.25 KB, text/x-log)
2013-11-12 11:01 UTC, abulak
Details
output of valgrind --leak-check=full kwin --replace (1.39 MB, text/x-log)
2013-11-12 12:24 UTC, abulak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description abulak 2013-11-07 20:00:10 UTC
Created attachment 83414 [details]
my kwin config file

I observe a slow memory leak. After a whole day (most of which I spend away from my computer) I could see kwin consuming (in KsysGuard memory column) more than 1GB.

Just after kwin --replace it consumes ~40MB.

It seems that changing activity triggers a small memory leak (up to 100 of KB/s).
Comment 1 abulak 2013-11-07 20:04:52 UTC
I forgot to add:

ati-drivers-13.11, and kwin --replace returns:
OpenGL vendor string:                   ATI Technologies Inc.
OpenGL renderer string:                 AMD Radeon HD 7700M Series
OpenGL version string:                  3.1.12614 Compatibility Profile Context FireGL 13.25.18
OpenGL shading language version string: 4.30
Driver:                                 Catalyst
Driver version:                         3.1.12614
GPU class:                              Unknown
OpenGL version:                         3.1.12614
GLSL version:                           4.30
X server version:                       1.14.3
Linux kernel version:                   3.10.7
Direct rendering:                       yes
Requires strict binding:                yes
GLSL shaders:                           yes
Texture NPOT support:                   yes
Virtual Machine:                        no
Comment 2 Thomas Lübking 2013-11-07 20:31:20 UTC
- Does it leak w/o compositing?
- Does it leak w/ compositing, but all effect plugins disabled?
- Does it leak esp. w/o blurring and scale method set to smooth?
- Does it leak w/o be::clock?

Please attach the output of "qdbus org.kde.kwin /KWin supportInformation" (actual runtime information as compared to the "wanted only" settings)
Comment 3 abulak 2013-11-07 22:42:25 UTC
Created attachment 83415 [details]
kwin supportInformation
Comment 4 abulak 2013-11-07 22:50:39 UTC
It does not occur w/o compositing.
Switching off Blur stops leakage;

Switching off all other effects has no effect on the issue.
With just Blur enabled out of all effects simple alt-tab can trigger this.
Comment 5 Thomas Lübking 2013-11-08 07:49:41 UTC
> OpenGL vendor string: ATI Technologies Inc.
> OpenGL renderer string: AMD Radeon HD 7700M Series
> OpenGL version string: 3.1.12614 Compatibility Profile Context FireGL 13.25.18
> OpenGL shading language version string: 4.30
> Driver: Catalyst

Do you use the bespin style ARGB + blurring feature as well?

Three more things:
a) does it still happen when selecting the "raster" graphicssystem?
b) does it also happen with OpenGL 2?
------
c) can you also reproduce it with xf86-video-ati (ie. the radeon driver)
Comment 6 abulak 2013-11-08 08:41:25 UTC
I set all opacity sliders in bespin to 255; Blur is ticked (in bespin as kwin-effect); Translucency is set only in kwin-effects;

Now switching activities make kwin process growin size, but this stops after a few seconds.  If I start moving a window (which triggers translucency) kwin grows in size; this behaviour however stops as soon as I release the window. I have an impression that there is a correlation between size of the window and the pace of leakage. 

ow, I see that this happens also with translucency plugin disabled??

a) With raster leakage seems to be a little bit bigger? again not sure though
b) Yes it does happen with OpenGL-2.0

c) haven't tried yet, has to wait till evening
Comment 7 Martin Flöser 2013-11-12 06:41:08 UTC
if you are familiar with it, please run KWin through valgrind with tool memcheck. This should show a possible leak.

Be aware that running KWin through valgrind can be painful, it's really slow. If you have a general idea on what to look for it's not that bad though: trigger the condition you assume will leak a few times and end it.
Comment 8 abulak 2013-11-12 11:01:12 UTC
I am not familiar with valgrind memcheck, however I've run 
valgrind kwin --replace
and after some time terminated via launching kwin --replace in different terminal. The output is attached.

Currently I have some problems with running with the radeon driver (I need a recent mesa et al since this is FirePro M4000 (aka 7700)
Comment 9 abulak 2013-11-12 11:01:50 UTC
Created attachment 83514 [details]
kwin --replace valgrind.log
Comment 10 Martin Flöser 2013-11-12 11:39:39 UTC
Thanks, it shows that there are leaks, but unfortunately it's full of warnings 
caused by fglrx.

The summary at the end asks to 
Rerun with --leak-check=full to see details of leaked memory

Also please install the debug symbols if not already installed. Looks like 
those are missing from the summary (though I'm not that familiar with 
valgrind).
Comment 11 abulak 2013-11-12 12:24:12 UTC
Created attachment 83517 [details]
output of valgrind --leak-check=full kwin --replace

kwin compiled with -march=native -g -ggdb -O2 -pipe
Comment 12 Martin Flöser 2016-08-29 11:02:26 UTC
Sorry for the late reply. I just looked through the valgrind log and couldn't find anything where I would say: "yeah, that's a clear leak". We have many sections with small amounts (< 1kB) of leaked data without any information where it's from. That could be a leak or not.

Overall I'm not sure what to do with this report. It's against 4.11 and catalyst, that's both an old combination and a combination that if it leaked, it might be fixed in 5.x and/or AMD's new driver infrastructure. I suggest to reopen if you still see leaks with KWin 5.
Comment 13 abulak 2016-08-29 11:37:41 UTC
No problem, I moved to plasma 5; 
You may as well close it.