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 760929 - adaptivedemux: deadlock issue
adaptivedemux: deadlock issue
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.6.2
Other Linux
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-21 10:35 UTC by Maroš Ondrášek
Modified: 2016-05-22 18:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GST_DEBUG=*adaptive*:6, deadlock (21.56 KB, application/gzip)
2016-02-10 12:44 UTC, Maroš Ondrášek
Details

Description Maroš Ondrášek 2016-01-21 10:35:27 UTC
Sorry for not more specific summary, creating bug report as suggested on irc:

<mx3L> Hello, we have a deadlock when setting playbin from READY (with pending PLAYING) to NULL, gdb output - http://pastebin.com/CExwYyr3, Thread 1 in frame#25 we set playbin to NULL, 8,9,10 threads not relevant.
<wtay> mx3L, a problem in adaptivedemux, please make a bug for this
Comment 1 Tim-Philipp Müller 2016-01-21 10:45:38 UTC
Any chance you could try with git master, the locking in adaptive demux was refactored quite a bit if I remember correctly.
Comment 2 Tim-Philipp Müller 2016-01-21 10:46:01 UTC
(Not that there might not be an obvious fix for this particular deadlock, I didn't check.)
Comment 3 Maroš Ondrášek 2016-01-22 09:09:09 UTC
In git master I cannot reproduce the deadlock. So it looks to be resolved.
Comment 4 Tim-Philipp Müller 2016-01-22 12:28:03 UTC
Thanks for testing.

If you can easily reproduce it with 1.6.x, it would be great if you could also make a GST_DEBUG=*adaptive*:6 debug log and attach it to this bug (compressed with xz -9 or gzip or so), maybe there's an easy fix.
Comment 5 Maroš Ondrášek 2016-02-10 12:44:59 UTC
Created attachment 320793 [details]
GST_DEBUG=*adaptive*:6, deadlock

log created in 1.6.3 version, ends with deadlock, when setting playbin to NULL.
Comment 6 Tim-Philipp Müller 2016-05-22 18:59:32 UTC
Thanks, I think this commit which landed in 1.6.4 should fix the most frequent occurances of this issue in 1.6:

commit b14464947ff200406786107ec5d130baa898b3aa
Author: Tim-Philipp Müller <tim@centricular.com>
Date:   Tue Feb 16 19:43:48 2016 +0000

    adaptivedemux: fix race on shutdown that could result in deadlocks
    
    Minimal fix for one particular deadlock, adaptivedemux has seen
    a general re-work of its locking in git master, but that would
    be too intrusive to backport into the stable branch.
    
    We need to use a separate variable to signal cancellation here.


Closing as obsolete since you confirmed it works in master. Thanks for testing!