After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668894 - xvimagesink memleak
xvimagesink memleak
Status: RESOLVED NOTGNOME
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-01-28 10:59 UTC by Nicola
Modified: 2012-01-30 18:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicola 2012-01-28 10:59:50 UTC
Please try this pipeline:

gst-launch -e -v videotestsrc num-buffers=32 ! xvimagesink

valgrind reports:

==9324== 124 bytes in 1 blocks are definitely lost in loss record 1,759 of 1,928
==9324==    at 0x4C28F9F: malloc (vg_replace_malloc.c:236)
==9324==    by 0xA3B6564: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==9324==    by 0xA3B662A: ??? (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==9324==    by 0xA3B61CA: xcb_connect_to_display_with_auth_info (in /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0)
==9324==    by 0x9C99A01: _XConnectXCB (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==9324==    by 0x9C89740: XOpenDisplay (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==9324==    by 0x961F553: gst_xvimagesink_xcontext_get (xvimagesink.c:1800)
==9324==    by 0x9625D67: gst_xvimagesink_change_state (xvimagesink.c:2292)
==9324==    by 0x4E71E9B: gst_element_change_state (gstelement.c:2761)
==9324==    by 0x4E727F1: gst_element_set_state_func (gstelement.c:2717)
==9324==    by 0x4E5EEA9: gst_bin_change_state_func (gstbin.c:2209)
==9324==    by 0x4E71E9B: gst_element_change_state (gstelement.c:2761)
==9324==    by 0x4E727F1: gst_element_set_state_func (gstelement.c:2717)
==9324==    by 0x403AF1: main (gst-launch.c:1104)
Comment 1 Vincent Penquerc'h 2012-01-30 11:07:14 UTC
This does not look like a but in gstreamer as the function that closes the display also frees other stuff, which apparently do not leak since you only pasted that one above, so this suggests XCloseDisplay was called on the context.

Now, I'm no X hacker, so it may be we're misusing the API somehow, but at first glance it seems a xcb issue. Building with libxcb debug info to pinpoint the leak might help by looking at what exactly is leaking there.
Comment 2 Nicola 2012-01-30 12:07:46 UTC
Here is the valgrind report with libxcb debug symbols:

==6137== 124 bytes in 1 blocks are definitely lost in loss record 1,759 of 1,925
==6137==    at 0x4C28F9F: malloc (vg_replace_malloc.c:236)
==6137==    by 0xA3B6564: get_peer_sock_name (xcb_auth.c:259)
==6137==    by 0xA3B662A: _xcb_get_auth_info (xcb_auth.c:302)
==6137==    by 0xA3B61CA: xcb_connect_to_display_with_auth_info (xcb_util.c:424)
==6137==    by 0x9C99A01: _XConnectXCB (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==6137==    by 0x9C89740: XOpenDisplay (in /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0)
==6137==    by 0x961F553: gst_xvimagesink_xcontext_get (xvimagesink.c:1800)
==6137==    by 0x9625D67: gst_xvimagesink_change_state (xvimagesink.c:2292)
==6137==    by 0x4E71E9B: gst_element_change_state (gstelement.c:2761)
==6137==    by 0x4E727F1: gst_element_set_state_func (gstelement.c:2717)
==6137==    by 0x4E5EEA9: gst_bin_change_state_func (gstbin.c:2209)
==6137==    by 0x4E71E9B: gst_element_change_state (gstelement.c:2761)
==6137==    by 0x4E727F1: gst_element_set_state_func (gstelement.c:2717)
==6137==    by 0x403AF1: main (gst-launch.c:1104)
Comment 3 Nicola 2012-01-30 12:18:28 UTC
the problem seems in libxcb, reported there:

https://bugs.freedesktop.org/show_bug.cgi?id=45390
Comment 4 Alan Coopersmith 2012-01-30 18:09:41 UTC
Known bug in libxcb 1.7, fixed in the recently released libxcb 1.8:
https://bugs.freedesktop.org/show_bug.cgi?id=28526
Comment 5 Tim-Philipp Müller 2012-01-30 18:25:44 UTC
Thanks for the info Alan.