[Bug 721256] New: eventfd leak in souphttpsrc

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Mon Dec 30 19:15:06 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=721256
  GStreamer | gst-plugins-good | 1.0.5

           Summary: eventfd leak in souphttpsrc
    Classification: Platform
           Product: GStreamer
           Version: 1.0.5
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: major
          Priority: Normal
         Component: gst-plugins-good
        AssignedTo: gstreamer-bugs at lists.freedesktop.org
        ReportedBy: zhangyanping210 at 163.com
         QAContact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---


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.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list