[mythtv] Possible bug fix for backend freeze.

Isaac Richards ijr at po.cwru.edu
Fri Jan 2 14:49:37 EST 2004


On Friday 02 January 2004 02:06 pm, Mark Frey wrote:
> Some people were experiencing a freeze on the backend while watching live
> tv. I found a bug which could cause a freeze:
>
> RingBuffer::Read() method locks the rwlock mutex and then waits on the
> availWaitMutex if the read would pass the end of the live tv file. The
> problem is that, in the backend live tv case (the rbuffer owned by tv_rec),
> the availWaitMutex is only released by the RingBuffer::Write() method which
> also wants to lock the rwlock mutex, so both Read() and Write() hang until
> the availWaitMutex.wait call times out (15 secs), by which time things have
> failed badly.
<snip>
> Lastly, could someone do a sanity check and tell me if there's something
> I'm missing, is there some other way for that availWaitMutex to get
> released in the backend case?

Have you never heard of a read/write lock before?

Isaac


More information about the mythtv-dev mailing list