[gstreamer-bugs] [Bug 577318] rtspsrc appears to be leaking memory
bugzilla-daemon at bugzilla.gnome.org
Fri Apr 17 06:16:05 PDT 2009
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
GStreamer | gst-plugins-good | Ver: git
------- Comment #5 from Patrick Radizi 2009-04-17 13:16 UTC -------
I think I have found the leak that I originally meant (not the one Wim fixed in
Comment #4). Every time the test program runs one lap in the loop, 8192KB of
data is lost. Looking in /proc/'pid'/smaps these blocks 8192KB can be seen
adding up over time. Not on the stack or heap but close to the
libgstrtpmanager.so library address space. I think it must be thread stack data
created by the rtpmanager, and more precise belonging to the threads being
created in gstrtpsession.c. To test I changed the size of the thread stack,
with g_thread_full, when creating these thread to 1024KB, and the leak then
became 1024KB instead.
The threads are created with the joinable property set to TRUE, but out of the
two threads being created each iteration, only one is actually joined. This
explains why one 8192KB block is lost every time. I think the thread stack
can't be freed until the join has been done.
I created a simple test program simulating this, creating two 'joinable'
threads at a time and then only joining with one, and the memory behaviour is
identical, 8192KB is lost each iteration. Add the second join, and the leak
Since I don't know how the rtpmanager works I haven't added the 'second join'
since I don't know when it is supposed to be done. But I hope that someone else
can do it given this info.
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=577318.
More information about the Gstreamer-bugs