After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 778079 - race in gstpoll detected by TSan
race in gstpoll detected by TSan
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.10.x
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-02 14:35 UTC by Fabrice Bellet
Modified: 2018-11-03 12:39 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ThreadSanitizer: data race gstreamer/gst/gstpoll.c:1371 in gst_poll_wait (13.87 KB, text/plain)
2017-02-02 14:35 UTC, Fabrice Bellet
Details
ThreadSanitizer: data race (/lib64/libtsan.so.0+0x45bd6) in __interceptor_ppoll (12.95 KB, text/plain)
2017-02-02 14:39 UTC, Fabrice Bellet
Details

Description Fabrice Bellet 2017-02-02 14:35:58 UTC
Created attachment 344776 [details]
ThreadSanitizer: data race gstreamer/gst/gstpoll.c:1371 in gst_poll_wait

This case detected by the ThreadSanitizer where the set->active_fds GArray is expanded/reallocated while another thread is calling ppoll() on it.
Comment 1 Fabrice Bellet 2017-02-02 14:39:59 UTC
Created attachment 344777 [details]
ThreadSanitizer: data race (/lib64/libtsan.so.0+0x45bd6) in __interceptor_ppoll

This second trace (occuring after the first one) corresponds to two threads waiting on ppoll() with the same fd array.
Comment 2 Sebastian Dröge (slomo) 2017-02-02 15:05:22 UTC
Yes, it seems not thread-safe to use the same GstPoll from two different threads at the same time... although it tries to allow that (see mutex). And the docs also allow it for ones that are created with gst_poll_new_timer() like here (but not for others).

They share the same array for the fds, but this array can be changed by each call at any time, including reallocation.
Comment 3 GStreamer system administrator 2018-11-03 12:39:20 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/219.