[Bug 750397] CRITICAL: Race condition in GstBus

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Mon Jun 27 15:18:33 UTC 2016


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

Matt Gruenke <mgruenke at tycoint.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #330346|needs-work                  |none
             status|                            |
 Attachment #330346|0                           |1
        is obsolete|                            |

--- Comment #43 from Matt Gruenke <mgruenke at tycoint.com> ---
Created attachment 330446
  --> https://bugzilla.gnome.org/attachment.cgi?id=330446&action=edit
Addresses race condition on Windows, possible with patch 330346.

This contains separate fixes for Windows and Linux.

For Windows, it's necessary to fix the race condition between testing
set->control_pending and performing WAKE_EVENT()/RELEASE_EVENT().  This is
accomplished by acquiring and holding set->lock, for both of these operations. 
We could optimize the Linux version by making this Windows-specific.

On Linux, the socketpair() of the should not be made O_NONBLOCK.  If there's
any propagation delay between set->control_write_fd.fd and
set->control_read_fd.fd, even the above mutex will not be sufficient to prevent
a race condition.  There's no benefit to using O_NONBLOCK, here.  Only
liabilities.

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