[pulseaudio-tickets] [Bug 99667] data race in pa_queue_pop/pa_queue_push reported by TSan

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Apr 11 12:58:43 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=99667

--- Comment #4 from Fabrice Bellet <fabrice at bellet.info> ---
Thank you for your time of this case. With your suggestion, I confirm that
delaying the work from the notify callback of the gstreamer thread, so that it
happens in the glib mainloop thread instead, works for me and makes tsan happy:

> @@ -551,7 +554,13 @@ empathy_mic_monitor_get_current_mic_async (EmpathyMicMonitor *self,
>    operation = operation_new (operation_get_current_mic, simple);
>    g_queue_push_tail (priv->operations, operation);
> 
> -  operations_run (self);
> +  /* we make sure this function containing pulseaudio operations is
> +   * called from the default mainloop, by the same thread than the
> +   * one running the pa_glib_mainloop. This is needed because PA
> +   * is not thread-safe. Other functions calling operations_run()
> +   * are called from the main thread, and don't need this indirection.
> +   */
> +  g_idle_add (operations_run, self);
>  }
> 
>  guint

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20170411/c05e13e2/attachment.html>


More information about the pulseaudio-bugs mailing list