Skip to contentSkip to conversation

New: memory leak under Xwayland with old sdl1 applications

Bug 97065 [email protected] 1 participant 14 messages Jul 24, 2016 – Aug 1, 2016 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=97065

Bug ID: 97065
Summary: memory leak under Xwayland with old sdl1 applications
Product: xorg
Version: unspecified
Hardware: Other
OS: All
Status: NEW
Severity: normal
Priority: medium
Component: Driver/nouveau
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

Created attachment 125286
--> https://bugs.freedesktop.org/attachment.cgi?id=125286&action=edit
first memory map.

When running old applications under wayland/nouveau, there is a memory leak in Xwayland.
Gtk2 applications show but this it is minimal. memory is not freed when the application exits.
Using sdl1 applications makes the leaks very high, around 300 to 400Kbytes per minute.
I asked on #wayland on freenode and it was suggested I post memory maps.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): bug-97065-8800-V0hAGp6uBxMKqLRl/[email protected]/

#2 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #1 from Hussam Al-Tayeb <[email protected]> --- Created attachment 125287
--> https://bugs.freedesktop.org/attachment.cgi?id=125287&action=edit
second memory map after memory increase

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#3 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #2 from Hussam Al-Tayeb <[email protected]> --- Created attachment 125288
--> https://bugs.freedesktop.org/attachment.cgi?id=125288&action=edit
third memory map

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#4 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #3 from Hussam Al-Tayeb <[email protected]> --- Created attachment 125289
--> https://bugs.freedesktop.org/attachment.cgi?id=125289&action=edit
forth memory map of xwayland process

Note that after exiting eveything, memory is not recovered.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#5 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #4 from Hussam Al-Tayeb <[email protected]> --- Firefox nightly 50a1 also causes this but only around 200Kbytes per minute. Still memory is not freed on closing firefox.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #5 from Link Mauve <[email protected]> --- Hi again Hussam, please also run xrestop and report whether something actually increases there.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #6 from Hussam Al-Tayeb <[email protected]> --- (In reply to Link Mauve from comment #5)

Quoted 2 lines

Hi again Hussam, please also run xrestop and report whether something actually increases there.

I tried that. Xwayland's memory usage increases without an increase in pixmaps memory count according to xrestop.
Simply using a sdl1, or gtk2 application or firefox slowly makes Xwayland memory usage increase.

When I close firefox, the total pixmap memory usage according to xrestop decreases but xwayland never frees memory. It seems to just use more as I use my computer.
Switching windows sometimes causes an increase. It even suddenly used 200k more while I switched between gnome-terminal and firefox.

In either case, the reading according to xrestop seems to be stable. No increases there unless I open more applications.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#8 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #7 from Michel Dänzer <[email protected]> --- The most helpful information would be from running Xwayland in valgrind --leak-check=full.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#9 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #8 from Hussam Al-Tayeb <[email protected]> --- (In reply to Michel Dänzer from comment #7)

Quoted 2 lines

The most helpful information would be from running Xwayland in valgrind --leak-check=full.

How? if I kill the current Xwayland, gnome exits.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#10 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #9 from Michel Dänzer <[email protected]> --- There are a few possibilities:

* You can start a second Xwayland instance, e.g. something like

   valgrind --leak-check=full Xwayland :99 -noreset

and then make clients connect to it by setting the environment variable DISPLAY=:99

* Find out how to make gnome-shell launch Xwayland in valgrind

* Do it in weston instead of in GNOME

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#11 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #10 from Hussam Al-Tayeb <[email protected]> --- (In reply to Michel Dänzer from comment #9)

Quoted 4 lines

There are a few possibilities:

* You can start a second Xwayland instance, e.g. something like

Quoted 8 lines
   valgrind --leak-check=full Xwayland :99 -noreset

and then make clients connect to it by setting the environment variable DISPLAY=:99

* Find out how to make gnome-shell launch Xwayland in valgrind

* Do it in weston instead of in GNOME

I asked on irc yesterday if it is possible to start a second Xwayland instance and I was told no.
Now I am glad it is possible to do so.
Thank you. I will try that.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#12 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

--- Comment #11 from Hussam Al-Tayeb <[email protected]> --- Created attachment 125446
--> https://bugs.freedesktop.org/attachment.cgi?id=125446&action=edit
valgrind log

Not very useful as I still need to recompile arch linux's packages with debug symbols but this is the valgrind log.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#13 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #125446|application/octet-stream    |application/gzip
          mime type|                            |
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#14 lore raw

[Bug 97065] memory leak under Xwayland with old sdl1 applications

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=97065

Michel Dänzer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

          Component|Driver/nouveau              |XWayland
            Product|xorg                        |Wayland
           Assignee|[email protected] |wayland-bugs-PD4FTy7X32lzq7FAFJ/[email protected]
                   |rg                          |top.org

--- Comment #12 from Michel Dänzer <[email protected]> --- Looks like there's a leak between Xwayland and libwayland-client:

==6371== 803,664 bytes in 11,162 blocks are definitely lost in loss record 3,443 of 3,443
==6371== at 0x4C2CA4A: calloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==6371== by 0x5568B72: ??? (in /usr/lib/libwayland-client.so.0.3.0)
==6371== by 0x5569094: wl_proxy_marshal_array_constructor_versioned (in
/usr/lib/libwayland-client.so.0.3.0)
==6371== by 0x55693B9: wl_proxy_marshal_constructor (in
/usr/lib/libwayland-client.so.0.3.0)

==6371==    by 0x423BDC: ??? (in /usr/bin/Xwayland)
==6371==    by 0x5576A0: BlockHandler (in /usr/bin/Xwayland)
==6371==    by 0x586DBA: WaitForSomething (in /usr/bin/Xwayland)
==6371==    by 0x552A3D: ??? (in /usr/bin/Xwayland)
==6371==    by 0x556C62: ??? (in /usr/bin/Xwayland)
==6371==    by 0x6F0C740: (below main) (in /usr/lib/libc-2.23.so)
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau