[mythtv] Re:[PATCH] Fix for DVB freezes

Martin Smith martin at spamcop.net
Tue Mar 30 15:07:20 EST 2004


Dan Sheridan wrote:

> 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;

Hmmmm. I wrote that code and I thought I had this covered. The behaviour you
describe isn't what the pthreads docs say. The man page says the default cancel
state for a thread is PTHREAD_CANCEL_DEFERRED and that a cancel is held pending
until a cancellation point.

Looking at it again the pthreads docs I worked from only listed certain pthreads
functions as creating cancel points. The Linux docs also lists sigwait and
sem_wait so it's possible that the database client library was inadvertently
creating a cancellation point.

Ah well. Sorry it caused you all that trouble.

Martin


More information about the mythtv-dev mailing list