[Bug 750397] CRITICAL: Race condition in GstBus
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Sat Jun 25 11:33:17 UTC 2016
https://bugzilla.gnome.org/show_bug.cgi?id=750397
--- Comment #33 from Jan Schmidt <thaytan at noraisin.net> ---
It seems to me that removing non-blocking mode from the socket is sufficient on
Linux, but I don't think so on Windows.
A socket *can* end up containing multiple bytes, but an Event can only be set
once. Consider a scenario with multiple threads submitting control events, and
a single reader.
0. set->control_pending is initially 0.
1. Writer 1 increments set->control_pending
2. Writer 1 sets the Event
3. Reader decrements set->control_pending
4. Writer 2 increments set->control_pending
5. Writer 2 sets the Already-Set event again
6. Reader clears the Event
Now the control variable is set but the Event never will be. I think we can use
a Semaphore object instead on Windows to avoid 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