GNOME Bugzilla – Bug 783515
gst_element_set_state() blocked
Last modified: 2018-01-18 21:53:02 UTC
Created attachment 353340 [details] Backtrace Deadlock happens regularly on the gst_element_set_state function. Short stack: 1 __lll_lock_wait 0x76f9ed94 2 pthread_mutex_lock 0x76f97b38 3 post_activate gstpad.c 1015 0x76db27e0 4 activate_mode_internal gstpad.c 1186 0x76db27e0 5 gst_pad_activate_mode gstpad.c 1273 0x76db355c 6 gst_ghost_pad_activate_push_default gstghostpad.c 383 0x76d9a46c 7 activate_mode_internal gstpad.c 1179 0x76db27cc 8 gst_pad_set_active gstpad.c 1080 0x76db32c8 9 activate_pads gstbin.c 2630 0x76d62c24 10 gst_iterator_fold gstiterator.c 617 0x76da06bc 11 iterator_activate_fold_with_resync gstbin.c 2653 0x76d6223c 12 gst_bin_src_pads_activate gstbin.c 2687 0x76d6223c 13 gst_bin_change_state_func gstbin.c 2891 0x76d69c94 14 gst_element_change_state gstelement.c 2743 0x76d91280 15 gst_element_continue_state gstelement.c 2451 0x76d91e70 16 gst_element_change_state gstelement.c 2789 0x76d91310 17 gst_element_set_state_func gstelement.c 2697 0x76d91a78 18 setElementState main.c 430 0x190a8 19 beepOff_cb queuecontroller.c 396 0x17704 20 stopAnySoundPlayBySourceID queuecontroller.c 584 0x186d4 ... <More> The function stopAnySoundPlayBySourceID I call by callback function g_idle_add from other thread.
Did it work in previous versions? Can you provide a testcase to reproduce it?
It is the complex project and a code depend on other functions, it is difficult to me to cut out a working piece of code for testcase quikly...
You'll have to give at least some more details about your application (what pipeline for example), and what the situation is when this happens.
The root cause is that the streaming thread going through that last pad is currently blocked somewhere downstream. When deactivating elements, make sure you're not blocking the output somewhere downstream.
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment. Thanks!