Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#1275 closed patch (fixed)

Close and reopen PVR card on select() timeout

Reported by: derek@… Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

Pasting thread from dev mailing list:

Quoting Derek Battams <derek@battams.ca>:
> Quoting George Nassas <gnassas@mac.com>:
>
>> On 9-Feb-06, at 4:47 PM, Derek Battams wrote:
>>
[snip]
[Hide Quoted Text]
>>> For me, recordings start, but in the middle of the recording it stops
>>> and
>>> then my log fills with the 'select timeout' error until the scheduled
>>> end of the recording.
>>>
>>> Whatever was recorded up until the error is saved and I can watch the
>>> partial recording.  The error is produced by the select() call on line
>>> 475 of libs/libmythtv/mpegrecorder.cpp returning 0, which signals a
>>> timeout.
[snip]
>
> Unfortunately, all my profiles were already set to PS and I still
> haven't had a reoccurence since I added my attempted fix.  Of course, I
> can also say I haven't had a reoccurence since I upgraded to SVN 8906
> so perhaps that's the reason (fingers crossed)?  I'll continue to
> monitor this.

Ok, this finally happened again today while watching live tv.  And my
fix worked.  On the select timeout, the device was closed, reopened,
and recording continued.  I only lost about 1-2 seconds of the
recording, but then it continued with no problems until the end of the
program.  I'd like some feedback on this before I go opening a ticket
for this.  I think the more interesting issue is why this timeout
occurs during a recording in the first place.  I wasn't able to find an
explanation for this so this patch is the next best thing I could come
up with and, most importantly, it works by allowing an in-progress
recording to continue instead of just dumping the printf over and over
until the program ends.

Isaac's response to my patch:

Patch looks fine.  Don't really need the long comment, though. =)

Basically, when this happens, the ivtv driver has stopped giving us data. 
Nothing much we _can_ do aside from close + reopen the device like you're
making it.

Attachments (1)

pvr_reinit.patch (585 bytes) - added by derek@… 18 years ago.
Reinit PVR card when select() call times out

Download all attachments as: .zip

Change History (3)

Changed 18 years ago by derek@…

Attachment: pvr_reinit.patch added

Reinit PVR card when select() call times out

comment:1 Changed 18 years ago by cpinkham

Resolution: fixed
Status: newclosed

(In [9192]) Close and reopen the video device when the select() times out because the ivtv driver quit responding. Closes #1275 by applying patch from Derek Battams.

comment:2 Changed 18 years ago by cpinkham

(In [9193]) Close and reopen the video device when the select() times out because the ivtv driver quit responding. References #1275 and [9192].

Note: See TracTickets for help on using tickets.