Memory leak in capsfilter application/x-rtp

David Ing ding at panopto.com
Mon Nov 25 19:29:50 UTC 2019


If you are running on Linux you can try using valgrind.

First you need to use these variables at runtime so that memory allocation
is performed in a "normal" way (such that valgrind can detect problems).


G_DEBUG="gc-friendly"
G_SLICE="always-malloc"


The following command can be used to run valgrind where $@ represents the
arguments that are passed to the executable.

valgrind \
--trace-children=yes \
--tool=memcheck \
--leak-check=full \
--leak-resolution=high \
--errors-for-leak-kinds=definite,indirect \
--show-leak-kinds=definite,indirect \
--show-possibly-lost=no \
--num-callers=20 \
--error-exitcode=20 \
--gen-suppressions=all \
executable_name $@


On Mon, Nov 25, 2019 at 11:10 AM Saurabh Bora <saurabh9bora at gmail.com>
wrote:

> Hi Experts,
>
> I have a gstreamer test pipeline which I run as below:
> gst-launch-1.0 videotestsrc is-live=yes ! aspectratiocrop aspect-ratio=4/3
> ! vp8enc ! rtpvp8pay !
> application/x-rtp,media=video,encoding-name=VP8,payload=96 ! rtpvp8depay !
> decodebin ! autovideosink
>
> Also, I have following environment variables set to generate leak trace:
> set GST_DEBUG=GST_TRACER:7
> set GST_TRACERS=leaks
> set GST_DEBUG_FILE=logTrace
>
> Below is content of logTrace file, which shows leak in capsfilter -
> application/x-rtp,media=video,encoding-name=VP8,payload=96. As all the
> elements in the pipeline are gstreamer provided and not custom, I do not
> understand how I can fix this. Please help and guide.
>
>
> ========================================================================================================================
> 0:00:00.802370800 36936 0000000003F425A0 DEBUG             GST_TRACER
> gsttracer.c:164:gst_tracer_register:<registry0> update existing feature
> 0000000001077180 (latency)
> 0:00:00.802895700 36936 0000000003F425A0 DEBUG             GST_TRACER
> gsttracer.c:164:gst_tracer_register:<registry0> update existing feature
> 0000000001077240 (log)
> 0:00:00.802943700 36936 0000000003F425A0 DEBUG             GST_TRACER
> gsttracer.c:164:gst_tracer_register:<registry0> update existing feature
> 0000000001077300 (stats)
> 0:00:00.802988600 36936 0000000003F425A0 DEBUG             GST_TRACER
> gsttracer.c:164:gst_tracer_register:<registry0> update existing feature
> 00000000010773C0 (leaks)
> 0:00:00.803093500 36936 0000000003F425A0 TRACE             GST_TRACER
> gsttracerrecord.c:111:gst_tracer_record_build_format: object-alive.class,
> type-name=(structure)"value\,\ type\=\(type\)gchararray\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> address=(structure)"value\,\ type\=\(type\)gpointer\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> description=(structure)"value\,\ type\=\(type\)gchararray\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> ref-count=(structure)"value\,\ type\=\(type\)guint\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> trace=(structure)"value\,\ type\=\(type\)gchararray\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;";
> 0:00:00.803149100 36936 0000000003F425A0 DEBUG             GST_TRACER
> gsttracerrecord.c:125:gst_tracer_record_build_format: new format string:
> object-alive, type-name=(string)%s, address=(gpointer)%p,
> description=(string)%s, ref-count=(uint)%u, trace=(string)%s;
> 0:00:00.803360100 36936 0000000003F425A0 TRACE             GST_TRACER
> gsttracerrecord.c:111:gst_tracer_record_build_format: object-refings.class,
> ts=(structure)"value\,\ type\=\(type\)guint64\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> type-name=(structure)"value\,\ type\=\(type\)gchararray\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> address=(structure)"value\,\ type\=\(type\)gpointer\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> description=(structure)"value\,\ type\=\(type\)gchararray\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> ref-count=(structure)"value\,\ type\=\(type\)guint\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;",
> trace=(structure)"value\,\ type\=\(type\)gchararray\,\
> related-to\=\(GstTracerValueScope\)GST_TRACER_VALUE_SCOPE_PROCESS\;";
> 0:00:00.803498500 36936 0000000003F425A0 DEBUG             GST_TRACER
> gsttracerrecord.c:125:gst_tracer_record_build_format: new format string:
> object-refings, ts=(guint64)%I64u, type-name=(string)%s,
> address=(gpointer)%p, description=(string)%s, ref-count=(uint)%u,
> trace=(string)%s;
> 0:00:03.355505900 36936 0000000003F425A0 TRACE             GST_TRACER :0::
> object-alive, type-name=(string)GstCaps,
> address=(gpointer)0000000004A7F890, description=(string)application/x-rtp,
> payload=(int)96, clock-rate=(int)90000, encoding-name=(string)VP8,
> media=(string)video, ref-count=(uint)1, trace=(string);
>
> ==========================================================================================================================
>
> P.S.- The above pipeline is a test pipeline used to demonstrate leak. My
> original pipeline uses the same capsfilter and hence I need to fix this
> leak.
>
> Help Appreciated !
>
> --------
> Thanks and Regards,
> Saurabh Bora
>
> PH NO : 7038166900
> EMAIL : saurabh9bora at gmail.com
>              saurabh9bora at outlook.com
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20191125/b1d76941/attachment-0001.html>


More information about the gstreamer-devel mailing list