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 690148 - hlsdemux: hangs when network disconnects or when server is unreachable
hlsdemux: hangs when network disconnects or when server is unreachable
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.0.3
Other Linux
: Normal critical
: 1.2.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-12-13 10:21 UTC by shr
Modified: 2013-10-03 13:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gstreamer log (12.51 KB, text/plain)
2012-12-13 10:22 UTC, shr
Details

Description shr 2012-12-13 10:21:31 UTC
hi,
i am playing a stream from a local HLS server, setup on MAC machine 
this is the launch string

GST_DEBUG=3,uridownloader:5,hlsdemux:5 gst-launch-1.0 playbin uri=http://191.161.91.31/new/prog_index.m3u8 2>debug2

when i disconnect the network or stop the web sharing on MAC.
hlsdemux hangs in doing this
gst_element_set_state (downloader->priv->urisrc, GST_STATE_NULL);
gsturidownloader.c line 261

i have attached the log for 1.0

observed same thing on 0.10 and on debugging on 0.10 I observed that gstbasesrc.c hangs in gst_base_src_set_flushing() while locking this mutex 
 GST_LIVE_LOCK (basesrc);

this mutex is already locked in gst_base_src_loop()
Comment 1 shr 2012-12-13 10:22:58 UTC
Created attachment 231461 [details]
gstreamer log
Comment 2 shr 2012-12-24 06:58:47 UTC
i think the issue is here in this function 
gst_hls_demux_get_next_fragment

on getting error downloading the segment

error:
we are doing gst_hls_demux_stop in which we are trying to lock updates_timed_lock which is already locked by the same thread.
Comment 3 Thiago Sousa Santos 2013-10-03 12:23:17 UTC
Thanks for reporting, your findings were right, this patch fixes it on git master.

commit 72e05dfd7c82ce45e5141c5506e203d05fb2daf9
Author: Thiago Santos <ts.santos@partner.samsung.com>
Date:   Thu Oct 3 07:56:21 2013 -0300

    hlsdemux: Do not call _stop holding the updates lock
    
    It will cause a deadlock and the calers for _get_next_fragment
    will already call _stop if required when _get_next_fragment fails.
    
    Fixes #690148