[Bug 779181] New: gst_gl_window_eagl_new can be called multiple times in different threads, which can lead to deadlocks

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Feb 24 14:42:49 UTC 2017


https://bugzilla.gnome.org/show_bug.cgi?id=779181

            Bug ID: 779181
           Summary: gst_gl_window_eagl_new can be called multiple times in
                    different threads, which can lead to deadlocks
    Classification: Platform
           Product: GStreamer
           Version: 1.11.1
                OS: Mac OS
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: socialmediamaster9000 at gmail.com
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

Created attachment 346642
  --> https://bugzilla.gnome.org/attachment.cgi?id=346642&action=edit
Stacktraces

It says that 

/* Must be called in the gl thread */
GstGLWindowEagl *
gst_gl_window_eagl_new (GstGLDisplay * display)

However, it runs in the main thread if "gst_gl_basefilter_decide_allocation /
... / gst_gl_context_create / ... / _ensure_window" is called

Or if  "gst_glimage_sink_change_state / _ensure_gl_setup ... / _ensure_window"
is called.

And, in fact, these two things could run in multiple threads if queues and bins
are involved and things are set in state playing before being linked together.
This will lead to running this multiple times:

  gl_queue = dispatch_queue_create ("org.freedesktop.gstreamer.glwindow",
NULL);

Which is bad, because when the elements are linked together the program will
deadlock. I've attached a picture showing a deadlock. Note that their are two
threads with the same name "org.freedesktop.gstreamer.glwindow", which I think
should never happen.

I think the fix is to EITHER make sure the window really is only called in the
gl thread OR to make it use a singleton/static variable that is only
initialized once.

-- 
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