[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gstreamer-devel
Subject:    Re: Investigating memory leak
From:       Nicolas Dufresne via gstreamer-devel <gstreamer-devel () lists ! freedesktop ! org>
Date:       2022-02-20 22:40:48
Message-ID: CAKQmDh86kK_gvowDtjgP8q+LBjuG06tXdyfORu1wySkSpyLJdA () mail ! gmail ! com
[Download RAW message or body]

Le dim. 20 f=C3=A9vr. 2022 16 h 51, Pieter Hulshoff <pieter@towel42.nl> a =
=C3=A9crit :

> Hello Nicolas,
>
>
> Thank you for your insights.
>
>
> On 20-02-2022 21:49, Nicolas Dufresne via gstreamer-devel wrote:
> > There was a very similar report recently:
> >
> >
> https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/968#note_1252=
868
> >
> > In that report, this type of leak happened in if the bus was unreffed
> after its
> > owner (playbin or the pipeline). Though, I'm run your code here on
> 1.20.0, and
> > there was no leak after 3000 iterations.
>
> I'll read up on that report to see if it provides some more clarity.
>
> Did you reduce the usleep time? The code I sent uses the 100 ms wait
> time, in which case I don't see a problem either, but when I reduce that
> to 10 ms the issue pops up very very fast.
>

Oh, I miss counted the zeros. Will retry tomorrow. Can you attach your
example to the issue, it's cleaner and smaller.


>
> > This is normal, gst_element_factory_make() returns a floating reference=
,
> and
> > gst_bin_add() will acquire the floating reference, which means your cod=
e
> no
> > longer owns the object.
>
> That's good to know. :) That would explain the warnings I got when
> uncommenting them then.
>
>
> Kind regards,
>
>
> Pieter Hulshoff
>
>
>

[Attachment #3 (text/html)]

<div dir="auto"><div><br><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">Le dim. 20 févr. 2022 16 h 51, Pieter Hulshoff &lt;<a \
href="mailto:pieter@towel42.nl">pieter@towel42.nl</a>&gt; a écrit  \
:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px \
#ccc solid;padding-left:1ex">Hello Nicolas,<br> <br>
<br>
Thank you for your insights.<br>
<br>
<br>
On 20-02-2022 21:49, Nicolas Dufresne via gstreamer-devel wrote:<br>
&gt; There was a very similar report recently:<br>
&gt;<br>
&gt; <a href="https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/968#note_1252868" \
rel="noreferrer noreferrer" \
target="_blank">https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/968#note_1252868</a><br>
 &gt;<br>
&gt; In that report, this type of leak happened in if the bus was unreffed after \
its<br> &gt; owner (playbin or the pipeline). Though, I&#39;m run your code here on \
1.20.0, and<br> &gt; there was no leak after 3000 iterations.<br>
<br>
I&#39;ll read up on that report to see if it provides some more clarity.<br>
<br>
Did you reduce the usleep time? The code I sent uses the 100 ms wait <br>
time, in which case I don&#39;t see a problem either, but when I reduce that <br>
to 10 ms the issue pops up very very fast.<br></blockquote></div></div><div \
dir="auto"><br></div><div dir="auto">Oh, I miss counted the zeros. Will retry \
tomorrow. Can you attach your example to the issue, it&#39;s cleaner and \
smaller.</div><div dir="auto"><br></div><div dir="auto"><div \
class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <br>
<br>
&gt; This is normal, gst_element_factory_make() returns a floating reference, and<br>
&gt; gst_bin_add() will acquire the floating reference, which means your code no<br>
&gt; longer owns the object.<br>
<br>
That&#39;s good to know. :) That would explain the warnings I got when <br>
uncommenting them then.<br>
<br>
<br>
Kind regards,<br>
<br>
<br>
Pieter Hulshoff<br>
<br>
<br>
</blockquote></div></div></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic