App using gstwaylandsink leaks fds

Guillermo Rodriguez Garcia guille.rodriguez at gmail.com
Fri Mar 27 11:43:04 UTC 2020


El jue., 26 mar. 2020 a las 15:20, Nicolas Dufresne
(<nicolas at ndufresne.ca>) escribió:
>
> Le jeudi 26 mars 2020 à 13:38 +0100, Guillermo Rodriguez Garcia a
> écrit :
> > However this results in fd leaks as described.
> > If I explicitly remove the bus watch when the pipeline is destroyed:
> >
> > g_source_remove (bus_watch_id);
> >
> > then the leaks are gone.
> >
> > Does this make sense?
>
> The waylandsink is likely attached as a src of a GstMessage that is
> stored in the bus. And then the bus or the pipeline is leaked, causing
> waylandsink internal pool to be leaked, hence the "leaked" fds. Use
> GST_DEBUG="GST_TRACER:7" GST_TRACERS=leak ... to get a list of leaked
> objects.

This does not seem to detect the problem.
The docs say that this only track leaks in gst code; perhaps this leak
is happening at the Glib level? Since the leak is fixed if the bus
watch is removed using g_source_remove().

Anyway I think the main question (for me) is whether the bus watch
needs to be explicitly removed or not. I understood that it was not
necessary, but removing it fixes the problem for me.
So either my understanding was wrong, or the fact that the leak goes
away when I remove the bus watch is just a coincidence and I should
debug that further..

Thanks,

Guillermo Rodriguez Garcia
guille.rodriguez at gmail.com


More information about the gstreamer-devel mailing list