Memory leak in level element

Stefan Sauer ensonic at hora-obscura.de
Wed Nov 30 17:36:16 UTC 2016


On 11/30/2016 04:58 AM, Vinod Kesti wrote:
> All,
>
> I am using level in pipeline to analyse the decoded audio frames. rms and
> decay values of the message are used in the application for quality report.
top is not a good tool to diagnose leaks-.
>
> But I see memory leak in level element when post-messages is set to true. 
> Below pipeline issue is reproduces the issue. Check memory usage of
> gst-launch in *top* while running the pipeline, memory keeps in increasing.  
>
> gst-launch-1.0 audiotestsrc ! level  interval=30000 ! fakesink --gst-debug=3
> I have set low interval here to reproduce the issue faster here.
>
> I checked gst_level_post_message and gst_level_message_append_channel
> function but I coun't pin point the issue.
> Memory leak is seen even with level-example code. 
>
> Memory leak is not seen when post-messages set to false.
>
> I ran pipeline through valgrind but it tool is also not reporting any issue.
>
> I have following question:
> 1. Am I configuring level element wrongly?
> 2. If level element is configured properly. Are you able to see this issue
> ??
> 3. How to trace memory leak in the pipeline ?? any tools ??
I've checked with valgrind and there is no leak (besides small one-time
allocs), definitely nothing that grows:

I have this in my bashrc:
alias vg_memcheck='G_SLICE=always-malloc G_DEBUG=gc-friendly
GLIBCPP_FORCE_NEW=1 GLIBCXX_FORCE_NEW=1 valgrind --tool=memcheck
--trace-children=yes --num-callers=20 --read-var-info=yes
--leak-check=full --leak-resolution=high --track-origins=yes'

and then run

vg_memcheck gst-launch-1.0 audiotestsrc num-buffers=100 ! level
post-messages=true interval=30000 ! fakesink

Stefan
>
>   
> ~ Vinod
>
>
>
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Memory-leak-in-level-element-tp4680952.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel





More information about the gstreamer-devel mailing list