[mythtv] [PATCH] Fix for DVB freezes

Leandro Dardini ldardini at tiscali.it
Mon Mar 29 16:32:48 EST 2004


Maybe you can give a look to another big problem with dvb(s), encrypted
channel. If I tune an encrypted channel, all the system freezes until it
exits to tv menu after circa 30 seconds while I can't tune another channel.

Leandro

----- Original Message ----- 
From: "Dan Sheridan" <djs52 at postman.org.uk>
To: <mythtv-dev at mythtv.org>
Sent: Monday, March 29, 2004 3:40 PM
Subject: [mythtv] [PATCH] Fix for DVB freezes


> It's taken me about three weeks of debugging, but here, at last, is a
> fix for the freezes that have been plaguing me in MythTV. The problem is
> as follows: the quality monitoring thread wakes up every so often and
> checks the quality data from the card which it then commits to the
> database. When the a recoding finishes, the thread is *cancelled*, which
> may happen at any time; with a slow enough database or a fast enough
> poll rate for the quality data, there is a good chance that the thread
> is cancelled while it holds the database lock. This results in a
> deadlock: the state change from RecordingOnly to None cannot complete,
> holding up everything else.
>
> The problem with debugging comes from a bizarre gcc policy where if a
> call to the stdlib (eg cerr << "debugging info"...) is running when a
> thread is cancelled, the whole program terminates with a "FATAL:
> exception not rethrown" error, which is not documented anywhere! The
> patch below therefore replaces the pthread_cancel with a semaphore in
> the style of the rest of the code; the catch is that if the monitoring
> interval for the quality thread is too large it may take a while to
> exit. (In fact, if the card is reopened before the thread has stopped
> the semaphore will be reset and two instances of the thread will
> continue to run. Any suggestions?)
>
> Dan.
>
>
>
> -- 
> Dan Sheridan -- Research Student -- LFCS, Division of Informatics
> University of Edinburgh, King's Buildings, Mayfield Road EH9 3JZ
>


----------------------------------------------------------------------------
----


_______________________________________________
mythtv-dev mailing list
mythtv-dev at mythtv.org
http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list