After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 721256 - eventfd leak in souphttpsrc
eventfd leak in souphttpsrc
Status: RESOLVED DUPLICATE of bug 663944
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
1.0.5
Other Linux
: Normal major
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-31 03:15 UTC by zhangyanping
Modified: 2013-12-31 08:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description zhangyanping 2013-12-31 03:15:02 UTC
Use playbin to play http stream
1. create playbin, and set state playing
2. sleep 100 ms, at this time http stream is in connecting, but no buffer read out.
3. set state null, and gst_soup_http_src_unlock will be called. In function gst_soup_http_src_unlock, will quit src->loop. 

/* Interrupt a blocking request. */
static gboolean
gst_soup_http_src_unlock (GstBaseSrc * bsrc)
{
    GstSoupHTTPSrc *src;

    src = GST_SOUP_HTTP_SRC (bsrc);
    GST_DEBUG_OBJECT (src, "unlock()");

    src->interrupted = TRUE;
    if (src->loop)
        g_main_loop_quit (src->loop);
    return TRUE;
}

If the http connection is in building process, and at this time g_main_loop_quit (src->loop), will cause eventfd leak in libsoup. Simply quit src->loop can make function gst_soup_http_src_create return immediately, but will cause eventfd leak. Every time can leak one or three.

But if function gst_soup_http_src_create create a buffer, and then call gst_soup_http_src_unlock, will have no leak.

So I think should add a mutex to protect gst_soup_http_src_create and gst_soup_http_src_unlock.
Comment 1 Sebastian Dröge (slomo) 2013-12-31 08:56:58 UTC
Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

*** This bug has been marked as a duplicate of bug 663944 ***