Gstreamer memory leak: how do I hunt it down?

Sebastian Dröge sebastian at centricular.com
Sun Dec 18 08:57:16 UTC 2016


On Sun, 2016-12-18 at 02:41 +0200, Graham Leggett wrote:
> Hi all,
> 
> I have a gstreamer that slowly increases in size over time, until
> oomkiller steps in after a few hours and blows it away.
> 
> Using GST_REFCOUNTING set to 9, I am finding what looks like the
> leak, but I need help interpreting this. What do the addresses
> 0x740f7580 and 0x74204818 refer to? Am I looking at one object with
> thousands of references to it, or many objects?
> 
> Is this maybe an array of some kind that keeps increasing in size?
> 
> 0:01:01.779640164  1232 0x740f7580 TRACE        GST_REFCOUNTING
> gstobject.c:275:gst_object_unref:<allocatorsysmem0> 0x74204818 unref
> 5958->5957

This suggests that something somewhere is leaking system memory
GstMemory. Each of them has a reference to its allocator, so you seem
to have about 6000 of them around currently.
It's not the allocator that is leaked here though.


Use valgrind, valgrind's massif or the GStreamer leak tracer for
tracking this down. Also before doing anything like that, make your
pipeline as minimal as possible.

-- 
Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 963 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20161218/5857ed35/attachment-0001.sig>


More information about the gstreamer-devel mailing list