Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2013-01-17 Thread bluebubble

Il 15/01/13 09:16, Michel Dänzer ha scritto:

As you can see, the X server hardly leaked any memory on exit. You
really need to trigger valgrind to print information about where memory
was allocated from while memory usage appears high during runtime.


ehm I didn't find how to do that. Could you provide me some hint?

I've tested that bug outside of KDE (fluxbox and openbox to be more 
specific) and with my netbook (it has an intel video card) and the bug 
is there too. So this is probably not a radeon related bug (maybe it 
should be moved in gtk2-engines-oxygen package?).
I've compiled the newest version of the theme engine and the bug is not 
solved.


In KDE this could also be tested in system settings-application 
appearance-gtk configuration-select a gtk2 theme-oxygen-gtk and then 
click on the preview button and move the mouse inside the file menu. 
Anyway any gtk2 app with a menu is enough.



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2013-01-17 Thread Michel Dänzer
On Don, 2013-01-17 at 09:13 +0100, bluebubble wrote: 
 Il 15/01/13 09:16, Michel Dänzer ha scritto:
  As you can see, the X server hardly leaked any memory on exit. You
  really need to trigger valgrind to print information about where memory
  was allocated from while memory usage appears high during runtime.
 
 ehm I didn't find how to do that. Could you provide me some hint?

As I said, I'd have to research it myself. I vaguely remember one can
send some signal to the valgrind process to trigger it.


 I've tested that bug outside of KDE (fluxbox and openbox to be more 
 specific) and with my netbook (it has an intel video card) and the bug 
 is there too. So this is probably not a radeon related bug (maybe it 
 should be moved in gtk2-engines-oxygen package?).

The evidence does seem to point in that direction.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2013-01-15 Thread Michel Dänzer
On Mon, 2013-01-14 at 23:29 +0100, bluebubble wrote: 
 Il 13/12/12 10:46, Michel Dänzer ha scritto:
  If yes, you'll need to investigate the leak with valgrind or some other
  tool for this. Note that such tools may not help on X server shutdown,
  as the X server may still clean up the memory at that point. I think you
  can get an intermittent leak report from valgrind by sending it some
  signal, but I don't remember the details.
 
 
 
 sorry if I'm a bit late with the response.
 
 I've run Xorg with valgrind using this command:
 /usr/bin/valgrind -v --track-origins=yes --leak-check=full 
 --show-reachable=yes --log-file=/tmp/X.log /usr/bin/Xorg $@
 
 Attached there is the log.

[...]

 ==27767== LEAK SUMMARY:
 ==27767==definitely lost: 88,974 bytes in 367 blocks
 ==27767==indirectly lost: 68,924 bytes in 381 blocks
 ==27767==  possibly lost: 0 bytes in 0 blocks
 ==27767==still reachable: 271,956 bytes in 2,656 blocks
 ==27767== suppressed: 0 bytes in 0 blocks

As you can see, the X server hardly leaked any memory on exit. You
really need to trigger valgrind to print information about where memory
was allocated from while memory usage appears high during runtime.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-13 Thread Michel Dänzer
On Mit, 2012-12-12 at 18:56 +0100, bluebubble wrote: 
 Il 12/12/12 17:42, Michel Dänzer ha scritto:
  On Mit, 2012-12-12 at 15:48 +0100, bluebubble wrote:
  Il 12/12/12 15:29, Michel Dänzer ha scritto:
  On Mit, 2012-12-12 at 13:14 +0100, bluebubble wrote:
  Il 12/12/12 12:35, Michel Dänzer ha scritto:
  On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:
 
  as the title state i'm noticing huge memory leaks with oxygen-gtk
  theme under KDE.
  With xrestop i can see with a sample application like pidgin that for
  example each time i move the mouse over a popup menu resource are
  never freed (pixmaps and Misc counters grows indefinitely and also
  their memory occupation).
 
  Do the leaked resources persist when the application terminates?
 
  This is most likely an oxygen-gtk / GTK+ issue.
 
  yes sorry but i forgot to mention that very few resources are freed when
  pidgin (or another gtk app) terminate.
 
  Example:
 
  ps aux before running pidgin:
  [...]
 
  That may be due to heap fragmentation (memory allocated from the heap
  can only be returned to the system from the end of the allocated range,
  not in the middle of it).
 
  If the pixmaps no longer show up in xrestop, their memory is freed as
  far as the X server is concerned, and they were most certainly allocated
  by oxygen-gtk / GTK+.
 
  I don't think this is due to heap fragmentation I could easily made Xorg
  leak hundreds of MB and they where never freed.
 
  How is that an argument against heap fragmentation?
 
 
  Pixmaps always show up in xrestop when the application is running but if
  I close the application how could I know if they where actually released?
 
  As I said, if they weren't freed, they'd still show up in xrestop.
 
 Sorry I wrongly read the memory reported by xrestop it isn't a great 
 amount that could justify the leak.

Okay.

Have you tried something like: After making the X server memory usage
grow significantly, quit pidgin, then start it again and do whatever it
is that triggers this. Does the X server memory usage start growing
again immediately?

If yes, you'll need to investigate the leak with valgrind or some other
tool for this. Note that such tools may not help on X server shutdown,
as the X server may still clean up the memory at that point. I think you
can get an intermittent leak report from valgrind by sending it some
signal, but I don't remember the details.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-13 Thread bluebubble

Il 13/12/12 10:46, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 18:56 +0100, bluebubble wrote:

Il 12/12/12 17:42, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 15:48 +0100, bluebubble wrote:

Il 12/12/12 15:29, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 13:14 +0100, bluebubble wrote:

Il 12/12/12 12:35, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:


as the title state i'm noticing huge memory leaks with oxygen-gtk
theme under KDE.
With xrestop i can see with a sample application like pidgin that for
example each time i move the mouse over a popup menu resource are
never freed (pixmaps and Misc counters grows indefinitely and also
their memory occupation).


Do the leaked resources persist when the application terminates?

This is most likely an oxygen-gtk / GTK+ issue.


yes sorry but i forgot to mention that very few resources are freed when
pidgin (or another gtk app) terminate.

Example:

ps aux before running pidgin:
[...]


That may be due to heap fragmentation (memory allocated from the heap
can only be returned to the system from the end of the allocated range,
not in the middle of it).

If the pixmaps no longer show up in xrestop, their memory is freed as
far as the X server is concerned, and they were most certainly allocated
by oxygen-gtk / GTK+.


I don't think this is due to heap fragmentation I could easily made Xorg
leak hundreds of MB and they where never freed.


How is that an argument against heap fragmentation?



Pixmaps always show up in xrestop when the application is running but if
I close the application how could I know if they where actually released?


As I said, if they weren't freed, they'd still show up in xrestop.


Sorry I wrongly read the memory reported by xrestop it isn't a great
amount that could justify the leak.


Okay.

Have you tried something like: After making the X server memory usage
grow significantly, quit pidgin, then start it again and do whatever it
is that triggers this. Does the X server memory usage start growing
again immediately?



well I found that it have a strange behavior.
Here is the steps to reproduce it:
- start pidgin
- produce the leak with the icons found in two submenu lets say submenu 
A and submenu B

- close pidgin and start it again
- try to produce the leak with A and B but it doesn't work and no 
leaks are produced

- use a third submenu C to produce the leak (it works)
- go back to A and B (without closing pidgin) that now are producing 
the leaks again

- close pidgin and start it again
- now A, B and C doesn't produce leaks unless I first use a fourth 
submenu D

- loop until no more submenu are left. Now pidgin is leak safe :p

I will soon try with valgrind.


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-12 Thread Michel Dänzer
On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote: 
 
 as the title state i'm noticing huge memory leaks with oxygen-gtk
 theme under KDE.
 With xrestop i can see with a sample application like pidgin that for
 example each time i move the mouse over a popup menu resource are
 never freed (pixmaps and Misc counters grows indefinitely and also
 their memory occupation).

Do the leaked resources persist when the application terminates?

This is most likely an oxygen-gtk / GTK+ issue.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-12 Thread bluebubble

Il 12/12/12 12:35, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:


as the title state i'm noticing huge memory leaks with oxygen-gtk
theme under KDE.
With xrestop i can see with a sample application like pidgin that for
example each time i move the mouse over a popup menu resource are
never freed (pixmaps and Misc counters grows indefinitely and also
their memory occupation).


Do the leaked resources persist when the application terminates?

This is most likely an oxygen-gtk / GTK+ issue.




yes sorry but i forgot to mention that very few resources are freed when 
pidgin (or another gtk app) terminate.


Example:

ps aux before running pidgin:
USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND
root  3245  2.4  4.3 119908 90528 tty7 Ss+  Dec11  26:30 
/usr/bin/X :0 vt7 -br -nolisten tcp -auth /var/run/xauth/A:0-HYM64a


ps aux with pidgin running (after i made it leak some MB):
USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND
root  3245  2.4  5.0 133008 104016 tty7Ss+  Dec11  26:41 
/usr/bin/X :0 vt7 -br -nolisten tcp -auth /var/run/xauth/A:0-HYM64a


ps aux with pidgin terminated
USER   PID %CPU %MEMVSZ   RSS TTY  STAT START   TIME COMMAND
root  3245  2.4  5.0 132952 103944 tty7Ss+  Dec11  26:41 
/usr/bin/X :0 vt7 -br -nolisten tcp -auth /var/run/xauth/A:0-HYM64a


Thanks for the reply


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-12 Thread Michel Dänzer
On Mit, 2012-12-12 at 13:14 +0100, bluebubble wrote: 
 Il 12/12/12 12:35, Michel Dänzer ha scritto:
  On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:
 
  as the title state i'm noticing huge memory leaks with oxygen-gtk
  theme under KDE.
  With xrestop i can see with a sample application like pidgin that for
  example each time i move the mouse over a popup menu resource are
  never freed (pixmaps and Misc counters grows indefinitely and also
  their memory occupation).
 
  Do the leaked resources persist when the application terminates?
 
  This is most likely an oxygen-gtk / GTK+ issue.
 
 yes sorry but i forgot to mention that very few resources are freed when 
 pidgin (or another gtk app) terminate.
 
 Example:
 
 ps aux before running pidgin:
 [...]

That may be due to heap fragmentation (memory allocated from the heap
can only be returned to the system from the end of the allocated range,
not in the middle of it).

If the pixmaps no longer show up in xrestop, their memory is freed as
far as the X server is concerned, and they were most certainly allocated
by oxygen-gtk / GTK+.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-12 Thread bluebubble

Il 12/12/12 15:29, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 13:14 +0100, bluebubble wrote:

Il 12/12/12 12:35, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:


as the title state i'm noticing huge memory leaks with oxygen-gtk
theme under KDE.
With xrestop i can see with a sample application like pidgin that for
example each time i move the mouse over a popup menu resource are
never freed (pixmaps and Misc counters grows indefinitely and also
their memory occupation).


Do the leaked resources persist when the application terminates?

This is most likely an oxygen-gtk / GTK+ issue.


yes sorry but i forgot to mention that very few resources are freed when
pidgin (or another gtk app) terminate.

Example:

ps aux before running pidgin:
[...]


That may be due to heap fragmentation (memory allocated from the heap
can only be returned to the system from the end of the allocated range,
not in the middle of it).

If the pixmaps no longer show up in xrestop, their memory is freed as
far as the X server is concerned, and they were most certainly allocated
by oxygen-gtk / GTK+.




I don't think this is due to heap fragmentation I could easily made Xorg 
leak hundreds of MB and they where never freed.


Pixmaps always show up in xrestop when the application is running but if 
I close the application how could I know if they where actually released?
I just notice that X memory occupation doesn't decrease much just few KB 
freed vs many MB of pixmaps not freed (You could easily see that from 
the output of ps).



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-12 Thread Michel Dänzer
On Mit, 2012-12-12 at 15:48 +0100, bluebubble wrote: 
 Il 12/12/12 15:29, Michel Dänzer ha scritto:
  On Mit, 2012-12-12 at 13:14 +0100, bluebubble wrote:
  Il 12/12/12 12:35, Michel Dänzer ha scritto:
  On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:
 
  as the title state i'm noticing huge memory leaks with oxygen-gtk
  theme under KDE.
  With xrestop i can see with a sample application like pidgin that for
  example each time i move the mouse over a popup menu resource are
  never freed (pixmaps and Misc counters grows indefinitely and also
  their memory occupation).
 
  Do the leaked resources persist when the application terminates?
 
  This is most likely an oxygen-gtk / GTK+ issue.
 
  yes sorry but i forgot to mention that very few resources are freed when
  pidgin (or another gtk app) terminate.
 
  Example:
 
  ps aux before running pidgin:
  [...]
 
  That may be due to heap fragmentation (memory allocated from the heap
  can only be returned to the system from the end of the allocated range,
  not in the middle of it).
 
  If the pixmaps no longer show up in xrestop, their memory is freed as
  far as the X server is concerned, and they were most certainly allocated
  by oxygen-gtk / GTK+.
 
 I don't think this is due to heap fragmentation I could easily made Xorg 
 leak hundreds of MB and they where never freed.

How is that an argument against heap fragmentation?


 Pixmaps always show up in xrestop when the application is running but if 
 I close the application how could I know if they where actually released?

As I said, if they weren't freed, they'd still show up in xrestop.


-- 
Earthling Michel Dänzer   |   http://www.amd.com
Libre software enthusiast |  Debian, X and DRI developer


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#695757: xserver-xorg-video-radeon: Memory leak in Xorg when using oxygen-gtk as gtk2 theme

2012-12-12 Thread bluebubble

Il 12/12/12 17:42, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 15:48 +0100, bluebubble wrote:

Il 12/12/12 15:29, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 13:14 +0100, bluebubble wrote:

Il 12/12/12 12:35, Michel Dänzer ha scritto:

On Mit, 2012-12-12 at 12:22 +0100, bluebubble wrote:


as the title state i'm noticing huge memory leaks with oxygen-gtk
theme under KDE.
With xrestop i can see with a sample application like pidgin that for
example each time i move the mouse over a popup menu resource are
never freed (pixmaps and Misc counters grows indefinitely and also
their memory occupation).


Do the leaked resources persist when the application terminates?

This is most likely an oxygen-gtk / GTK+ issue.


yes sorry but i forgot to mention that very few resources are freed when
pidgin (or another gtk app) terminate.

Example:

ps aux before running pidgin:
[...]


That may be due to heap fragmentation (memory allocated from the heap
can only be returned to the system from the end of the allocated range,
not in the middle of it).

If the pixmaps no longer show up in xrestop, their memory is freed as
far as the X server is concerned, and they were most certainly allocated
by oxygen-gtk / GTK+.


I don't think this is due to heap fragmentation I could easily made Xorg
leak hundreds of MB and they where never freed.


How is that an argument against heap fragmentation?



Pixmaps always show up in xrestop when the application is running but if
I close the application how could I know if they where actually released?


As I said, if they weren't freed, they'd still show up in xrestop.




Sorry I wrongly read the memory reported by xrestop it isn't a great 
amount that could justify the leak.


Here some output:

After fresh X server start:
Pixmaps:4987K total, Other:  65K total, All:5052K total

Pidgin with oxygen-gtk just started (with no apparent leaks):
Pixmaps:5590K total, Other:  81K total, All:5672K total
res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID 
Identifier

460 8   541  373  443  221K 12K234K 28441 Buddy List

Pidgin with a leak of 100MB on Xorg:
Pixmaps:6089K total, Other: 202K total, All:6291K total
res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier
46012   551 1888 5604  720K133K854K 28441 Buddy List

Pidgin closed:
Pixmaps:5111K total, Other:  68K total, All:5179K total

X before starting pidgin with QtCurve:
Pixmaps:5477K total, Other:  69K total, All:5547K total

Pidgin started (I've tried to do the same things that cause leak with 
oxygen-gtk):

Pixmaps:5827K total, Other:  73K total, All:5900K total
46010   321   11   43   92K  2K 95K 28511 Buddy List

Pidgin closed:
Pixmaps:5477K total, Other:  69K total, All:5547K total


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org