Debugging GStreamer : refcounting

Tim-Philipp Müller t.i.m at
Mon Jul 15 05:55:45 PDT 2013

On Mon, 2013-07-15 at 14:31 +0200, Thomas Scheuermann wrote:

Hi Thomas,

> >> In the end we are looking here for memory problems with gstreamer,
> >> because it crashes after it has reached 3GB memory.
> > if you're on Linux, I'd recommend the valgrind suite of tools.
> >
> >   $ G_SLICE=always-malloc valgrind --leak-check=yes yourapplication
> >
> > (you can also pass suppression files from the GStreamer common module so
> > it doesn't report one-time allocations in GObject and GStreamer and
> > things like that, cuts down the noise a little).
> How can I do this?
> Is there a documentation about this?

What is "this" exactly? How to use valgrind in general? Suppression
files? It's a widely-used debugging tool on Linux, there should be
plenty of docs how to use it. might have some pointers.

> If I use valgrind the video doesn't play correctly at all. We have the
> situation here that we only have streaming videos which we have to decode.

"not correctly" how? Valgrind makes things run very slow, so depending
on your machine and work load it may not be able to decode your videos
in real-time. That's often not a problem if what you're trying to track
down memory leaks.

> > Warning: Malformed stack trace detected.
> > Then there's also the valgrind tool "massif", with which you can track
> > where what gets allocated over time. This is useful if it doesn't leak,
> > but just builds up somewhere. Again, use G_SLICE=always-malloc.
> with massif I only get 'Warning: Malformed stack trace detected.'

No idea about that,
mentions it.


More information about the gstreamer-devel mailing list