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 767169 - adaptivedemux: avoid possible deadlock while destroying old sources
adaptivedemux: avoid possible deadlock while destroying old sources
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.9.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-06-02 15:56 UTC by Michael Olbrich
Modified: 2016-07-17 18:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.25 KB, patch)
2016-06-02 15:56 UTC, Michael Olbrich
reviewed Details | Review

Description Michael Olbrich 2016-06-02 15:56:11 UTC
Created attachment 328977 [details] [review]
patch

gst_element_set_state() will lock the stream lock for the source pad of the
element. If the element pushes data at the same time, it may wait for the
manifest lock while holding the stream lock. So calling
gst_element_set_state() while the manifest lock is locked can cause
deadlocks.
Comment 1 Tim-Philipp Müller 2016-07-17 18:42:20 UTC
Thanks for the patch. I believe this was also fixed as part of:

commit 62ca319927c15c984fb587e357cfbbf994eca717
Author: Jan Schmidt <jan@centricular.com>
Date:   Wed Jul 13 23:02:10 2016 +1000

    adaptivedemux: Drop the manifest lock during outbound actions
    
    Drop the manifest lock when performing actions that might
    call back into adaptivedemux and trigger deadlocks, such
    as adding/removing pads or sending in-band events (EOS).
    
    Unlock the manifest lock when changing the child bin state to
    NULL, as it might call back to acquire the manifest lock when
    shutting down pads.
    
    Drop the manifest lock while pushing events.