Memory leak in liveadder?

Stefan Kost ensonic at hora-obscura.de
Mon Apr 4 13:32:42 PDT 2011


Am 02.04.2011 21:16, schrieb E-J van der Linden:
> 
> Op 31 mrt 2011, om 20:43 heeft E-J van der Linden het volgende geschreven:
> 
>>
>> Op 31 mrt 2011, om 19:52 heeft Olivier Crête het volgende geschreven:
>>
>>> On Thu, 2011-03-31 at 19:36 +0200, E-J van der Linden wrote:
>>>> gst-launch-0.10 -v udpsrc port=5000
>>>> caps="application/x-rtp,media=(string)audio, clock-rate=(int)44100,
>>>> channels=(int)2, payload=(int)96" ! gstrtpbin ! rtpL16depay !
>>>> audioconvert ! audioresample ! liveadder ! alsasink
>>>>
>>>> When I check the memory usage of this process (using top), I see the
>>>> memory usage increases from 1.2% to 8% when streaming one mp3.
>>>> The memory "leaks" only when the data stream is active.
>>>
>>> Does it keep on increasing or does it just stay at 8% ? liveadder has a
>>> queue that you can control with the "latency" property os it can sync up
>>> the various streams. The default 60ms is chosen to be larger than the
>>> common 40ms packet size for RTP. That said 60ms of 44khz 2 channel raw
>>> audio should only be 10kbytes..
>>>
>>> -- 
>>> Olivier Crête
>>> olivier.crete at collabora.co.uk
>>> _______________________________________________
>>> gstreamer-devel mailing list
>>> gstreamer-devel at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>>
>> Olivier,
>>
>> Yes it keeps increasing.
>> start: 
>> 1.4% 78760k
>>
>> after 14 min mp3 streaming
>> 34.2% 53536k
>>
>> So I lost 25224kbytes
>>
>> By the way I use bad plugin version 0.10.18 on an Ubuntu system. I see that the latest version is 0.10.21
>> Would that be the answer?
>>
>> E-J
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> 
> 
> Hi,
> 
> Has anybody an idea what is wrong with liveadder? It is eating all my memory in the following example.
> When using valgrind I get a lot of information and a summary.
> 
> E-J
> 
> valgrind --tool=memcheck --leak-check=full --show-reachable=yes  gst-launch-0.10 udpsrc port=5000 caps="application/x-rtp,media=(string)audio, clock-rate=(int)44100,channels=(int)2, payload=(int)96" ! gstrtpbin ! rtpL16depay ! audioconvert ! audioresample ! liveadder ! alsasink
> 
> 
> ==4407== 
> ==4407== HEAP SUMMARY:
> ==4407==     in use at exit: 9,808,990 bytes in 12,195 blocks
> ==4407==   total heap usage: 67,722 allocs, 55,527 frees, 57,156,008 bytes allocated
> ==4407== 
> 
> A LOT OF INFORMATION....
> 
> ==4407== LEAK SUMMARY:
> ==4407==    definitely lost: 40 bytes in 1 blocks
> ==4407==    indirectly lost: 120 bytes in 10 blocks
> ==4407==      possibly lost: 9,416,158 bytes in 8,663 blocks
> ==4407==    still reachable: 378,140 bytes in 3,265 blocks
> ==4407==         suppressed: 14,532 bytes in 256 blocks
> ==4407== 
> ==4407== For counts of detected and suppressed errors, rerun with: -v
> ==4407== ERROR SUMMARY: 976 errors from 976 contexts (suppressed: 248 from 41)
> 
>  

Please file a bug and attach the whole valgrind log. Please use valgind as below:

G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind --tool=memcheck
--leak-check=full --show-reachable=yes --log-file=valgrind.log gst-launch-0.10
udpsrc port=5000 caps="application/x-rtp,media=(string)audio,
clock-rate=(int)44100,channels=(int)2, payload=(int)96" ! gstrtpbin !
rtpL16depay ! audioconvert ! audioresample ! liveadder ! alsasink

Ideally use the gst.supp file from gstreamer git
http://cgit.freedesktop.org/gstreamer/common/tree/gst.supp

Stefan

> 
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list