G_source_remove method call is getting stuck (leading corresponding thread to get stuck)

Hello,

As part of our Application (Voice mail solution) we have integrated G-Streamer/GLib pipeline to transcode the audio data. It is running absolutely fine at our customer sites for years… Customer reported one unique issue recently where the application crashed (on windows system) and the dump is pointing to G-Streamer g_source_remove function. When we further reviewed the area of interest i.e., g_source_remove and referred to the definition of this method; we suspect there could be some issue (either with the way we are passing the source ID)… The function g_source_remove method call is not returning any response in failure scenario … we wanted to understand more about this and hence posted a query in the forum … let us know if you need specific details ?
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, GLib.Source.remove 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,
Hemanth

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.