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 656825 - deadlock in gst_index_path_resolver
deadlock in gst_index_path_resolver
Status: RESOLVED WONTFIX
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-08-18 15:14 UTC by Philip Jägenstedt
Modified: 2012-09-25 12:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Philip Jägenstedt 2011-08-18 15:14:49 UTC
Playing http://svn.webkit.org/repository/webkit/trunk/LayoutTests/media/content/counting-captioned.mov using decodebin2 with an indexer set, I get the deadlock with the backtrace at the end of this comment.

AFAICT, the object lock is not recursive, and this is what causes the deadlock to happen. The lock is held in gst_bin_add_func and is taken again in gst_object_get_parent as gst_object_get_path_string traverses the parents. My best guess is that something is wrong in gst_qtdemux_set_index since the same problem hasn't occured with matroskademux.

  • #0 __lll_lock_wait
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #1 _L_lock_944
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 pthread_mutex_lock
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #3 gst_object_get_parent
    at gstobject.c line 893
  • #4 gst_object_get_path_string
    at gstobject.c line 1143
  • #5 gst_index_path_resolver
    at gstindex.c line 650
  • #6 gst_index_get_writer_id
    at gstindex.c line 730
  • #7 gst_qtdemux_set_index
    at qtdemux.c line 1750
  • #8 gst_element_set_index
    at gstelement.c line 657
  • #9 gst_bin_add_func
    at gstbin.c line 1120
  • #10 gst_bin_add
    at gstbin.c line 1244
  • #11 connect_pad
    at gstdecodebin2.c line 1769
  • #12 analyze_new_pad
    at gstdecodebin2.c line 1521
  • #13 type_found
    at gstdecodebin2.c line 2131
  • #14 gst_marshal_VOID__UINT_BOXED
    at gstmarshal.c line 509
  • #15 g_closure_invoke
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #16 ??
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #17 g_signal_emit_valist
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #18 g_signal_emit
    from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
  • #19 gst_type_find_element_chain_do_typefinding
    at gsttypefindelement.c line 845
  • #20 gst_type_find_element_chain
    at gsttypefindelement.c line 780
  • #21 gst_pad_chain_data_unchecked
    at gstpad.c line 4248
  • #22 gst_pad_push_data
    at gstpad.c line 4480
  • #23 gst_pad_push
    at gstpad.c line 4705
  • #24 gst_proxy_pad_chain_default
    at gstghostpad.c line 272
  • #25 gst_pad_chain_data_unchecked
    at gstpad.c line 4248
  • #26 gst_pad_push_data
    at gstpad.c line 4480
  • #27 gst_pad_push
    at gstpad.c line 4705
  • #28 gst_base_src_loop
    at gstbasesrc.c line 2552
  • #29 gst_task_func
    at gsttask.c line 318
  • #30 default_func
    at gsttaskpool.c line 70
  • #31 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #32 ??
    from /lib/x86_64-linux-gnu/libglib-2.0.so.0
  • #33 start_thread
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #34 clone
    from /lib/x86_64-linux-gnu/libc.so.6
  • #35 ??

Comment 1 Tim-Philipp Müller 2011-08-18 20:11:23 UTC
Right, that's because matroskademux gets the writer_id later and qtdemux (and many other elements) get and store the writer_id right away.
Comment 2 Tim-Philipp Müller 2012-03-20 12:55:44 UTC
Just in case anyone else comes across this, this can be worked around by setting the resolver method of the index to GST_INDEX_RESOLVER_GTYPE.
Comment 3 Tim-Philipp Müller 2012-09-25 12:01:38 UTC
GstIndex is gone in 1.0, can't really fix it in 0.10.