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 775516 - gif hangs and causes memory leaks
gif hangs and causes memory leaks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-libav
git master
Other Linux
: Normal normal
: 1.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-02 11:46 UTC by Hanno Böck
Modified: 2016-12-05 09:11 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hanno Böck 2016-12-02 11:46:40 UTC
File:
http://samples.mplayerhq.hu/internets/emblaze/www.jorgen.com/EVBorderT.gif

Hangs with gst-discoverer and produces various memory leaks.

ASAN memory leak reports:
==31110==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 232 byte(s) in 1 object(s) allocated from:
    #0 0x4d59d5 in __interceptor_posix_memalign (/root/gst/master/gst-plugins-base/tools/.libs/gst-discoverer-1.0+0x4d59d5)
    #1 0x7f8d0fe3642c in av_malloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:97:9
    #2 0x7f8d0fe3642c in av_mallocz /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:254
    #3 0x7f8d0d3be98b in avio_alloc_context /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/aviobuf.c:135:22
    #4 0x7f8d0d2e2280 in gst_ffmpeg_pipe_open /root/gst/master/gst-libav/ext/libav/gstavprotocol.c:344:7
    #5 0x7f8d0d347326 in gst_ffmpegdemux_open /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1214:11
    #6 0x7f8d0d347326 in gst_ffmpegdemux_loop /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1398
    #7 0x7f8d1e56f813 in gst_task_func /root/gst/master/gstreamer/gst/gsttask.c:334:5
    #8 0x7f8d1d76d857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #9 0x7f8d1d76cec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #10 0x7f8d1d1e9453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #11 0x7f8d1cd195dc in clone (/lib64/libc.so.6+0xe75dc)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x4d5035 in calloc (/root/gst/master/gst-plugins-base/tools/.libs/gst-discoverer-1.0+0x4d5035)
    #1 0x7f8d1d74acf0 in g_malloc0 /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gmem.c:124
    #2 0x7f8d0d2e0383 in gst_ffmpegdata_open /root/gst/master/gst-libav/ext/libav/gstavprotocol.c:236:10
    #3 0x7f8d0d3472d4 in gst_ffmpegdemux_open /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1212:11
    #4 0x7f8d0d3472d4 in gst_ffmpegdemux_loop /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1398
    #5 0x7f8d1e56f813 in gst_task_func /root/gst/master/gstreamer/gst/gsttask.c:334:5
    #6 0x7f8d1d76d857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #7 0x7f8d1d76cec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #8 0x7f8d1d1e9453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #9 0x7f8d1cd195dc in clone (/lib64/libc.so.6+0xe75dc)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x4d59d5 in __interceptor_posix_memalign (/root/gst/master/gst-plugins-base/tools/.libs/gst-discoverer-1.0+0x4d59d5)
    #1 0x7f8d0fe3642c in av_malloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:97:9
    #2 0x7f8d0fe3642c in av_mallocz /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:254
    #3 0x7f8d0fdea8af in av_buffer_create /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/buffer.c:48:11
    #4 0x7f8d0fdea8af in av_buffer_alloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/buffer.c:75
    #5 0x7f8d0d906461 in av_grow_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavcodec/avpacket.c:139:20
    #6 0x7f8d0d795b53 in append_packet_chunked /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:268:15
    #7 0x7f8d0d46749a in gif_read_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/gifdec.c:275:19
    #8 0x7f8d0d79a85b in ff_read_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:801:15
    #9 0x7f8d0d7a2c91 in read_frame_internal /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:1499:15
    #10 0x7f8d0d7b7af6 in avformat_find_stream_info /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:3549:15
    #11 0x7f8d0d2dfa4c in gst_ffmpeg_av_find_stream_info /root/gst/master/gst-libav/ext/libav/gstav.c:97:9
    #12 0x7f8d0d3474b4 in gst_ffmpegdemux_open /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1227:9
    #13 0x7f8d0d3474b4 in gst_ffmpegdemux_loop /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1398
    #14 0x7f8d1e56f813 in gst_task_func /root/gst/master/gstreamer/gst/gsttask.c:334:5
    #15 0x7f8d1d76d857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #16 0x7f8d1d76cec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #17 0x7f8d1d1e9453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #18 0x7f8d1cd195dc in clone (/lib64/libc.so.6+0xe75dc)

Indirect leak of 4096 byte(s) in 1 object(s) allocated from:
    #0 0x4d59d5 in __interceptor_posix_memalign (/root/gst/master/gst-plugins-base/tools/.libs/gst-discoverer-1.0+0x4d59d5)
    #1 0x7f8d0fe354e3 in av_malloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:97:9
    #2 0x7f8d0d2e2229 in gst_ffmpeg_pipe_open /root/gst/master/gst-libav/ext/libav/gstavprotocol.c:337:12
    #3 0x7f8d0d347326 in gst_ffmpegdemux_open /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1214:11
    #4 0x7f8d0d347326 in gst_ffmpegdemux_loop /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1398
    #5 0x7f8d1e56f813 in gst_task_func /root/gst/master/gstreamer/gst/gsttask.c:334:5
    #6 0x7f8d1d76d857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #7 0x7f8d1d76cec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #8 0x7f8d1d1e9453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #9 0x7f8d1cd195dc in clone (/lib64/libc.so.6+0xe75dc)

Indirect leak of 546 byte(s) in 1 object(s) allocated from:
    #0 0x4d59d5 in __interceptor_posix_memalign (/root/gst/master/gst-plugins-base/tools/.libs/gst-discoverer-1.0+0x4d59d5)
    #1 0x7f8d0fe354e3 in av_malloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:97:9
    #2 0x7f8d0fdea73e in av_buffer_alloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/buffer.c:71:12
    #3 0x7f8d0d906461 in av_grow_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavcodec/avpacket.c:139:20
    #4 0x7f8d0d795b53 in append_packet_chunked /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:268:15
    #5 0x7f8d0d46749a in gif_read_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/gifdec.c:275:19
    #6 0x7f8d0d79a85b in ff_read_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:801:15
    #7 0x7f8d0d7a2c91 in read_frame_internal /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:1499:15
    #8 0x7f8d0d7b7af6 in avformat_find_stream_info /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:3549:15
    #9 0x7f8d0d2dfa4c in gst_ffmpeg_av_find_stream_info /root/gst/master/gst-libav/ext/libav/gstav.c:97:9
    #10 0x7f8d0d3474b4 in gst_ffmpegdemux_open /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1227:9
    #11 0x7f8d0d3474b4 in gst_ffmpegdemux_loop /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1398
    #12 0x7f8d1e56f813 in gst_task_func /root/gst/master/gstreamer/gst/gsttask.c:334:5
    #13 0x7f8d1d76d857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #14 0x7f8d1d76cec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #15 0x7f8d1d1e9453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #16 0x7f8d1cd195dc in clone (/lib64/libc.so.6+0xe75dc)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x4d59d5 in __interceptor_posix_memalign (/root/gst/master/gst-plugins-base/tools/.libs/gst-discoverer-1.0+0x4d59d5)
    #1 0x7f8d0fe3642c in av_malloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:97:9
    #2 0x7f8d0fe3642c in av_mallocz /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/mem.c:254
    #3 0x7f8d0fdea7a0 in av_buffer_create /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/buffer.c:35:11
    #4 0x7f8d0fdea7a0 in av_buffer_alloc /root/gst/master/gst-libav/gst-libs/ext/libav/libavutil/buffer.c:75
    #5 0x7f8d0d906461 in av_grow_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavcodec/avpacket.c:139:20
    #6 0x7f8d0d795b53 in append_packet_chunked /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:268:15
    #7 0x7f8d0d46749a in gif_read_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/gifdec.c:275:19
    #8 0x7f8d0d79a85b in ff_read_packet /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:801:15
    #9 0x7f8d0d7a2c91 in read_frame_internal /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:1499:15
    #10 0x7f8d0d7b7af6 in avformat_find_stream_info /root/gst/master/gst-libav/gst-libs/ext/libav/libavformat/utils.c:3549:15
    #11 0x7f8d0d2dfa4c in gst_ffmpeg_av_find_stream_info /root/gst/master/gst-libav/ext/libav/gstav.c:97:9
    #12 0x7f8d0d3474b4 in gst_ffmpegdemux_open /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1227:9
    #13 0x7f8d0d3474b4 in gst_ffmpegdemux_loop /root/gst/master/gst-libav/ext/libav/gstavdemux.c:1398
    #14 0x7f8d1e56f813 in gst_task_func /root/gst/master/gstreamer/gst/gsttask.c:334:5
    #15 0x7f8d1d76d857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307
    #16 0x7f8d1d76cec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784
    #17 0x7f8d1d1e9453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #18 0x7f8d1cd195dc in clone (/lib64/libc.so.6+0xe75dc)

-----------------------------------------------------
Suppressions used:
  count      bytes template
      1      16384 g_quark_init
-----------------------------------------------------

SUMMARY: AddressSanitizer: 4962 byte(s) leaked in 6 allocation(s).
Comment 1 Sebastian Dröge (slomo) 2016-12-02 12:12:00 UTC
Also segfault in the debug output if enabling gst-libav debug output.
Comment 2 Sebastian Dröge (slomo) 2016-12-02 12:20:39 UTC
commit 77ad28cd44ab084ba43ef4df4167902cfa1f8fda
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Dec 2 14:19:46 2016 +0200

    avprotocol: Don't use GST_LOG_OBJECT() and friends on an arbitrary struct that is not a GObject
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775516
Comment 3 Sebastian Dröge (slomo) 2016-12-02 15:10:04 UTC
commit 35f9fd9355197e5ccd0c42b936d7cb3c7fe73e1c
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Fri Dec 2 17:06:50 2016 +0200

    avdemux: Disable GIF "demuxer"
    
    It's actually a parser but it a) can only work with the ffmpeg GIF
    decoder that is deactivated anyway, and b) it currently causes infinite
    linking of avdemux_gif elements with a multiqueue in between in
    decodebin.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775516