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 757335 - adaptivedemux: release manifest lock before changing internal pipeline state
adaptivedemux: release manifest lock before changing internal pipeline state
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-10-29 23:22 UTC by Florin Apostol
Modified: 2015-10-30 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.50 KB, patch)
2015-10-29 23:24 UTC, Florin Apostol
committed Details | Review

Description Florin Apostol 2015-10-29 23:22:50 UTC
When changing the adaptivedemux state, gst_adaptive_demux_change_state will try to change the state for all elements on its internal pipeline. One of those is the src element. The src element has a streaming thread which might take the manifest lock (in _src_chain function).

Changing the src state might try to take a lock that the streaming thread is holding. In this case the system deadlocks:
- gst_adaptive_demux_change_state holds the manifest and tries to get a lock in src element to change its state
- src element holds its lock and tries to get the manifest lock

In order to avoid the deadlock, the gst_adaptive_demux_change_state function should not hold the manifest lock while changing the state of its pipeline.
Comment 1 Florin Apostol 2015-10-29 23:24:03 UTC
Created attachment 314430 [details] [review]
proposed patch
Comment 2 Florin Apostol 2015-10-30 11:13:18 UTC
Vincent, can you review and merge this?
Comment 3 Vincent Penquerc'h 2015-10-30 11:44:54 UTC
commit ac58216f0542ebc5160ada5ebd55f5d845618891
Author: Florin Apostol <florin.apostol@oregan.net>
Date:   Thu Oct 29 23:23:05 2015 +0000

    adaptivedemux: release manifest lock before changing element state
    
    https://bugzilla.gnome.org/show_bug.cgi?id=757335