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 702697 - adder: Seek while paused causes deadlock
adder: Seek while paused causes deadlock
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-19 22:04 UTC by Brendan Long
Modified: 2015-07-11 20:57 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Python script demonstrating problem. (1.90 KB, text/x-python)
2013-06-19 22:04 UTC, Brendan Long
Details

Description Brendan Long 2013-06-19 22:04:12 UTC
Created attachment 247292 [details]
Python script demonstrating problem.

"adder" has a deadlock in `gst_adder_sink_event` if you seek while paused.

This (with input-selector) works fine:

    ./playbin-adder-seek.py 'https://dl.dropboxusercontent.com/s/aggvr6ch12oqy76/test.mkv?token_hash=AAG9qwEgF7qNdaxHIHzSwX0pGENusbixzL_xfHL2UOLhlA&dl=1'

But this (with adder) locks up when I pause then seek:

    ./playbin-adder-seek.py --use-adder 'https://dl.dropboxusercontent.com/s/aggvr6ch12oqy76/test.mkv?token_hash=AAG9qwEgF7qNdaxHIHzSwX0pGENusbixzL_xfHL2UOLhlA&dl=1'

(If this link doesn't work for some reason, you can get the file I'm using here: https://www.dropbox.com/s/aggvr6ch12oqy76/test.mkv)

It works fine if I'm not paused.

The example file just sets the state to PAUSED, then tries to seek every second.

Backtrace:
  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 132
  • #1 _L_lock_903
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #3 gst_adder_sink_event
    at gstadder.c line 837
  • #4 gst_collect_pads_event
    at gstcollectpads.c line 1815
  • #5 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #6 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #7 gst_pad_push_event
    at gstpad.c line 4802
  • #8 event_forward_func
    at gstpad.c line 2735
  • #9 gst_pad_forward
    at gstpad.c line 2689
  • #10 gst_pad_event_default
    at gstpad.c line 2786
  • #11 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #12 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #13 gst_pad_push_event
    at gstpad.c line 4802
  • #14 event_forward_func
    at gstpad.c line 2735
  • #15 gst_pad_forward
    at gstpad.c line 2689
  • #16 gst_pad_event_default
    at gstpad.c line 2786
  • #17 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #18 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #19 gst_pad_push_event
    at gstpad.c line 4802
  • #20 event_forward_func
    at gstpad.c line 2735
  • #21 gst_pad_forward
    at gstpad.c line 2689
  • #22 gst_pad_event_default
    at gstpad.c line 2786
  • #23 gst_audio_decoder_sink_eventfunc
    at gstaudiodecoder.c line 1857
  • #24 gst_audio_decoder_sink_event
    at gstaudiodecoder.c line 1888
  • #25 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #26 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #27 gst_pad_push_event
    at gstpad.c line 4802
  • #28 gst_multi_queue_sink_event
    at gstmultiqueue.c line 1515
  • #29 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #30 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #31 gst_pad_push_event
    at gstpad.c line 4802
  • #32 event_forward_func
    at gstpad.c line 2735
  • #33 gst_pad_forward
    at gstpad.c line 2689
  • #34 gst_pad_event_default
    at gstpad.c line 2786
  • #35 gst_matroska_demux_handle_sink_event
    at matroska-demux.c line 4757
  • #36 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #37 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #38 gst_pad_push_event
    at gstpad.c line 4802
  • #39 gst_type_find_element_sink_event
    at gsttypefindelement.c line 677
  • #40 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #41 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #42 gst_pad_push_event
    at gstpad.c line 4802
  • #43 event_forward_func
    at gstpad.c line 2735
  • #44 gst_pad_forward
    at gstpad.c line 2689
  • #45 gst_pad_event_default
    at gstpad.c line 2786
  • #46 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #47 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #48 gst_pad_push_event
    at gstpad.c line 4802
  • #49 gst_queue2_handle_sink_event
    at gstqueue2.c line 2192
  • #50 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #51 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #52 gst_pad_push_event
    at gstpad.c line 4802
  • #53 gst_type_find_element_sink_event
    at gsttypefindelement.c line 677
  • #54 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #55 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #56 gst_pad_push_event
    at gstpad.c line 4802
  • #57 gst_base_src_perform_seek
    at gstbasesrc.c line 1566
  • #58 gst_base_src_default_event
    at gstbasesrc.c line 1899
  • #59 gst_base_src_event
    at gstbasesrc.c line 1951
  • #60 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #61 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #62 gst_pad_push_event
    at gstpad.c line 4802
  • #63 gst_type_find_element_src_event
    at gsttypefindelement.c line 519
  • #64 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #65 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #66 gst_pad_push_event
    at gstpad.c line 4802
  • #67 gst_queue2_handle_src_event
    at gstqueue2.c line 2756
  • #68 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #69 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #70 gst_pad_push_event
    at gstpad.c line 4802
  • #71 event_forward_func
    at gstpad.c line 2735
  • #72 gst_pad_forward
    at gstpad.c line 2689
  • #73 gst_pad_event_default
    at gstpad.c line 2786
  • #74 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #75 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #76 gst_pad_push_event
    at gstpad.c line 4802
  • #77 gst_type_find_element_src_event
    at gsttypefindelement.c line 519
  • #78 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #79 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #80 gst_pad_push_event
    at gstpad.c line 4802
  • #81 perform_seek_to_offset
    at matroska-demux.c line 4603
  • #82 gst_matroska_demux_handle_seek_push
    at matroska-demux.c line 2280
  • #83 gst_matroska_demux_handle_src_event
    at matroska-demux.c line 2308
  • #84 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #85 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #86 gst_pad_push_event
    at gstpad.c line 4802
  • #87 gst_multi_queue_src_event
    at gstmultiqueue.c line 1692
  • #88 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #89 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #90 gst_pad_push_event
    at gstpad.c line 4802
  • #91 gst_video_decoder_src_event_default
    at gstvideodecoder.c line 1292
  • #92 gst_video_decoder_src_event
    at gstvideodecoder.c line 1376
  • #93 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #94 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #95 gst_pad_push_event
    at gstpad.c line 4802
  • #96 event_forward_func
    at gstpad.c line 2735
  • #97 gst_pad_forward
    at gstpad.c line 2689
  • #98 gst_pad_event_default
    at gstpad.c line 2786
  • #99 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #100 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #101 gst_pad_push_event
    at gstpad.c line 4802
  • #102 event_forward_func
    at gstpad.c line 2735
  • #103 gst_pad_forward
    at gstpad.c line 2689
  • #104 gst_pad_event_default
    at gstpad.c line 2786
  • #105 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #106 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #107 gst_pad_push_event
    at gstpad.c line 4802
  • #108 gst_input_selector_event
    at gstinputselector.c line 1495
  • #109 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #110 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #111 gst_pad_push_event
    at gstpad.c line 4802
  • #112 event_forward_func
    at gstpad.c line 2735
  • #113 gst_pad_forward
    at gstpad.c line 2689
  • #114 gst_pad_event_default
    at gstpad.c line 2786
  • #115 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #116 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #117 gst_pad_push_event
    at gstpad.c line 4802
  • #118 gst_stream_synchronizer_src_event
    at gststreamsynchronizer.c line 221
  • #119 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #120 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #121 gst_pad_push_event
    at gstpad.c line 4802
  • #122 event_forward_func
    at gstpad.c line 2735
  • #123 gst_pad_forward
    at gstpad.c line 2689
  • #124 gst_pad_event_default
    at gstpad.c line 2786
  • #125 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #126 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #127 gst_pad_push_event
    at gstpad.c line 4802
  • #128 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #129 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #130 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #131 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #132 gst_pad_push_event
    at gstpad.c line 4802
  • #133 event_forward_func
    at gstpad.c line 2735
  • #134 gst_pad_forward
    at gstpad.c line 2689
  • #135 gst_pad_event_default
    at gstpad.c line 2786
  • #136 gst_deinterlace_src_event
    at gstdeinterlace.c line 2720
  • #137 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #138 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #139 gst_pad_push_event
    at gstpad.c line 4802
  • #140 event_forward_func
    at gstpad.c line 2735
  • #141 gst_pad_forward
    at gstpad.c line 2689
  • #142 gst_pad_event_default
    at gstpad.c line 2786
  • #143 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #144 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #145 gst_pad_push_event
    at gstpad.c line 4802
  • #146 event_forward_func
    at gstpad.c line 2735
  • #147 gst_pad_forward
    at gstpad.c line 2689
  • #148 gst_pad_event_default
    at gstpad.c line 2786
  • #149 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #150 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #151 gst_pad_push_event
    at gstpad.c line 4802
  • #152 event_forward_func
    at gstpad.c line 2735
  • #153 gst_pad_forward
    at gstpad.c line 2689
  • #154 gst_pad_event_default
    at gstpad.c line 2786
  • #155 gst_queue_handle_src_event
    at gstqueue.c line 1299
  • #156 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #157 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #158 gst_pad_push_event
    at gstpad.c line 4802
  • #159 event_forward_func
    at gstpad.c line 2735
  • #160 gst_pad_forward
    at gstpad.c line 2689
  • #161 gst_pad_event_default
    at gstpad.c line 2786
  • #162 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #163 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #164 gst_pad_push_event
    at gstpad.c line 4802
  • #165 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #166 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #167 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #168 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #169 gst_pad_push_event
    at gstpad.c line 4802
  • #170 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #171 gst_video_scale_src_event
    at gstvideoscale.c line 1485
  • #172 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #173 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #174 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #175 gst_pad_push_event
    at gstpad.c line 4802
  • #176 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #177 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #178 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #179 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #180 gst_pad_push_event
    at gstpad.c line 4802
  • #181 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #182 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #183 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #184 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #185 gst_pad_push_event
    at gstpad.c line 4802
  • #186 event_forward_func
    at gstpad.c line 2735
  • #187 gst_pad_forward
    at gstpad.c line 2689
  • #188 gst_pad_event_default
    at gstpad.c line 2786
  • #189 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #190 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #191 gst_pad_push_event
    at gstpad.c line 4802
  • #192 gst_base_sink_send_event
    at gstbasesink.c line 4290
  • #193 gst_element_send_event
    at gstelement.c line 1564
  • #194 gst_bin_send_event
    at gstbin.c line 2783
  • #195 gst_element_send_event
    at gstelement.c line 1564
  • #196 gst_play_sink_send_event_to_sink
    at gstplaysink.c line 4351
  • #197 gst_play_sink_send_event
    at gstplaysink.c line 4393
  • #198 gst_element_send_event
    at gstelement.c line 1564
  • #199 gst_bin_send_event
    at gstbin.c line 2783
  • #200 gst_element_send_event
    at gstelement.c line 1564
  • #201 gst_element_seek
    at gstelement.c line 1604
  • #202 gst_element_seek_simple
    at gstutils.c line 2271
  • #203 ffi_call_unix64
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #204 ffi_call
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #205 ??
    from /usr/lib/libgirepository-1.0.so.1
  • #206 g_function_info_invoke
    from /usr/lib/libgirepository-1.0.so.1
  • #207 ??
    from /usr/lib/python3/dist-packages/gi/_gi.cpython-32mu.so
  • #208 PyEval_EvalFrameEx
  • #209 PyEval_EvalCodeEx
  • #210 PyEval_EvalFrameEx
  • #211 PyEval_EvalCodeEx
  • #212 ??
  • #213 PyObject_Call
  • #214 ??
  • #215 PyObject_Call
  • #216 PyEval_CallObjectWithKeywords
  • #217 _pyglib_handler_marshal
    from /usr/lib/libpyglib-gi-2.0-python3.2.so.0
  • #218 g_timeout_dispatch
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3882
  • #219 g_main_dispatch
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 2539
  • #220 g_main_context_dispatch
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3075
  • #221 g_main_context_iterate
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3146
  • #222 g_main_context_iterate
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3083
  • #223 g_main_loop_run
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3340
  • #224 ??
    from /usr/lib/python3/dist-packages/gi/_glib/_glib.cpython-32mu.so
  • #225 PyEval_EvalFrameEx
  • #226 PyEval_EvalFrameEx
  • #227 PyEval_EvalFrameEx
  • #228 PyEval_EvalCodeEx
  • #229 PyEval_EvalCode
  • #230 ??
  • #231 PyRun_FileExFlags
  • #232 PyRun_SimpleFileExFlags
  • #233 Py_Main
  • #234 main

Comment 1 Brendan Long 2013-06-19 22:07:15 UTC
Oh, and sometimes it works a couple times before locking up, so definitely some sort of race condition.
Comment 2 Brendan Long 2013-06-19 22:20:39 UTC
`GST_COLLECT_PADS_STREAM_LOCK` is sometimes called in `gst_collect_pads_event` before it gets called in `gst_adder_sink_event`, but they should be in the same thread, right?

Changing `gst_adder_sink_event` to not do that lock seems to work, but I'm guessing it's not correct:

    case GST_EVENT_FLUSH_START:
      /* ensure that we will send a flush stop */
      adder->flush_stop_pending = TRUE;
      res = gst_collect_pads_event_default (pads, pad, event, discard);
      event = NULL;
      break;
Comment 3 Brendan Long 2013-06-19 22:39:10 UTC
Here's a backtrace with all of the threads:

Thread 10 (Thread 0x7fffd66a3700 (LWP 18819))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 132
  • #1 _L_lock_903
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #3 gst_collect_pads_chain
    at gstcollectpads.c line 2058
  • #4 gst_pad_chain_data_unchecked
    at gstpad.c line 3708
  • #5 gst_pad_push_data
    at gstpad.c line 3938
  • #6 gst_pad_push
    at gstpad.c line 4041
  • #7 gst_proxy_pad_chain_default
    at gstghostpad.c line 128
  • #8 gst_pad_chain_data_unchecked
    at gstpad.c line 3708
  • #9 gst_pad_push_data
    at gstpad.c line 3938
  • #10 gst_pad_push
    at gstpad.c line 4041
  • #11 gst_proxy_pad_chain_default
    at gstghostpad.c line 128
  • #12 gst_pad_chain_data_unchecked
    at gstpad.c line 3708
  • #13 gst_pad_push_data
    at gstpad.c line 3938
  • #14 gst_pad_push
    at gstpad.c line 4041
  • #15 gst_audio_decoder_push_forward
    at gstaudiodecoder.c line 873
  • #16 gst_audio_decoder_output
    at gstaudiodecoder.c line 949
  • #17 gst_audio_decoder_finish_frame
    at gstaudiodecoder.c line 1149
  • #18 vorbis_handle_data_packet
    at gstvorbisdec.c line 507
  • #19 vorbis_dec_handle_frame
    at gstvorbisdec.c line 596
  • #20 gst_audio_decoder_handle_frame
    at gstaudiodecoder.c line 1196
  • #21 gst_audio_decoder_push_buffers
    at gstaudiodecoder.c line 1294
  • #22 gst_audio_decoder_chain_forward
    at gstaudiodecoder.c line 1397
  • #23 gst_audio_decoder_chain
    at gstaudiodecoder.c line 1665
  • #24 gst_pad_chain_data_unchecked
    at gstpad.c line 3708
  • #25 gst_pad_push_data
    at gstpad.c line 3938
  • #26 gst_pad_push
    at gstpad.c line 4041
  • #27 gst_single_queue_push_one
    at gstmultiqueue.c line 1059
  • #28 gst_multi_queue_loop
    at gstmultiqueue.c line 1307
  • #29 gst_task_func
    at gsttask.c line 316
  • #30 default_func
    at gsttaskpool.c line 70
  • #31 g_thread_pool_thread_proxy
    at /build/buildd/glib2.0-2.32.3/./glib/gthreadpool.c line 309
  • #32 g_thread_proxy
    at /build/buildd/glib2.0-2.32.3/./glib/gthread.c line 801
  • #33 start_thread
    at pthread_create.c line 308
  • #34 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #35 ??

Thread 1 (Thread 0x7ffff7fd2700 (LWP 14594))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 132
  • #1 _L_lock_903
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 82
  • #3 gst_adder_sink_event
    at gstadder.c line 837
  • #4 gst_collect_pads_event
    at gstcollectpads.c line 1816
  • #5 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #6 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #7 gst_pad_push_event
    at gstpad.c line 4802
  • #8 event_forward_func
    at gstpad.c line 2735
  • #9 gst_pad_forward
    at gstpad.c line 2689
  • #10 gst_pad_event_default
    at gstpad.c line 2786
  • #11 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #12 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #13 gst_pad_push_event
    at gstpad.c line 4802
  • #14 event_forward_func
    at gstpad.c line 2735
  • #15 gst_pad_forward
    at gstpad.c line 2689
  • #16 gst_pad_event_default
    at gstpad.c line 2786
  • #17 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #18 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #19 gst_pad_push_event
    at gstpad.c line 4802
  • #20 event_forward_func
    at gstpad.c line 2735
  • #21 gst_pad_forward
    at gstpad.c line 2689
  • #22 gst_pad_event_default
    at gstpad.c line 2786
  • #23 gst_audio_decoder_sink_eventfunc
    at gstaudiodecoder.c line 1857
  • #24 gst_audio_decoder_sink_event
    at gstaudiodecoder.c line 1888
  • #25 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #26 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #27 gst_pad_push_event
    at gstpad.c line 4802
  • #28 gst_multi_queue_sink_event
    at gstmultiqueue.c line 1515
  • #29 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #30 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #31 gst_pad_push_event
    at gstpad.c line 4802
  • #32 event_forward_func
    at gstpad.c line 2735
  • #33 gst_pad_forward
    at gstpad.c line 2689
  • #34 gst_pad_event_default
    at gstpad.c line 2786
  • #35 gst_matroska_demux_handle_sink_event
    at matroska-demux.c line 4757
  • #36 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #37 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #38 gst_pad_push_event
    at gstpad.c line 4802
  • #39 gst_type_find_element_sink_event
    at gsttypefindelement.c line 677
  • #40 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #41 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #42 gst_pad_push_event
    at gstpad.c line 4802
  • #43 event_forward_func
    at gstpad.c line 2735
  • #44 gst_pad_forward
    at gstpad.c line 2689
  • #45 gst_pad_event_default
    at gstpad.c line 2786
  • #46 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #47 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #48 gst_pad_push_event
    at gstpad.c line 4802
  • #49 gst_queue2_handle_sink_event
    at gstqueue2.c line 2192
  • #50 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #51 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #52 gst_pad_push_event
    at gstpad.c line 4802
  • #53 gst_type_find_element_sink_event
    at gsttypefindelement.c line 677
  • #54 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #55 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #56 gst_pad_push_event
    at gstpad.c line 4802
  • #57 gst_base_src_perform_seek
    at gstbasesrc.c line 1566
  • #58 gst_base_src_default_event
    at gstbasesrc.c line 1899
  • #59 gst_base_src_event
    at gstbasesrc.c line 1951
  • #60 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #61 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #62 gst_pad_push_event
    at gstpad.c line 4802
  • #63 gst_type_find_element_src_event
    at gsttypefindelement.c line 519
  • #64 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #65 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #66 gst_pad_push_event
    at gstpad.c line 4802
  • #67 gst_queue2_handle_src_event
    at gstqueue2.c line 2756
  • #68 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #69 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #70 gst_pad_push_event
    at gstpad.c line 4802
  • #71 event_forward_func
    at gstpad.c line 2735
  • #72 gst_pad_forward
    at gstpad.c line 2689
  • #73 gst_pad_event_default
    at gstpad.c line 2786
  • #74 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #75 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #76 gst_pad_push_event
    at gstpad.c line 4802
  • #77 gst_type_find_element_src_event
    at gsttypefindelement.c line 519
  • #78 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #79 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #80 gst_pad_push_event
    at gstpad.c line 4802
  • #81 perform_seek_to_offset
    at matroska-demux.c line 4603
  • #82 gst_matroska_demux_handle_seek_push
    at matroska-demux.c line 2280
  • #83 gst_matroska_demux_handle_src_event
    at matroska-demux.c line 2308
  • #84 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #85 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #86 gst_pad_push_event
    at gstpad.c line 4802
  • #87 gst_multi_queue_src_event
    at gstmultiqueue.c line 1692
  • #88 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #89 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #90 gst_pad_push_event
    at gstpad.c line 4802
  • #91 gst_video_decoder_src_event_default
    at gstvideodecoder.c line 1292
  • #92 gst_video_decoder_src_event
    at gstvideodecoder.c line 1376
  • #93 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #94 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #95 gst_pad_push_event
    at gstpad.c line 4802
  • #96 event_forward_func
    at gstpad.c line 2735
  • #97 gst_pad_forward
    at gstpad.c line 2689
  • #98 gst_pad_event_default
    at gstpad.c line 2786
  • #99 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #100 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #101 gst_pad_push_event
    at gstpad.c line 4802
  • #102 event_forward_func
    at gstpad.c line 2735
  • #103 gst_pad_forward
    at gstpad.c line 2689
  • #104 gst_pad_event_default
    at gstpad.c line 2786
  • #105 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #106 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #107 gst_pad_push_event
    at gstpad.c line 4802
  • #108 gst_input_selector_event
    at gstinputselector.c line 1495
  • #109 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #110 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #111 gst_pad_push_event
    at gstpad.c line 4802
  • #112 event_forward_func
    at gstpad.c line 2735
  • #113 gst_pad_forward
    at gstpad.c line 2689
  • #114 gst_pad_event_default
    at gstpad.c line 2786
  • #115 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #116 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #117 gst_pad_push_event
    at gstpad.c line 4802
  • #118 gst_stream_synchronizer_src_event
    at gststreamsynchronizer.c line 221
  • #119 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #120 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #121 gst_pad_push_event
    at gstpad.c line 4802
  • #122 event_forward_func
    at gstpad.c line 2735
  • #123 gst_pad_forward
    at gstpad.c line 2689
  • #124 gst_pad_event_default
    at gstpad.c line 2786
  • #125 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #126 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #127 gst_pad_push_event
    at gstpad.c line 4802
  • #128 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #129 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #130 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #131 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #132 gst_pad_push_event
    at gstpad.c line 4802
  • #133 event_forward_func
    at gstpad.c line 2735
  • #134 gst_pad_forward
    at gstpad.c line 2689
  • #135 gst_pad_event_default
    at gstpad.c line 2786
  • #136 gst_deinterlace_src_event
    at gstdeinterlace.c line 2720
  • #137 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #138 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #139 gst_pad_push_event
    at gstpad.c line 4802
  • #140 event_forward_func
    at gstpad.c line 2735
  • #141 gst_pad_forward
    at gstpad.c line 2689
  • #142 gst_pad_event_default
    at gstpad.c line 2786
  • #143 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #144 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #145 gst_pad_push_event
    at gstpad.c line 4802
  • #146 event_forward_func
    at gstpad.c line 2735
  • #147 gst_pad_forward
    at gstpad.c line 2689
  • #148 gst_pad_event_default
    at gstpad.c line 2786
  • #149 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #150 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #151 gst_pad_push_event
    at gstpad.c line 4802
  • #152 event_forward_func
    at gstpad.c line 2735
  • #153 gst_pad_forward
    at gstpad.c line 2689
  • #154 gst_pad_event_default
    at gstpad.c line 2786
  • #155 gst_queue_handle_src_event
    at gstqueue.c line 1299
  • #156 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #157 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #158 gst_pad_push_event
    at gstpad.c line 4802
  • #159 event_forward_func
    at gstpad.c line 2735
  • #160 gst_pad_forward
    at gstpad.c line 2689
  • #161 gst_pad_event_default
    at gstpad.c line 2786
  • #162 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #163 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #164 gst_pad_push_event
    at gstpad.c line 4802
  • #165 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #166 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #167 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #168 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #169 gst_pad_push_event
    at gstpad.c line 4802
  • #170 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #171 gst_video_scale_src_event
    at gstvideoscale.c line 1485
  • #172 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #173 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #174 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #175 gst_pad_push_event
    at gstpad.c line 4802
  • #176 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #177 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #178 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #179 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #180 gst_pad_push_event
    at gstpad.c line 4802
  • #181 gst_base_transform_src_eventfunc
    at gstbasetransform.c line 1909
  • #182 gst_base_transform_src_event
    at gstbasetransform.c line 1876
  • #183 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #184 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #185 gst_pad_push_event
    at gstpad.c line 4802
  • #186 event_forward_func
    at gstpad.c line 2735
  • #187 gst_pad_forward
    at gstpad.c line 2689
  • #188 gst_pad_event_default
    at gstpad.c line 2786
  • #189 gst_pad_send_event_unchecked
    at gstpad.c line 4983
  • #190 gst_pad_push_event_unchecked
    at gstpad.c line 4679
  • #191 gst_pad_push_event
    at gstpad.c line 4802
  • #192 gst_base_sink_send_event
    at gstbasesink.c line 4290
  • #193 gst_element_send_event
    at gstelement.c line 1564
  • #194 gst_bin_send_event
    at gstbin.c line 2783
  • #195 gst_element_send_event
    at gstelement.c line 1564
  • #196 gst_play_sink_send_event_to_sink
    at gstplaysink.c line 4351
  • #197 gst_play_sink_send_event
    at gstplaysink.c line 4393
  • #198 gst_element_send_event
    at gstelement.c line 1564
  • #199 gst_bin_send_event
    at gstbin.c line 2783
  • #200 gst_element_send_event
    at gstelement.c line 1564
  • #201 gst_element_seek
    at gstelement.c line 1604
  • #202 gst_element_seek_simple
    at gstutils.c line 2271
  • #203 ffi_call_unix64
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #204 ffi_call
    from /usr/lib/x86_64-linux-gnu/libffi.so.6
  • #205 ??
    from /usr/lib/libgirepository-1.0.so.1
  • #206 g_function_info_invoke
    from /usr/lib/libgirepository-1.0.so.1
  • #207 ??
    from /usr/lib/python3/dist-packages/gi/_gi.cpython-32mu.so
  • #208 PyEval_EvalFrameEx
  • #209 PyEval_EvalCodeEx
  • #210 PyEval_EvalFrameEx
  • #211 PyEval_EvalCodeEx
  • #212 ??
  • #213 PyObject_Call
  • #214 ??
  • #215 PyObject_Call
  • #216 PyEval_CallObjectWithKeywords
  • #217 _pyglib_handler_marshal
    from /usr/lib/libpyglib-gi-2.0-python3.2.so.0
  • #218 g_timeout_dispatch
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3882
  • #219 g_main_dispatch
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 2539
  • #220 g_main_context_dispatch
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3075
  • #221 g_main_context_iterate
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3146
  • #222 g_main_context_iterate
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3083
  • #223 g_main_loop_run
    at /build/buildd/glib2.0-2.32.3/./glib/gmain.c line 3340
  • #224 ??
    from /usr/lib/python3/dist-packages/gi/_glib/_glib.cpython-32mu.so
  • #225 PyEval_EvalFrameEx
  • #226 PyEval_EvalFrameEx
  • #227 PyEval_EvalFrameEx
  • #228 PyEval_EvalCodeEx
  • #229 PyEval_EvalCode
  • #230 ??
  • #231 PyRun_FileExFlags
  • #232 PyRun_SimpleFileExFlags
  • #233 Py_Main
  • #234 main

It looks like thread 8 is holding the lock for some reason..
Comment 4 Brendan Long 2013-06-19 22:49:38 UTC
The other lock is at line 2019 in `gst_collect_pads_chain`.
Comment 5 Brendan Long 2013-06-19 22:52:07 UTC
Releasing the lock before `ret = gst_collect_pads_check_collected (pads);` and then getting it back again after seems to fix the problem too, but again, I don't know what the correct behaviour is here since I'm completely unfamiliar with these elements :\
Comment 6 Brendan Long 2013-06-26 17:07:14 UTC
This function in gstadder.c is pretty suspicious. It's sending flush_stop events for some reason?

static gboolean
forward_event_func (const GValue * val, GValue * ret, EventData * data)
{
  GstPad *pad = g_value_get_object (val);
  GstEvent *event = data->event;
  GstPad *peer;

  gst_event_ref (event);
  GST_LOG_OBJECT (pad, "About to send event %s", GST_EVENT_TYPE_NAME (event));
  peer = gst_pad_get_peer (pad);
  /* collect pad might have been set flushing,
   * so bypass core checking that and send directly to peer */
  if (!peer || !gst_pad_send_event (peer, event)) {
    if (!peer)
      gst_event_unref (event);
    GST_WARNING_OBJECT (pad, "Sending event  %p (%s) failed.",
        event, GST_EVENT_TYPE_NAME (event));
    /* quick hack to unflush the pads, ideally we need a way to just unflush
     * this single collect pad */
    if (data->flush)
      gst_pad_send_event (pad, gst_event_new_flush_stop (TRUE));
  } else {
    g_value_set_boolean (ret, TRUE);
    GST_LOG_OBJECT (pad, "Sent event  %p (%s).",
        event, GST_EVENT_TYPE_NAME (event));
  }
  if (peer)
    gst_object_unref (peer);

  /* continue on other pads, even if one failed */
  return TRUE;
}
Comment 7 Sebastian Dröge (slomo) 2013-06-30 12:51:42 UTC
I'm working on a new element called audiomixer that fixes some of these things and also implements synchronized mixing (which adder does not do at all currently). I agree that the code in adder at many places is quite suspicious :)
Comment 8 Tim-Philipp Müller 2015-07-11 20:57:23 UTC
Let's close this as WONTFIX, since adder is generally quite dodgy and I don't expect this will get fixed, ever (if it's even possible to fix).

The new audiomixer element should handle this correctly.

I'm having problems with your script, so didn't test.