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 754459 - decodebin: fix event leak with validate.hls.playback.play_15s.hls_bibbop scenario
decodebin: fix event leak with validate.hls.playback.play_15s.hls_bibbop scen...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 1.6.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-09-02 14:12 UTC by Guillaume Desmottes
Modified: 2015-10-25 11:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decodebin: fix event leak (1.10 KB, patch)
2015-10-06 13:23 UTC, Guillaume Desmottes
committed Details | Review

Description Guillaume Desmottes 2015-09-02 14:12:34 UTC
I spotted this leak in validate.hls.playback.play_15s.hls_bibbop with gst master but didn't manage to finish tracking it down so I'm opening this bug for now.

==6706== 7,904 (2,704 direct, 5,200 indirect) bytes in 26 blocks are definitely lost in loss record 8,260 of 8,295
==6706==    at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6706==    by 0x7061679: g_malloc (gmem.c:97)
==6706==    by 0x7078CD2: g_slice_alloc (gslice.c:1007)
==6706==    by 0x707936D: g_slice_alloc0 (gslice.c:1032)
==6706==    by 0x61E1E53: gst_event_new_custom (gstevent.c:299)
==6706==    by 0x1B2EA5C8: gst_stream_synchronizer_src_event (gststreamsynchronizer.c:194)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_check (gst-validate-pad-monitor.c:1876)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_func (gst-validate-pad-monitor.c:2124)
==6706==    by 0x61F208A: gst_pad_send_event_unchecked (gstpad.c:5452)
==6706==    by 0x61F29A5: gst_pad_push_event_unchecked (gstpad.c:5123)
==6706==    by 0x61FBB86: gst_pad_push_event (gstpad.c:5258)
==6706==    by 0x61FBEFA: event_forward_func (gstpad.c:2896)
==6706==    by 0x61F82FD: gst_pad_forward (gstpad.c:2850)
==6706==    by 0x61F842A: gst_pad_event_default (gstpad.c:2947)
==6706==    by 0x61F208A: gst_pad_send_event_unchecked (gstpad.c:5452)
==6706==    by 0x61F29A5: gst_pad_push_event_unchecked (gstpad.c:5123)
==6706==    by 0x61FBB86: gst_pad_push_event (gstpad.c:5258)
==6706==    by 0x5F5FDEC: gst_base_transform_src_eventfunc (gstbasetransform.c:2010)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_check (gst-validate-pad-monitor.c:1876)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_func (gst-validate-pad-monitor.c:2124)
==6706==    by 0x61F208A: gst_pad_send_event_unchecked (gstpad.c:5452)
==6706==    by 0x61F29A5: gst_pad_push_event_unchecked (gstpad.c:5123)
==6706== 
==6706== 16,416 (1,728 direct, 14,688 indirect) bytes in 54 blocks are definitely lost in loss record 8,278 of 8,295
==6706==    at 0x4C28C50: malloc (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
==6706==    by 0x7061679: g_malloc (gmem.c:97)
==6706==    by 0x7078CD2: g_slice_alloc (gslice.c:1007)
==6706==    by 0x6215B82: gst_structure_new_id_empty_with_size (gststructure.c:145)
==6706==    by 0x62181E0: gst_structure_new_id (gststructure.c:750)
==6706==    by 0x61E2F16: gst_event_new_qos (gstevent.c:1013)
==6706==    by 0x1B2EA5C8: gst_stream_synchronizer_src_event (gststreamsynchronizer.c:194)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_check (gst-validate-pad-monitor.c:1876)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_func (gst-validate-pad-monitor.c:2124)
==6706==    by 0x61F208A: gst_pad_send_event_unchecked (gstpad.c:5452)
==6706==    by 0x61F29A5: gst_pad_push_event_unchecked (gstpad.c:5123)
==6706==    by 0x61FBB86: gst_pad_push_event (gstpad.c:5258)
==6706==    by 0x61FBEFA: event_forward_func (gstpad.c:2896)
==6706==    by 0x61F82FD: gst_pad_forward (gstpad.c:2850)
==6706==    by 0x61F842A: gst_pad_event_default (gstpad.c:2947)
==6706==    by 0x61F208A: gst_pad_send_event_unchecked (gstpad.c:5452)
==6706==    by 0x61F29A5: gst_pad_push_event_unchecked (gstpad.c:5123)
==6706==    by 0x61FBB86: gst_pad_push_event (gstpad.c:5258)
==6706==    by 0x5F5FDEC: gst_base_transform_src_eventfunc (gstbasetransform.c:2010)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_check (gst-validate-pad-monitor.c:1876)
==6706==    by 0x4E4AFB5: gst_validate_pad_monitor_src_event_func (gst-validate-pad-monitor.c:2124)
==6706==    by 0x61F208A: gst_pad_send_event_unchecked (gstpad.c:5452)
Comment 1 Guillaume Desmottes 2015-10-06 13:23:32 UTC
Looks like the leak is in decodebin.
Comment 2 Guillaume Desmottes 2015-10-06 13:23:48 UTC
Created attachment 312731 [details] [review]
decodebin: fix event leak

As stated in GST_PAD_PROBE_HANDLED's documentation, we are supposed to
unref the event before returning.

Fix an event leak in the validate.hls.playback.play_15s.hls_bibbop
validate scenario.
Comment 3 Tim-Philipp Müller 2015-10-25 11:27:49 UTC
Thanks for the patch!

commit 7d6b6b0313028074aa8adf1b3d7af77bb100fc66
Author: Guillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Date:   Tue Oct 6 15:20:51 2015 +0200

    decodebin: fix event leak
    
    As stated in GST_PAD_PROBE_HANDLED's documentation, we are
    supposed to unref the event before returning.
    
    Fixes an event leak in the validate.hls.playback.play_15s.hls_bibbop
    validate scenario.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=754459