After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 783515 - gst_element_set_state() blocked
gst_element_set_state() blocked
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
1.12.0
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-06-07 14:42 UTC by Dmitry
Modified: 2018-01-18 21:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace (48.96 KB, text/plain)
2017-06-07 14:42 UTC, Dmitry
Details

Description Dmitry 2017-06-07 14:42:14 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.
Comment 1 Sebastian Dröge (slomo) 2017-06-07 14:51:46 UTC
Did it work in previous versions? Can you provide a testcase to reproduce it?
Comment 2 Dmitry 2017-06-08 06:20:17 UTC
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...
Comment 3 Sebastian Dröge (slomo) 2017-07-14 07:39:54 UTC
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.
Comment 4 Edward Hervey 2017-11-15 11:19:57 UTC
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.
Comment 5 Tim-Philipp Müller 2018-01-18 21:53:02 UTC
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!