[mythtv] Frontend locking/freezing on FF with SD/HD content

Matt Holgate matt-bulk-mythtv at holgate.org.uk
Sun Oct 15 19:43:17 UTC 2006


Tomi Orava wrote:
> Hi,
> 
>>> I've got MythTV 0.20 setup on Gentoo. Occasionally the front end will
>>> lockup while fast forwarding, generally this occurs when skipping "in to
>>> the future", that is ff'ing into and past the end of the recorded
>>> program.
>> You should have a look at my patch in ticket 2434:
>>
>> http://svn.mythtv.org/trac/ticket/2434
>>
>> I don't know if it will help, but it certainly fixes hangs in 'watch
>> recordings' while FF/REWding. I think that the LiveTV issue may be a
>> different one (I've seen hangs even with this patch applied), but it's
>> certainly worth giving it a go.
> 
> I personally don't think that your patch is a proper one, due to the fact
> that the code in question is a slight mess what comes to locking.

I agree - and I hinted that my patch was only a workaround and that a 
proper fix might involve adding/rationalising the synchronisation in the 
pause code (see Comment #3 in the bug, and also my post to myth-dev).

> To my understanding there exists a race condition in NuppelVideoPlayer.cpp,
> where the method PauseVideo() is being called, but while the call is still
> being
> done, you press "Play" again and therefore another thread calls
> UnPauseVideo()
> _before_ the PauseVideo() has hit the line containing a call to
> videoThreadPaused.wait(1000) ---> the whole frontend hangs.

Yeah, this is exactly what what I found - see comment #1 in the ticket.

I agree that a proper locking solution is needed, but I was waiting for 
feedback before proceeding down that route, and at least my patch got 
things working in the short term.

I'll have a look at seeing if I can do it properly, but my knowledge of 
the code is fairly limited so I don't know how far I'll get.

cheers,
Matt.


More information about the mythtv-dev mailing list