Memory leak when using GL elements on multiple pipelines at the same time.

petros petroskataras at gmail.com
Thu Oct 11 08:54:37 UTC 2018


Hi all,

I m experiencing a memory leak when trying to construct and deconstruct
multiple pipelines that use the GL elements that seems very tricky to track
down. The pipeline is playbin based with the following flow elements
capsfilter ! glupload ! glcolorconvert ! appsink in order to take advantage
of the gst-gl elements. 

Having one pipeline active at a time and constructing / deconstructing it,
seems to behave properly with no leak. In addition there is also no leak
when I m not using the GL elements in the pipeline ( i.e the player [1] has
the option to use the traditional appsink path where it receives the system
memory and then manually creates a texture from that - no leaks in this case
even with multiple players in parallel ) 

My leak test case for the GL path is the following :
1) Load 15 videos ( .mp4 / 1280x720 @25fps ) ( i.e construct pipelines, set
to playing state )
2) Wait 5 seconds
3) Unload videos ( i.e deconstruct pipelines )
4) Back to 1)

With this scenario it takes around 20 loads in order for my RAM ( 8 GB ) to
fill. 

I have tried to track down the root issue but unfortunately the leak doesn't
seem to manifest when running the app through Valgrind with both memcheck
and massiff.

The command I m using for memcheck is the following :

valgrind -v --tool=memcheck  --leak-check=full --show-reachable=no
--track-origins=no 
--suppressions=/home/testserver/gst/master/gstreamer/common/gst.supp
--log-file=valgrind_gst

and for massiff :

valgrind --tool=massif --log-file=massiff_log.txt

I m attaching the log files from both outputs:

massiff.log
<http://gstreamer-devel.966125.n4.nabble.com/file/t377246/massiff.log>  

memcheck.log
<http://gstreamer-devel.966125.n4.nabble.com/file/t377246/valgrind_gst.valgrind_gst>  

This is with latest master ( 1.15.0.1 ) on Ubuntu 16.04 with NVIDIA ( 384.69
).

I m a bit at loss on what I could try next to debug this so I would
appreciate if there is any other input on this issue.

Thanks,
Petros

[1]
https://github.com/cinder/Cinder/blob/master/src/cinder/linux/GstPlayer.cpp



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list