g_source_remove method call is getting stuck (leading corresponding thread to get stuck)
Hello,
We have a Media Server integrated with GStreamer for transcoding. Our application is running absolutely fine in production system. Recently, we have noticed an abnormal behavior where g_source_remove method call is stuck leading to application issue.
if (source_id) { g_source_remove(source_id); source_id = 0; }
As mentioned in the code above, we are validating the source_id before invoking g_source_remove method call. Also, we have tried printing source_id, the value is not corrupted (valid).
From the link, https://docs.gtk.org/glib/type_func.Source.remove.html it is mentioned that,
It is a programmer error to attempt to remove a non-existent source.
As detailed in this ticket, the problem is not observed frequently in the production system (Handling millions of calls). However, there is a corner scenario where this issue is occurring.
Could you please help us to better implement g_source_remove to avoid this abnormal behavior.
We tried running stress test(high volume), the issue is recreated in our lab.
We are running GStreamer version 1.12 and let us know if any subsequent version address g_source_remove issue.
Thanks in advance.
Hemanth