[Bug 750397] CRITICAL: Race condition in GstBus

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Oct 20 08:11:03 PDT 2015


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

--- Comment #8 from James Stevenson <james at stev.org> ---

Another possible fix for this issue without using the lock would be to reverse
the order of the statements during the write to the queue.

so instead of 

     gst_atomic_queue_push (bus->priv->queue, message);
      gst_poll_write_control (bus->priv->poll);

changing the order to

     gst_poll_write_control (bus->priv->poll);
     gst_atomic_queue_push (bus->priv->queue, message);

This will make sure the gst_poll_read_control internals are > 0 before an item
is removed from the queue. However this will also have the cost of a possible
premature wakeup by something sleeping on the bus.

Any thoughts or suggestions on doing that?

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