g_cancellable_disconnect() deadlock
@mcrha
Submitted by Milan Crha Link to original bug (#775422)
Description
I just received a deadlock issue downstream: https://bugzilla.redhat.com/show_bug.cgi?id=1398531
Which shows that a deadlock can happen when the g_cancellable_disconnect() calls g_signal_handler_disconnect() with cancellable_mutex lock, then some other parts can deadlock, even it's not obvious from the code, only from the backtrace.
I'd suggest to call g_signal_handler_disconnect() only after the cancellable_mutex is unlocked. Even better would be to use a per-cancellable mutex, as suggested in bug #650252.
Version: 2.50.x