[mythtv-commits] Ticket #13488: IPTV fix for deadlock, handle redirects
MythTV
noreply at mythtv.org
Mon Oct 7 09:07:02 UTC 2019
#13488: IPTV fix for deadlock, handle redirects
-------------------------------------+-----------------------------
Reporter: ijc | Owner: paul-h
Type: Patch - Bug Fix | Status: accepted
Priority: minor | Milestone: 31.0
Component: MythTV - HTTP Streaming | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-------------------------------------+-----------------------------
Comment (by Ian Campbell <ijc@…>):
In [changeset:"783e0dfd6971d8f10165bf810f4c9dd4e9819da5/mythtv"
783e0dfd6/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="783e0dfd6971d8f10165bf810f4c9dd4e9819da5"
HLSReader: fix deadlock in HLSReader cancellation.
The thread running HLSReader::Cancel calls HLSPlaylistWorker::Cancel with
the
stream lock held, which blocks waiting for the thread to exit.
The HLSPlaylistWorker::run thread however can be at the point between the
m_cancel check and the call to HLSReader::PlaylistRetrying. Since
PlaylistRetrying also takes the stream lock we are therefore deadlocked.
To address this introduce a separate worker lock covering the
m_playlistworker
and m_streamworker fields. This means that HLSReader::Cancel only needs to
take
this new lock and therefore cannot deadlock against the use of the stream
lock
in HLSReader::PlaylistRetrying.
When they need to be held together the new lock is consistently nested
within
the old. Refs #13488
Signed-off-by: Paul Harrison <pharrison at mythtv.org>
(cherry picked from commit 946efc5c303fd651276437294c6afaa10bb95e72)
}}}
--
Ticket URL: <https://code.mythtv.org/trac/ticket/13488#comment:7>
MythTV <http://www.mythtv.org>
MythTV Media Center
More information about the mythtv-commits
mailing list