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 763625 - decodebin: Crashes when shutting down during autoplugging
decodebin: Crashes when shutting down during autoplugging
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other All
: Normal blocker
: 1.7.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 735896 763491
Blocks:
 
 
Reported: 2016-03-14 15:11 UTC by Sebastian Dröge (slomo)
Modified: 2016-03-14 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
decodebin: Shut down all elements explicitly to NULL state before freeing the decode chain (3.67 KB, patch)
2016-03-14 15:11 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Sebastian Dröge (slomo) 2016-03-14 15:11:16 UTC
+++ This bug was initially created as a clone of Bug #763491 +++

See also bug #752651
Comment 1 Sebastian Dröge (slomo) 2016-03-14 15:11:38 UTC
Created attachment 323879 [details] [review]
decodebin: Shut down all elements explicitly to NULL state before freeing the decode chain

Due to transient locked state during autoplugging, some elements might be
ignored by the GstBin::change_state() and might still be running. Which could
then cause pad-added and similar accessing decodebin state that does not exist
anymore, and crash.
Comment 2 Sebastian Dröge (slomo) 2016-03-14 15:13:05 UTC
I *think* after this we can also remove the chain refcounting and other weird fixes that happened in decodebin. But that's for after 1.8
Comment 3 Sebastian Dröge (slomo) 2016-03-14 15:57:04 UTC
Seems to solve the problem, let's see after 1.8 if we can get rid of the other patches.
Comment 4 Vincent Penquerc'h 2016-03-14 17:20:14 UTC
I got an assert with the test case from the linked bug, on current master, with that patch on. This is rather rare. I've seen asserts before in gst_poll_something, but it's not happened again now that I have fatal_warnings on, and they're gone from my backlog.


Thread 2 (Thread 0x7f9e91d11700 (LWP 17004))

  • #0 __lll_lock_wait
    at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S line 132
  • #1 _L_lock_1006
    from /lib/x86_64-linux-gnu/libpthread.so.0
  • #2 __pthread_mutex_lock
    at pthread_mutex_lock.c line 101
  • #3 g_mutex_lock
    at gthread-posix.c line 209
  • #4 gst_pad_is_linked
    at gstpad.c line 2144
  • #5 gst_ghost_pad_new_from_template
    at gstghostpad.c line 740
  • #6 new_decoded_pad_added_cb
    at gsturidecodebin.c line 1166
  • #7 g_cclosure_marshal_VOID__OBJECTv
    at gmarshal.c line 1312
  • #8 _g_closure_invoke_va
    at gclosure.c line 831
  • #9 g_signal_emit_valist
    at gsignal.c line 3215
  • #10 g_signal_emit
    at gsignal.c line 3363
  • #11 gst_element_add_pad
    at gstelement.c line 704
  • #12 gst_decode_bin_expose
    at gstdecodebin2.c line 4652
  • #13 source_pad_blocked_cb
    at gstdecodebin2.c line 4848
  • #14 probe_hook_marshal
    at gstpad.c line 3420
  • #15 g_hook_list_marshal
    at ghook.c line 672
  • #16 do_probe_callbacks
    at gstpad.c line 3572
  • #17 gst_pad_push_event_unchecked
    at gstpad.c line 5179
  • #18 push_sticky
    at gstpad.c line 3757
  • #19 events_foreach
    at gstpad.c line 598
  • #20 check_sticky
    at gstpad.c line 3814
  • #21 gst_pad_push_event
    at gstpad.c line 5343
  • #22 gst_pad_set_caps
    at /home/v/include/gstreamer-1.0/gst/gstcompat.h line 58
  • #23 gst_video_decoder_negotiate_default
    at gstvideodecoder.c line 3835
  • #24 gst_video_decoder_negotiate
    at gstvideodecoder.c line 3889
  • #25 gst_ffmpegviddec_negotiate
    at gstavviddec.c line 1095
  • #26 gst_ffmpegviddec_video_frame
    at gstavviddec.c line 1368
  • #27 gst_ffmpegviddec_frame
    at gstavviddec.c line 1513
  • #28 gst_ffmpegviddec_handle_frame
    at gstavviddec.c line 1626
  • #29 gst_video_decoder_decode_frame
    at gstvideodecoder.c line 3417
  • #30 gst_video_decoder_chain_forward
    at gstvideodecoder.c line 2201
  • #31 gst_video_decoder_chain
    at gstvideodecoder.c line 2503
  • #32 gst_pad_chain_data_unchecked
    at gstpad.c line 4155
  • #33 gst_pad_push_data
    at gstpad.c line 4407
  • #34 gst_pad_push
    at gstpad.c line 4526
  • #35 gst_base_transform_chain
    at gstbasetransform.c line 2369
  • #36 gst_pad_chain_data_unchecked
    at gstpad.c line 4155
  • #37 gst_pad_push_data
    at gstpad.c line 4407
  • #38 gst_pad_push
    at gstpad.c line 4526
  • #39 gst_base_parse_push_frame
    at gstbaseparse.c line 2502
  • #40 gst_base_parse_chain
    at gstbaseparse.c line 3113
  • #41 gst_pad_chain_data_unchecked
    at gstpad.c line 4155
  • #42 gst_pad_push_data
    at gstpad.c line 4407
  • #43 gst_pad_push
    at gstpad.c line 4526
  • #44 gst_single_queue_push_one
    at gstmultiqueue.c line 1394
  • #45 gst_multi_queue_loop
    at gstmultiqueue.c line 1677
  • #46 gst_task_func
    at gsttask.c line 332
  • #47 g_thread_pool_thread_proxy
    at gthreadpool.c line 307
  • #48 g_thread_proxy
    at gthread.c line 764
  • #49 start_thread
    at pthread_create.c line 308
  • #50 clone
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S line 112
  • #51 ??