Issue with g_source finalize callback
Submitted by Tirpak Balazs
Created attachment 302566 call trace
We have an issue with g_source's finalize callback. It seems that it is called from two different threads with the same source. See attachment.
It also seems that this patch aaaaab91 (relevant bugid: 619329) though not causing it, triggers it very frequently.
We also found this patch b3582028 (relevant bug ids: 586432, 626702, 634239), which seems to be a bad idea. Every time the finalize callback called, the context lock is released and g_main_context_check->g_source_iter_next->g_source_unref_internal will be able to grab the lock immediately. (Hence the trace we have).
Attachment 302566, "call trace":