#909682 Memory leak with gst_tag_list_add_id3_image

Package:
clementine
Source:
clementine
Description:
modern music player and library organizer
Submitter:
Anthony DeRobertis
Date:
2018-11-30 20:48:03 UTC
Severity:
normal
#909682#5
Date:
2018-09-26 17:42:01 UTC
From:
To:
I'm not sure if this is a Clementine bug or a Gstreamer bug, but I've
noticed that when I leave Clementine running for a bit, its memory usage
grows massive (many GiB). I'm playing almost exlusively FLAC files,
which all have (fairly large) embedded artwork, multiple images per
file.

I used heaptrack to attempt to track down where the memory leak is. This
is after only a day or two of use:

MEMORY LEAKS
857.27MB leaked over 2418654 calls from
g_malloc
  in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
826.58MB leaked over 1941 calls from:
    g_slice_alloc
      in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    0x7fe9ca6e49d0
      in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
    gst_buffer_new_allocate
      in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
    gst_tag_image_data_to_image_sample
      in /usr/lib/x86_64-linux-gnu/libgsttag-1.0.so.0
    gst_tag_list_add_id3_image
      in /usr/lib/x86_64-linux-gnu/libgsttag-1.0.so.0
    0x7fe994f1ca1f
      in /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstaudioparsers.so
    0x7fe9ca8116b1
      in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
    0x7fe9ca811d8e
      in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
    0x7fe9ca815301
      in /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
    0x7fe9ca75df40
      in /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
    0x7fe9ca8ddad2
      in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    0x7fe9ca8dd134
      in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
    start_thread
      in /lib/x86_64-linux-gnu/libpthread.so.0
    __clone
      in /lib/x86_64-linux-gnu/libc.so.6

I have no idea why that backtrace doesn't show any Clementine code in
it. I tried installing some more -dbg/-dbgsym packages, but maybe I had
to do it before starting Clementine.

Note this is the main clementine process, not the tagreader processes:

$ ps u | sed -e '1p;/[c]lementine/!d'
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
anthony  15944  0.5  6.6 4407604 1650488 pts/4 Sl+  Sep24  16:30 clementine
anthony  15956  0.0  0.1 276992 37368 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-631367825
anthony  15958  0.0  0.1 276992 39392 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-792921086
anthony  15959  0.0  0.1 276992 37676 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-1767394138
anthony  15963  0.0  0.1 276988 37340 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-1468073315
anthony  15967  0.0  0.1 276988 37492 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-1581559023
anthony  15968  0.0  0.1 276992 37624 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-1038521661
anthony  15969  0.0  0.1 276992 39180 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-1682697807
anthony  15970  0.0  0.1 276992 37908 pts/4    Sl+  Sep24   0:20 /usr/bin/clementine-tagreader /tmp/clementine_-391160903

#909682#10
Date:
2018-11-08 01:50:15 UTC
From:
To:
Dear Maintainer, hello Anthony DeRobertis,

I just tried to reproduce this issue in a buster amd64
qemu VM with a uptodate buster at 2018-09-27.

I could just get a backtrace with debug symbols that
looks very similar to Anthonys call stack from heaptrack:

(gdb) bt
#0  0x00007ffff5de3640 in g_malloc (n_bytes=n_bytes@entry=4079355) at ../../../../glib/gmem.c:95
#1  0x00007ffff5dfb5b3 in g_slice_alloc (mem_size=mem_size@entry=4079355) at ../../../../glib/gslice.c:1024
#2  0x00007ffff5c0d9d1 in _sysmem_new_block (flags=(unknown: 0), maxsize=4079211, align=7, offset=0, size=4079204) at gstallocator.c:417
#3  0x00007ffff5c190c2 in gst_buffer_new_allocate (allocator=allocator@entry=0x0, size=size@entry=4079204, params=params@entry=0x0) at gstbuffer.c:839
#4  0x00007ffff6c61412 in gst_tag_image_data_to_image_sample (image_data=0x7fff600380d1 "\377\330\377", <incomplete sequence \340>, image_data_len=4079203, image_type=GST_TAG_IMAGE_TYPE_BACK_COVER) at tags.c:528
#5  0x00007ffff6c513b3 in gst_tag_list_add_id3_image (tag_list=0x7fff60003140, image_data=<optimized out>, image_data_len=image_data_len@entry=4079203, id3_picture_type=<optimized out>) at gstid3tag.c:379
#6  0x00007fffa0065b00 in gst_flac_parse_handle_picture (buffer=0x7fff5c02f6d0, flacparse=0x7fff5c049af0 [GstFlacParse]) at /usr/include/gstreamer-1.0/gst/base/gstbytereader.h:651
#7  0x00007fffa0065b00 in gst_flac_parse_handle_block_type (sbuffer=0x7fff5c02f6d0, type=6, flacparse=0x7fff5c049af0 [GstFlacParse]) at gstflacparse.c:1520
#8  0x00007fffa0065b00 in gst_flac_parse_parse_frame (frame=0x7fff600030f0, frame=0x7fff600030f0, size=4079268, parse=0x7fff5c049af0 [GstFlacParse]) at gstflacparse.c:1574
#9  0x00007fffa0065b00 in gst_flac_parse_handle_frame (parse=0x7fff5c049af0 [GstFlacParse], frame=0x7fff600030f0, skipsize=<optimized out>) at gstflacparse.c:870
#10 0x00007ffff5d3a6b2 in gst_base_parse_handle_buffer (parse=parse@entry=0x7fff5c049af0 [GstFlacParse], buffer=<optimized out>, skip=skip@entry=0x7fff737e075c, flushed=flushed@entry=0x7fff737e0758) at gstbaseparse.c:2160
#11 0x00007ffff5d3ad8f in gst_base_parse_scan_frame (parse=parse@entry=0x7fff5c049af0 [GstFlacParse], klass=<optimized out>) at gstbaseparse.c:3464
#12 0x00007ffff5d3e302 in gst_base_parse_loop (pad=<optimized out>) at gstbaseparse.c:3543
#13 0x00007ffff5c86f41 in gst_task_func (task=0x7fff78042830 [GstTask]) at gsttask.c:332
#14 0x00007ffff5e06ad3 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../../glib/gthreadpool.c:307
#15 0x00007ffff5e06135 in g_thread_proxy (data=0x7fff5c045b70) at ../../../../glib/gthread.c:784
#16 0x00007ffff61aaf2a in start_thread (arg=0x7fff737e1700) at pthread_create.c:463
#17 0x00007ffff3f09edf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

(For some reason heaptracks locations 3 last digits are one lower than gdbs?)

Unfortunately I never received a heaptrack report that
shows this allocation as leaked on my test system.
Was this a different heaptrack version or I just used it wrong?

Also a valgrind run did not show a leak at this location.

Heaptrack may be not prepared to use the debug information
delivered by the dbg packages. I also got no stacks from heaptrack
files record while dbgsym packages were installed.

While playing I could not see an increase of memory usage percentage in htop.


Following is the location where the memory allocated in given
stack was freed in my test system:

(gdb) bt
#0  0x00007ffff5de3720 in g_free (mem=0x7fff6041bf50) at ../../../../glib/gmem.c:193
#1  0x00007ffff5c4bb88 in _gst_memory_free (mem=0x7fff6041bf50) at gstmemory.c:97
#2  0x00007ffff5c1794a in gst_memory_unref (memory=<optimized out>) at ../gst/gstmemory.h:345
#3  0x00007ffff5c1794a in _gst_buffer_free (buffer=0x7fff5c02fd30) at gstbuffer.c:749
#4  0x00007ffff5c76713 in gst_buffer_unref (buf=<optimized out>) at ../gst/gstbuffer.h:442
#5  0x00007ffff5c76713 in _gst_sample_free (sample=0x7fffd41290f0) at gstsample.c:82
#6  0x00007ffff5ee45e0 in g_value_unset (value=value@entry=0x7fff6c005b18) at ../../../../gobject/gvalue.c:275
#7  0x00007ffff5c79cdc in gst_structure_free (structure=0x7fffd41091a0) at gststructure.c:385
#8  0x00007ffff5c8149d in __gst_tag_list_free (list=0x7fffd411f9e0) at gsttaglist.c:720
#9  0x00007ffff5ee45e0 in g_value_unset (value=value@entry=0x7fff6c0042b8) at ../../../../gobject/gvalue.c:275
#10 0x00007ffff5c79cdc in gst_structure_free (structure=0x7fffd4120580) at gststructure.c:385
#11 0x00007ffff5c4746d in _gst_message_free (message=0x7fff78043590) at gstmessage.c:218
#12 0x00007ffff5dd9e5d in g_list_foreach (list=<optimized out>, list@entry=0x555556f4d340 = {...}, func=0x7ffff5c1eb60 <gst_message_unref>, user_data=user_data@entry=0x0) at ../../../../glib/glist.c:1013
#13 0x00007ffff5dd9e8b in g_list_free_full (list=0x555556f4d340 = {...}, free_func=<optimized out>) at ../../../../glib/glist.c:223
#14 0x00007ffff5c1fdaf in gst_bus_set_flushing (bus=<optimized out>, flushing=<optimized out>) at gstbus.c:478
#15 0x00007ffff5c5f3e5 in gst_pipeline_change_state (element=0x5555576de090 [GstPipeline], transition=<optimized out>) at gstpipeline.c:549
#16 0x00007ffff5c38eee in gst_element_change_state (element=element@entry=0x5555576de090 [GstPipeline], transition=GST_STATE_CHANGE_READY_TO_NULL) at gstelement.c:2952
#17 0x00007ffff5c398ee in gst_element_continue_state (element=element@entry=0x5555576de090 [GstPipeline], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at gstelement.c:2660
#18 0x00007ffff5c390d5 in gst_element_change_state (element=element@entry=0x5555576de090 [GstPipeline], transition=<optimized out>) at gstelement.c:2991
#19 0x00007ffff5c398ee in gst_element_continue_state (element=element@entry=0x5555576de090 [GstPipeline], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at gstelement.c:2660
#20 0x00007ffff5c390d5 in gst_element_change_state (element=element@entry=0x5555576de090 [GstPipeline], transition=transition@entry=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstelement.c:2991
#21 0x00007ffff5c3960e in gst_element_set_state_func (element=0x5555576de090 [GstPipeline], state=GST_STATE_NULL) at gstelement.c:2906
#22 0x00005555558d3cd2 in GstEnginePipeline::~GstEnginePipeline() (this=0x555557178d30, __in_chrg=<optimized out>) at ./src/engines/gstenginepipeline.cpp:506
#23 0x00005555558d3e09 in GstEnginePipeline::~GstEnginePipeline() (this=0x555557178d30, __in_chrg=<optimized out>) at ./src/engines/gstenginepipeline.cpp:501
#24 0x00005555558c6792 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (this=0x5555573e0550) at /usr/include/c++/8/ext/atomicity.h:69
#25 0x00005555558c6792 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:706
#26 0x00005555558c6792 in std::__shared_ptr<GstEnginePipeline, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:1145
#27 0x00005555558c6792 in std::__shared_ptr<GstEnginePipeline, (__gnu_cxx::_Lock_policy)2>::reset() (this=0x55555680d778) at /usr/include/c++/8/bits/shared_ptr_base.h:1263
#28 0x00005555558c6792 in GstEngine::EndOfStreamReached(int, bool) (this=0x55555680d6c0, pipeline_id=<optimized out>, has_next_track=<optimized out>) at ./src/engines/gstengine.cpp:753
#29 0x0000555555ae8262 in GstEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55555680d6c0, _c=<optimized out>, _id=<optimized out>, _a=0x7fff64003ec0) at ./obj-x86_64-linux-gnu/src/engines/moc_gstengine.cpp:211
#30 0x00007ffff721a072 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff4c864a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff4c8dae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff71f0579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007ffff71f356b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007ffff7242c03 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007ffff5dddc3e in g_main_dispatch (context=0x55555677a3e0) at ../../../../glib/gmain.c:3182
#37 0x00007ffff5dddc3e in g_main_context_dispatch (context=context@entry=0x55555677a3e0) at ../../../../glib/gmain.c:3847
#38 0x00007ffff5ddded8 in g_main_context_iterate (context=context@entry=0x55555677a3e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3920
#39 0x00007ffff5dddf6c in g_main_context_iteration (context=0x55555677a3e0, may_block=1) at ../../../../glib/gmain.c:3981
#40 0x00007ffff7242223 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007fffe56d1e51 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#42 0x00007ffff71ef24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff71f73c2 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x0000555555851d93 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:462
#45 0x00007ffff3e34b17 in __libc_start_main (main=0x555555851500 <main>, argc=1, argv=0x7fffffffe608, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe5f8) at ../csu/libc-start.c:310
#46 0x0000555555854e1a in _start () at ./src/main.cpp:478


Attached a file with some details on my debugging and the input file used,
maybe that has a special content.
Possibly you can track it down to a single file and provide the
output of mediainfo of that file.

Kind regards,
Bernhard

#909682#15
Date:
2018-11-08 01:52:14 UTC
From:
To:
Now really with the mentioned file.
#909682#18
Date:
2018-11-08 01:50:15 UTC
From:
To:
Dear Maintainer, hello Anthony DeRobertis,

I just tried to reproduce this issue in a buster amd64
qemu VM with a uptodate buster at 2018-09-27.

I could just get a backtrace with debug symbols that
looks very similar to Anthonys call stack from heaptrack:

(gdb) bt
#0  0x00007ffff5de3640 in g_malloc (n_bytes=n_bytes@entry=4079355) at ../../../../glib/gmem.c:95
#1  0x00007ffff5dfb5b3 in g_slice_alloc (mem_size=mem_size@entry=4079355) at ../../../../glib/gslice.c:1024
#2  0x00007ffff5c0d9d1 in _sysmem_new_block (flags=(unknown: 0), maxsize=4079211, align=7, offset=0, size=4079204) at gstallocator.c:417
#3  0x00007ffff5c190c2 in gst_buffer_new_allocate (allocator=allocator@entry=0x0, size=size@entry=4079204, params=params@entry=0x0) at gstbuffer.c:839
#4  0x00007ffff6c61412 in gst_tag_image_data_to_image_sample (image_data=0x7fff600380d1 "\377\330\377", <incomplete sequence \340>, image_data_len=4079203, image_type=GST_TAG_IMAGE_TYPE_BACK_COVER) at tags.c:528
#5  0x00007ffff6c513b3 in gst_tag_list_add_id3_image (tag_list=0x7fff60003140, image_data=<optimized out>, image_data_len=image_data_len@entry=4079203, id3_picture_type=<optimized out>) at gstid3tag.c:379
#6  0x00007fffa0065b00 in gst_flac_parse_handle_picture (buffer=0x7fff5c02f6d0, flacparse=0x7fff5c049af0 [GstFlacParse]) at /usr/include/gstreamer-1.0/gst/base/gstbytereader.h:651
#7  0x00007fffa0065b00 in gst_flac_parse_handle_block_type (sbuffer=0x7fff5c02f6d0, type=6, flacparse=0x7fff5c049af0 [GstFlacParse]) at gstflacparse.c:1520
#8  0x00007fffa0065b00 in gst_flac_parse_parse_frame (frame=0x7fff600030f0, frame=0x7fff600030f0, size=4079268, parse=0x7fff5c049af0 [GstFlacParse]) at gstflacparse.c:1574
#9  0x00007fffa0065b00 in gst_flac_parse_handle_frame (parse=0x7fff5c049af0 [GstFlacParse], frame=0x7fff600030f0, skipsize=<optimized out>) at gstflacparse.c:870
#10 0x00007ffff5d3a6b2 in gst_base_parse_handle_buffer (parse=parse@entry=0x7fff5c049af0 [GstFlacParse], buffer=<optimized out>, skip=skip@entry=0x7fff737e075c, flushed=flushed@entry=0x7fff737e0758) at gstbaseparse.c:2160
#11 0x00007ffff5d3ad8f in gst_base_parse_scan_frame (parse=parse@entry=0x7fff5c049af0 [GstFlacParse], klass=<optimized out>) at gstbaseparse.c:3464
#12 0x00007ffff5d3e302 in gst_base_parse_loop (pad=<optimized out>) at gstbaseparse.c:3543
#13 0x00007ffff5c86f41 in gst_task_func (task=0x7fff78042830 [GstTask]) at gsttask.c:332
#14 0x00007ffff5e06ad3 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../../glib/gthreadpool.c:307
#15 0x00007ffff5e06135 in g_thread_proxy (data=0x7fff5c045b70) at ../../../../glib/gthread.c:784
#16 0x00007ffff61aaf2a in start_thread (arg=0x7fff737e1700) at pthread_create.c:463
#17 0x00007ffff3f09edf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95

(For some reason heaptracks locations 3 last digits are one lower than gdbs?)

Unfortunately I never received a heaptrack report that
shows this allocation as leaked on my test system.
Was this a different heaptrack version or I just used it wrong?

Also a valgrind run did not show a leak at this location.

Heaptrack may be not prepared to use the debug information
delivered by the dbg packages. I also got no stacks from heaptrack
files record while dbgsym packages were installed.

While playing I could not see an increase of memory usage percentage in htop.


Following is the location where the memory allocated in given
stack was freed in my test system:

(gdb) bt
#0  0x00007ffff5de3720 in g_free (mem=0x7fff6041bf50) at ../../../../glib/gmem.c:193
#1  0x00007ffff5c4bb88 in _gst_memory_free (mem=0x7fff6041bf50) at gstmemory.c:97
#2  0x00007ffff5c1794a in gst_memory_unref (memory=<optimized out>) at ../gst/gstmemory.h:345
#3  0x00007ffff5c1794a in _gst_buffer_free (buffer=0x7fff5c02fd30) at gstbuffer.c:749
#4  0x00007ffff5c76713 in gst_buffer_unref (buf=<optimized out>) at ../gst/gstbuffer.h:442
#5  0x00007ffff5c76713 in _gst_sample_free (sample=0x7fffd41290f0) at gstsample.c:82
#6  0x00007ffff5ee45e0 in g_value_unset (value=value@entry=0x7fff6c005b18) at ../../../../gobject/gvalue.c:275
#7  0x00007ffff5c79cdc in gst_structure_free (structure=0x7fffd41091a0) at gststructure.c:385
#8  0x00007ffff5c8149d in __gst_tag_list_free (list=0x7fffd411f9e0) at gsttaglist.c:720
#9  0x00007ffff5ee45e0 in g_value_unset (value=value@entry=0x7fff6c0042b8) at ../../../../gobject/gvalue.c:275
#10 0x00007ffff5c79cdc in gst_structure_free (structure=0x7fffd4120580) at gststructure.c:385
#11 0x00007ffff5c4746d in _gst_message_free (message=0x7fff78043590) at gstmessage.c:218
#12 0x00007ffff5dd9e5d in g_list_foreach (list=<optimized out>, list@entry=0x555556f4d340 = {...}, func=0x7ffff5c1eb60 <gst_message_unref>, user_data=user_data@entry=0x0) at ../../../../glib/glist.c:1013
#13 0x00007ffff5dd9e8b in g_list_free_full (list=0x555556f4d340 = {...}, free_func=<optimized out>) at ../../../../glib/glist.c:223
#14 0x00007ffff5c1fdaf in gst_bus_set_flushing (bus=<optimized out>, flushing=<optimized out>) at gstbus.c:478
#15 0x00007ffff5c5f3e5 in gst_pipeline_change_state (element=0x5555576de090 [GstPipeline], transition=<optimized out>) at gstpipeline.c:549
#16 0x00007ffff5c38eee in gst_element_change_state (element=element@entry=0x5555576de090 [GstPipeline], transition=GST_STATE_CHANGE_READY_TO_NULL) at gstelement.c:2952
#17 0x00007ffff5c398ee in gst_element_continue_state (element=element@entry=0x5555576de090 [GstPipeline], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at gstelement.c:2660
#18 0x00007ffff5c390d5 in gst_element_change_state (element=element@entry=0x5555576de090 [GstPipeline], transition=<optimized out>) at gstelement.c:2991
#19 0x00007ffff5c398ee in gst_element_continue_state (element=element@entry=0x5555576de090 [GstPipeline], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at gstelement.c:2660
#20 0x00007ffff5c390d5 in gst_element_change_state (element=element@entry=0x5555576de090 [GstPipeline], transition=transition@entry=GST_STATE_CHANGE_PLAYING_TO_PAUSED) at gstelement.c:2991
#21 0x00007ffff5c3960e in gst_element_set_state_func (element=0x5555576de090 [GstPipeline], state=GST_STATE_NULL) at gstelement.c:2906
#22 0x00005555558d3cd2 in GstEnginePipeline::~GstEnginePipeline() (this=0x555557178d30, __in_chrg=<optimized out>) at ./src/engines/gstenginepipeline.cpp:506
#23 0x00005555558d3e09 in GstEnginePipeline::~GstEnginePipeline() (this=0x555557178d30, __in_chrg=<optimized out>) at ./src/engines/gstenginepipeline.cpp:501
#24 0x00005555558c6792 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() (this=0x5555573e0550) at /usr/include/c++/8/ext/atomicity.h:69
#25 0x00005555558c6792 in std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:706
#26 0x00005555558c6792 in std::__shared_ptr<GstEnginePipeline, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr() (this=<optimized out>, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:1145
#27 0x00005555558c6792 in std::__shared_ptr<GstEnginePipeline, (__gnu_cxx::_Lock_policy)2>::reset() (this=0x55555680d778) at /usr/include/c++/8/bits/shared_ptr_base.h:1263
#28 0x00005555558c6792 in GstEngine::EndOfStreamReached(int, bool) (this=0x55555680d6c0, pipeline_id=<optimized out>, has_next_track=<optimized out>) at ./src/engines/gstengine.cpp:753
#29 0x0000555555ae8262 in GstEngine::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x55555680d6c0, _c=<optimized out>, _id=<optimized out>, _a=0x7fff64003ec0) at ./obj-x86_64-linux-gnu/src/engines/moc_gstengine.cpp:211
#30 0x00007ffff721a072 in QObject::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff4c864a1 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff4c8dae0 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff71f0579 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#34 0x00007ffff71f356b in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#35 0x00007ffff7242c03 in  () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#36 0x00007ffff5dddc3e in g_main_dispatch (context=0x55555677a3e0) at ../../../../glib/gmain.c:3182
#37 0x00007ffff5dddc3e in g_main_context_dispatch (context=context@entry=0x55555677a3e0) at ../../../../glib/gmain.c:3847
#38 0x00007ffff5ddded8 in g_main_context_iterate (context=context@entry=0x55555677a3e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../../glib/gmain.c:3920
#39 0x00007ffff5dddf6c in g_main_context_iteration (context=0x55555677a3e0, may_block=1) at ../../../../glib/gmain.c:3981
#40 0x00007ffff7242223 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007fffe56d1e51 in  () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#42 0x00007ffff71ef24b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#43 0x00007ffff71f73c2 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x0000555555851d93 in main (argc=<optimized out>, argv=<optimized out>) at ./src/main.cpp:462
#45 0x00007ffff3e34b17 in __libc_start_main (main=0x555555851500 <main>, argc=1, argv=0x7fffffffe608, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe5f8) at ../csu/libc-start.c:310
#46 0x0000555555854e1a in _start () at ./src/main.cpp:478


Attached a file with some details on my debugging and the input file used,
maybe that has a special content.
Possibly you can track it down to a single file and provide the
output of mediainfo of that file.

Kind regards,
Bernhard

#909682#21
Date:
2018-11-08 01:52:14 UTC
From:
To:
Now really with the mentioned file.
#909682#26
Date:
2018-11-27 23:08:21 UTC
From:
To:
It went away at some point after that and I haven't seen it since... but
you all are right, it might be file-specific. I plopped "lastplayed:>62d
lastplayed:<64d" into the filter box, which should get to what I was
playing around the time of that bug report, and it appears it was
https://musicbrainz.org/release/db77f67d-9e9b-4623-8ea1-baab173cbe49 —
which is weird, because that file shouldn't be any different than most
of the others in my collection: it was ripped from CD to FLAC with
morituri, replaygain added with metaflac, cover art scanned & uploaded
to Cover Art Archive then put in the files w/ tags via Picard.

It is a long album (19 discs total, FLAC files are 11GB total). Maybe
that's it. Anyway, in the next few days I'll try playing that album
again and see what happens.

#909682#31
Date:
2018-11-30 20:46:17 UTC
From:
To:
So, as promised, I've been playing that album again, and it's again
leaking memory. I tried a few things to get it to free the memory.
Putting tracks from a different album in the middle didn't do it.
Neither did deleting the rest of the album from the playlist and playing
something else (in fact, it continued to leak — just <1MB at a time,
presumably due to the new album having a single smaller picture). Maybe
it's also really noticeable because there are 29 large pictures attached
to each track.

I got a better backtrack from gdb:

Thread 23 "task116" hit Breakpoint 1, 0x00007f89dd9fe320 in gst_tag_list_add_id3_image () from /usr/lib/x86_64-linux-gnu/libgsttag-1.0.so.0
(gdb) bt
#0  0x00007f89dd9fe320 in gst_tag_list_add_id3_image () at /usr/lib/x86_64-linux-gnu/libgsttag-1.0.so.0
#1  0x00007f8998013b00 in gst_flac_parse_handle_picture (buffer=0x7f88d814bce0, flacparse=0x7f891e1c3690 [GstFlacParse])
     at /usr/include/gstreamer-1.0/gst/base/gstbytereader.h:651
#2  0x00007f8998013b00 in gst_flac_parse_handle_block_type (sbuffer=0x7f88d814bce0, type=6, flacparse=0x7f891e1c3690 [GstFlacParse])
     at gstflacparse.c:1520
#3  0x00007f8998013b00 in gst_flac_parse_parse_frame (frame=0x7f89250505e0, frame=0x7f89250505e0, size=301495, parse=0x7f891e1c3690 [GstFlacParse]) at gstflacparse.c:1574
#4  0x00007f8998013b00 in gst_flac_parse_handle_frame (parse=0x7f891e1c3690 [GstFlacParse], frame=0x7f89250505e0, skipsize=<optimized out>)
     at gstflacparse.c:870
#5  0x00007f89dcce46b2 in gst_base_parse_handle_buffer (parse=parse@entry=0x7f891e1c3690 [GstFlacParse], buffer=<optimized out>, skip=skip@entry=0x7f895fffe75c, flushed=flushed@entry=0x7f895fffe758) at gstbaseparse.c:2160
#6  0x00007f89dcce4d8f in gst_base_parse_scan_frame (parse=parse@entry=0x7f891e1c3690 [GstFlacParse], klass=<optimized out>)
     at gstbaseparse.c:3464
#7  0x00007f89dcce8302 in gst_base_parse_loop (pad=<optimized out>) at gstbaseparse.c:3543
#8  0x00007f89dcc30f41 in gst_task_func (task=0x7f897c237050 [GstTask]) at gsttask.c:332
#9  0x00007f89dcdb0ad3 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../../glib/gthreadpool.c:307
#10 0x00007f89dcdb0135 in g_thread_proxy (data=0x7f8924ffb0f0) at ../../../../glib/gthread.c:784
#11 0x00007f89dd154f2a in start_thread (arg=0x7f895ffff700) at pthread_create.c:463
#12 0x00007f89db094edf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) c
Continuing.

Looks like its some threaded workpool... I later added a breakpoint on
pthread_create to try and see where the thread is coming from, and it
looks like the threads are creating more threads and maybe never
exiting? This appears to happen every track (the task number goes up by
two each time; I didn't add the breakpoint on pthread_create in time to
catch 116 creating 118, probably. Here is 118 creating 120, which then
goes on to cal gst_tag_list_add_id3_image):

Thread 26 "task118" hit Breakpoint 2, __pthread_create_2_1 (newthread=newthread@entry=0x7f89004337a0, attr=attr@entry=0x7f89717f5610,
     start_routine=start_routine@entry=0x7f89dcdb00e0 <g_thread_proxy>, arg=arg@entry=0x7f8900433770) at pthread_create.c:610
610     in pthread_create.c
(gdb) bt
#0  0x00007f89dd155210 in __pthread_create_2_1 (newthread=newthread@entry=0x7f89004337a0, attr=attr@entry=0x7f89717f5610, start_routine=start_routine@entry=0x7f89dcdb00e0 <g_thread_proxy>, arg=arg@entry=0x7f8900433770) at pthread_create.c:610
#1  0x00007f89dcdce2e0 in g_system_thread_new (thread_func=thread_func@entry=0x7f89dcdb00e0 <g_thread_proxy>, stack_size=stack_size@entry=0, error=error@entry=0x7f89717f56e0) at ../../../../glib/gthread-posix.c:1177
#2  0x00007f89dcdb043f in g_thread_new_internal (name=0x7f89dcde27c2 "pool", proxy=0x7f89dcdb00e0 <g_thread_proxy>, func=0x7f89dcdb0a60 <g_thread_pool_thread_proxy>, data=0x7f89b0050780, stack_size=0, error=0x7f89717f56e0) at ../../../../glib/gthread.c:874
#3  0x00007f89dcdb07ad in g_thread_pool_start_thread (pool=pool@entry=0x7f89b0050780, error=error@entry=0x7f89717f56e0)
     at ../../../../glib/gthreadpool.c:407
#4  0x00007f89dcdb0da3 in g_thread_pool_start_thread (error=0x7f89717f56e0, pool=0x7f89b0050780) at ../../../../glib/gthreadpool.c:552
#5  0x00007f89dcdb0da3 in g_thread_pool_push (pool=0x7f89b0050780, data=data@entry=0x7f8959f45f20, error=error@entry=0x7f89717f5750)
     at ../../../../glib/gthreadpool.c:563
#6  0x00007f89dcc31f6a in default_push (pool=0x7f89b0043920 [GstTaskPool], func=0x7f89dcc30dc0 <gst_task_func>, user_data=<optimized out>, error=0x7f89717f5750) at gsttaskpool.c:106
#7  0x00007f89dcc31b26 in start_task (task=0x7f88e1746710 [GstTask]) at gsttask.c:652
#8  0x00007f89dcc31b26 in gst_task_set_state (task=task@entry=0x7f88e1746710 [GstTask], state=state@entry=GST_TASK_STARTED) at gsttask.c:704
#9  0x00007f89dcc061bb in gst_pad_start_task (pad=0x7f890f81ac90 [GstPad], func=0x7f897056cd80 <gst_type_find_element_loop>, user_data=0x7f890f81ac90, notify=0x0) at gstpad.c:6169
#10 0x00007f89dcc003e6 in gst_pad_set_active (pad=pad@entry=0x7f890f81ac90 [GstPad], active=1) at gstpad.c:1107
#11 0x00007f89dcbde0ad in activate_pads (vpad=<optimized out>, ret=0x7f89717f58a0, active=0x7f89717f58fc) at gstelement.c:3040
#12 0x00007f89dcbf0acc in gst_iterator_fold (it=it@entry=0x7f8910003330, func=func@entry=0x7f89dcbde090 <activate_pads>, ret=ret@entry=0x7f89717f58a0, user_data=user_data@entry=0x7f89717f58fc) at gstiterator.c:617
#13 0x00007f89dcbdeb96 in iterator_activate_fold_with_resync (iter=iter@entry=0x7f8910003330, user_data=user_data@entry=0x7f89717f58fc, func=0x7f89dcbde090 <activate_pads>) at gstelement.c:3064
#14 0x00007f89dcbe0aee in gst_element_pads_activate (element=element@entry=0x7f89500620a0 [GstTypeFindElement], active=<optimized out>,
     active@entry=1) at gstelement.c:3108
#15 0x00007f89dcbe0cab in gst_element_change_state_func (element=0x7f89500620a0 [GstTypeFindElement], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:3160
#16 0x00007f897056f076 in gst_type_find_element_change_state (element=0x7f89500620a0 [GstTypeFindElement], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gsttypefindelement.c:1326
#17 0x00007f89dcbe2eee in gst_element_change_state (element=element@entry=0x7f89500620a0 [GstTypeFindElement], transition=transition@entry=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:2952
#18 0x00007f89dcbe360e in gst_element_set_state_func (element=0x7f89500620a0 [GstTypeFindElement], state=GST_STATE_PAUSED)
     at gstelement.c:2906
#19 0x00007f89dcbc0b27 in gst_bin_element_set_state (next=GST_STATE_PAUSED, current=GST_STATE_READY, start_time=14052392286000, base_time=0, element=0x7f89500620a0 [GstTypeFindElement], bin=0x7f891eb7a0a0 [GstDecodeBin]) at gstbin.c:2604
#20 0x00007f89dcbc0b27 in gst_bin_change_state_func (element=0x7f891eb7a0a0 [GstDecodeBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED)
     at gstbin.c:2946
#21 0x00007f8998038ac2 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
#22 0x00007f89dcbe2eee in gst_element_change_state (element=element@entry=0x7f891eb7a0a0 [GstDecodeBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:2952
#23 0x00007f89dcbe38ee in gst_element_continue_state (element=element@entry=0x7f891eb7a0a0 [GstDecodeBin], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at gstelement.c:2660
#24 0x00007f89dcbe30d5 in gst_element_change_state (element=element@entry=0x7f891eb7a0a0 [GstDecodeBin], transition=transition@entry=GST_STATE_CHANGE_NULL_TO_READY) at gstelement.c:2991
#25 0x00007f89dcbe360e in gst_element_set_state_func (element=0x7f891eb7a0a0 [GstDecodeBin], state=GST_STATE_PLAYING) at gstelement.c:2906
#26 0x00007f89dcbe2dd7 in gst_element_sync_state_with_parent (element=0x7f891eb7a0a0 [GstDecodeBin]) at gstelement.c:2332
#27 0x00007f89dcda6d8d in g_slist_foreach (list=<optimized out>, func=0x7f89dcbe2ca0 <gst_element_sync_state_with_parent>, user_data=0x0)
     at ../../../../glib/gslist.c:864
#28 0x00007f899804e7e5 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
#29 0x00007f89dcbe2eee in gst_element_change_state (element=element@entry=0x7f89520a47c0 [GstURIDecodeBin], transition=GST_STATE_CHANGE_READY_TO_PAUSED) at gstelement.c:2952
#30 0x00007f89dcbe38ee in gst_element_continue_state (element=element@entry=0x7f89520a47c0 [GstURIDecodeBin], ret=ret@entry=GST_STATE_CHANGE_SUCCESS) at gstelement.c:2660
#31 0x00007f89dcbe30d5 in gst_element_change_state (element=element@entry=0x7f89520a47c0 [GstURIDecodeBin], transition=transition@entry=GST_STATE_CHANGE_NULL_TO_READY) at gstelement.c:2991
#32 0x00007f89dcbe360e in gst_element_set_state_func (element=0x7f89520a47c0 [GstURIDecodeBin], state=GST_STATE_PLAYING)
     at gstelement.c:2906
---Type <return> to continue, or q <return> to quit---
#33 0x0000561b8928d999 in GstEnginePipeline::TransitionToNext() (this=this@entry=0x561b8f1cb3b0) at ./src/engines/gstenginepipeline.cpp:1007
#34 0x0000561b8928daf3 in GstEnginePipeline::SourceDrainedCallback(GstURIDecodeBin*, void*) (bin=<optimized out>, self=0x561b8f1cb3b0)
     at ./src/engines/gstenginepipeline.cpp:962
#35 0x00007f89d8f6ffce in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#36 0x00007f89d8f6f93f in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#41 0x00007f89dce83ecf in <emit signal ??? on instance 0x7f899692c080 [GstURIDecodeBin]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../../gobject/gsignal.c:3447
     #37 0x00007f89dce68362 in g_cclosure_marshal_generic (closure=0x7f89968d6020, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../../gobject/gclosure.c:1496
     #38 0x00007f89dce67b6d in g_closure_invoke (closure=0x7f89968d6020, return_value=0x0, n_param_values=1, param_values=0x7f89717f62b0, invocation_hint=0x7f89717f6230) at ../../../../gobject/gclosure.c:810
     #39 0x00007f89dce7a8f3 in signal_emit_unlocked_R (node=node@entry=0x561b8f228d20, detail=detail@entry=0, instance=instance@entry=0x7f899692c080, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7f89717f62b0)
     at ../../../../gobject/gsignal.c:3635
     #40 0x00007f89dce83882 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7f89717f6460) at ../../../../gobject/gsignal.c:3391
#42 0x00007f89d8f6ffce in ffi_call_unix64 () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#43 0x00007f89d8f6f93f in ffi_call () at /usr/lib/x86_64-linux-gnu/libffi.so.6
#48 0x00007f89dce83ecf in <emit signal ??? on instance 0x7f890fb117f0 [GstDecodeBin]> (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at ../../../../gobject/gsignal.c:3447
     #44 0x00007f89dce68362 in g_cclosure_marshal_generic (closure=0x7f899663ec20, return_gvalue=0x0, n_param_values=<optimized out>, param_values=<optimized out>, invocation_hint=<optimized out>, marshal_data=<optimized out>) at ../../../../gobject/gclosure.c:1496
     #45 0x00007f89dce67b6d in g_closure_invoke (closure=0x7f899663ec20, return_value=0x0, n_param_values=1, param_values=0x7f89717f6920, invocation_hint=0x7f89717f68a0) at ../../../../gobject/gclosure.c:810
     #46 0x00007f89dce7a8f3 in signal_emit_unlocked_R (node=node@entry=0x7f893c03ef70, detail=detail@entry=0, instance=instance@entry=0x7f890fb117f0, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7f89717f6920)
     at ../../../../gobject/gsignal.c:3635
     #47 0x00007f89dce83882 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7f89717f6ad0) at ../../../../gobject/gsignal.c:3391
#49 0x00007f8998039340 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
#50 0x00007f899803c183 in  () at /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstplayback.so
#51 0x00007f89dcbf849e in probe_hook_marshal (hook=0x7f89121a5740, data=0x7f89717f6d40) at gstpad.c:3561
#52 0x00007f89dcd77f54 in g_hook_list_marshal (hook_list=hook_list@entry=0x7f891c072128, may_recurse=may_recurse@entry=1, marshaller=marshaller@entry=0x7f89dcbf8080 <probe_hook_marshal>, data=data@entry=0x7f89717f6d40) at ../../../../glib/ghook.c:672
#53 0x00007f89dcbf7b77 in do_probe_callbacks (pad=pad@entry=0x7f891c072090 [GstDecodePad], info=<optimized out>, defaultval=defaultval@entry=GST_FLOW_OK) at gstpad.c:3723
#54 0x00007f89dcbfaa48 in gst_pad_push_event_unchecked (pad=pad@entry=0x7f891c072090 [GstDecodePad], event=0x7f891212a8a0, type=type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at gstpad.c:5371
#55 0x00007f89dcbfaff4 in push_sticky (pad=pad@entry=0x7f891c072090 [GstDecodePad], ev=ev@entry=0x7f89717f6f50, user_data=user_data@entry=0x7f89717f6fc0) at ../gst/gstevent.h:436
#56 0x00007f89dcbf9138 in events_foreach (pad=pad@entry=0x7f891c072090 [GstDecodePad], func=func@entry=0x7f89dcbfafa0 <push_sticky>, user_data=user_data@entry=0x7f89717f6fc0) at gstpad.c:612
#57 0x00007f89dcc04eb1 in check_sticky (event=0x7f891212a8a0, pad=0x7f891c072090 [GstDecodePad]) at gstpad.c:3981
#58 0x00007f89dcc04eb1 in gst_pad_push_event (pad=pad@entry=0x7f891c072090 [GstDecodePad], event=0x7f891212a8a0) at gstpad.c:5537
#59 0x00007f89dcc05434 in event_forward_func (pad=pad@entry=0x7f891c072090 [GstDecodePad], data=data@entry=0x7f89717f70c0)
     at ../gst/gstevent.h:436
#60 0x00007f89dcc00cbe in gst_pad_forward (pad=pad@entry=0x7f899692c570 [GstProxyPad], forward=forward@entry=0x7f89dcc05370 <event_forward_func>, user_data=user_data@entry=0x7f89717f70c0) at gstpad.c:3008
#61 0x00007f89dcc00e05 in gst_pad_event_default (pad=0x7f899692c570 [GstProxyPad], parent=<optimized out>, event=0x7f891212a8a0)
     at gstpad.c:3105
#62 0x00007f89dcbfa637 in gst_pad_send_event_unchecked (pad=pad@entry=0x7f899692c570 [GstProxyPad], event=event@entry=0x7f891212a8a0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at gstpad.c:5761
#63 0x00007f89dcbfab84 in gst_pad_push_event_unchecked (pad=pad@entry=0x7f89940b13a0 [GstPad], event=0x7f891212a8a0, type=type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at gstpad.c:5406
#64 0x00007f89dcbfaff4 in push_sticky (pad=pad@entry=0x7f89940b13a0 [GstPad], ev=ev@entry=0x7f89717f72c0, user_data=user_data@entry=0x7f89717f7330) at ../gst/gstevent.h:436
#65 0x00007f89dcbf9138 in events_foreach (pad=pad@entry=0x7f89940b13a0 [GstPad], func=func@entry=0x7f89dcbfafa0 <push_sticky>, user_data=user---Type <return> to continue, or q <return> to quit---
_data@entry=0x7f89717f7330) at gstpad.c:612
#66 0x00007f89dcc04eb1 in check_sticky (event=0x7f891212a8a0, pad=0x7f89940b13a0 [GstPad]) at gstpad.c:3981
#67 0x00007f89dcc04eb1 in gst_pad_push_event (pad=0x7f89940b13a0 [GstPad], event=0x7f891212a8a0) at gstpad.c:5537
#68 0x00007f89dced94ca in  () at /usr/lib/x86_64-linux-gnu/libgstaudio-1.0.so.0
#69 0x00007f89dcede2cd in  () at /usr/lib/x86_64-linux-gnu/libgstaudio-1.0.so.0
#70 0x00007f89dcbfa637 in gst_pad_send_event_unchecked (pad=pad@entry=0x7f89940b1150 [GstPad], event=event@entry=0x7f891212a8a0, type=<optimized out>, type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at gstpad.c:5761
#71 0x00007f89dcbfab84 in gst_pad_push_event_unchecked (pad=pad@entry=0x7f890f81a100 [GstPad], event=0x7f891212a8a0, type=type@entry=GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM) at gstpad.c:5406
#72 0x00007f89dcbfaff4 in push_sticky (pad=pad@entry=0x7f890f81a100 [GstPad], ev=ev@entry=0x7f89717f76e0, user_data=user_data@entry=0x7f89717f7750) at ../gst/gstevent.h:436
#73 0x00007f89dcbf9138 in events_foreach (pad=pad@entry=0x7f890f81a100 [GstPad], func=func@entry=0x7f89dcbfafa0 <push_sticky>, user_data=user_data@entry=0x7f89717f7750) at gstpad.c:612
#74 0x00007f89dcc04eb1 in check_sticky (event=0x7f891212a8a0, pad=0x7f890f81a100 [GstPad]) at gstpad.c:3981
#75 0x00007f89dcc04eb1 in gst_pad_push_event (pad=0x7f890f81a100 [GstPad], event=0x7f891212a8a0) at gstpad.c:5537
#76 0x00007f89dcce84e7 in gst_base_parse_loop (pad=<optimized out>) at gstbaseparse.c:3621
#77 0x00007f89dcc30f41 in gst_task_func (task=0x7f88e17463b0 [GstTask]) at gsttask.c:332
#78 0x00007f89dcdb0ad3 in g_thread_pool_thread_proxy (data=<optimized out>) at ../../../../glib/gthreadpool.c:307
#79 0x00007f89dcdb0135 in g_thread_proxy (data=0x7f88fb607400) at ../../../../glib/gthread.c:784
#80 0x00007f89dd154f2a in start_thread (arg=0x7f89717f8700) at pthread_create.c:463
#81 0x00007f89db094edf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95
(gdb) c

... but then the thread does exit later, so it's not leaking threads.
But this looks increasingly like a gstreamer bug.