[mythtv-users] Backend hang after ivtv error

Petersen Curt petersen.curt at gmail.com
Tue Jul 26 20:44:10 EDT 2005

For users & devs:
I'm using two cards in my system: A hauppauge PVR-500 and a hauppauge
bt878-based card.
Has anyone had any problems with:

1) ivtv giving a DMA error in the log, and then
2) mythbackend fails to record using that tuner until restarted, and
3) frontends/web stop responding and repeatedly logs "waiting for
thread" forever.
Everything works 90% of the time.  This error just comes up
occasionally - more often when I'm recording 2-3 shows at once.

Anyone have any suggestions to improve stability?  What encoder
firmware are people having luck with out there?  I'm using 0x02040011
and ivtv-0.3.7a.

For the devs:
I've tracked it down to a pthread_join() statement in tv_rec.cpp.  It
appears that when the scheduler things the recording has finished, the
backend gets stuck waiting forever for the "encoder" thread to
complete, which is started with pthread_create() in the "SpawnEncoder"
function (or something like that....near the top of the same file).

So I know it's an ivtv error and trust me, I'm working on trying to
fix that as fast as I can.  But for now, would it be possible for
mythbackend to recover from it?  Perhaps replace the pthread_join()
with a non-blocking call and timeout after waiting a few seconds?  Or
perhaps the encoder thread can exit prematurely if it doesn't get a
buffer from the ivtv module for awhile?

Also, I just checked out the source from the subversion "fixes" branch
last night and installed it today.  Should I expect any better
behavior from that?  Or should I just roll with the 0.18.1 release? 
I'm not using DVB.....just a PVR-500 and bt878 card.

More information about the mythtv-users mailing list