[Bug 778038] race in gstpad detected by TSan
GStreamer (GNOME Bugzilla)
bugzilla at gnome.org
Wed Feb 1 16:46:18 UTC 2017
https://bugzilla.gnome.org/show_bug.cgi?id=778038
Sebastian Dröge (slomo) <slomo at coaxion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |slomo at coaxion.net
--- Comment #1 from Sebastian Dröge (slomo) <slomo at coaxion.net> ---
The possible problem here is that store_sticky_event() could change the pad
flags (EOS flag) while gst_pad_query_caps_default() reads them for another flag
(PROXY_CAPS). The latter can only be set once during object creation, not
later. The former change at any time. The assumption in
gst_pad_query_caps_default() and other places about the pad flags is that they
don't change after creation, so no mutex is needed. Which is not true for the
EOS, BLOCKED, FLUSHING flags at least.
As access to these is all public API, we have a problem now and can't split
them into separate fields anymore. I guess the only solution here would be to
make GST_OBJECT_FLAG_SET()/UNSET() use atomic ops
(g_atomic_int_compare_and_exchange()) and GST_OBJECT_FLAG_IS_SET() too
(g_atomic_int_get()), and also the other macros. And declare that access
without those macros is invalid.
--
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