[mythtv-commits] Ticket #9780: Network Remote Control Interface breaks DVD playback
MythTV
noreply at mythtv.org
Wed May 18 15:42:12 UTC 2011
#9780: Network Remote Control Interface breaks DVD playback
----------------------------------------+--------------------------------
Reporter: dave@… | Owner: markk
Type: Bug Report - Hang/Deadlock | Status: infoneeded_new
Priority: major | Milestone: unknown
Component: MythTV - DVD Playback | Version: 0.24-fixes
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
----------------------------------------+--------------------------------
Comment (by Github):
DVDRingBuffer: Unlock the ring buffer when waiting on state changes.
The DVD ringbuffer does not use the read ahead thread and hence holding
the writelock during safe_read is not strictly necessary (see
RingBuffer::ReadPriv). DVDRingBuffer::safe_read can also hold that lock
for tens of seconds when, for example, displaying a still frame (the dvd
device simply returns specific events, but not data, until it is told to
skip the still frame).
Under normal operation this is not a problem but events received from
external sources (such as network control) can trigger code that tries
to lock the ringbuffer from the main UI thread (e.g.
RingBuffer::GetFilename). The lock is not obtained, event processing in
the main thread is blocked and the wait state in the ringbuffer thread
is not cleared - and the frontend deadlocks as a result.
The solution is to release the lock while sleeping within
DVDRingBuffer::safe_read to allow other threads to obtain the lock
temporarily. I've also added a warning message should the read ahead
thread be running in the DVD ringbuffer.
Refs #9780
Branch: master
Changeset: fd5e33a69b630aa9c0b94a8c2dd7693f02726316
--
Ticket URL: <http://code.mythtv.org/trac/ticket/9780#comment:5>
MythTV <http://code.mythtv.org/trac>
MythTV Media Center
More information about the mythtv-commits
mailing list