[pvrusb2] pvrusb2 timeout?

Mike Isely isely at isely.net
Thu Aug 21 09:14:19 CDT 2008


On Wed, 20 Aug 2008, Dan Bodoh wrote:

> Any ideas?  This timeout has occurred occasionally, but now twice in
> the last couple of days.  I'm running Ubuntu 8.04 with stock drivers
> (2.6.24-19).
> 

There was a discussion on this list a while back about timeouts 
happening in MythTV.  I had first thought that this was a case of the 
backend not waiting long enough for the stream to start - there can be 
up to 2-3 seconds of latency with this hardware before video starts 
streaming, and xawtv frequently had this issue.  However from the 
discussions then it sounded more like the timeout was actually a jam-up; 
it simply got stuck and never recovered.  Unfortunately I've never seen 
the problem happen and nobody else has seen it either, so nothing ever 
developed from this.  But what you are saying here sounds like the same 
issue.


> The mythtv log shows an attempt to record a program at  20:00
> -------------------
> 2008-08-20 19:59:24.809 TVRec(3): ASK_RECORDING 3 29 0 0
> 2008-08-20 19:59:56.821 TVRec(3): Changing from None to RecordingOnly
> 2008-08-20 19:59:56.829 TVRec(3): HW Tuner: 3->3
> 2008-08-20 19:59:57.044
> 
> Not ivtv driver??

The pvrusb2 driver "looks" like the ivtv driver to MythTV, so I'm not 
surprised if the error messages refer to ivtv.


> 
> 
> 2008-08-20 19:59:57.078 AutoExpire: CalcParams(): Max required Free
> Space: 2.0 GB w/freq: 15 min
> 2008-08-20 19:59:57.085 Started recording: Supernanny "McKeever
> Family": channel 1003 on cardid 3, sourceid 1
> 2008-08-20 20:00:02.131 MPEGRec(/dev/pvrusb2) Error: select timeout -
> ivtv driver has stopped responding
> 2008-08-20 20:00:07.162 MPEGRec(/dev/pvrusb2) Error: select timeout -
> ivtv driver has stopped responding
> 
> (and this repeats for another 41 minutes during which I don't get any
> recording, and then magically)
> 2008-08-20 20:41:05.498 MPEGRec(/dev/pvrusb2) Error: select timeout -
> ivtv driver has stopped responding
> 
> (and this is the last error; I get the last 19 minutes recorded)

I don't have a solution for you.  (If I did, it would already be in the 
driver.)  But I can suggest a few things.  Moving up to the latest 
standalone driver would be a good first step; at least that way we can 
prove that the problem (whatever it is) is not solved by the latest 
driver.  Another thing we can do is turn on various types of debug 
output in an attempt to see what the driver thinks is going on.

Another thing to consider:  Has anything recently changed in your 
hardware / software?  Did this problem just suddenly start happening, or 
was it following some other change?  This is not to "blame" the change, 
but if we can figure out what changed then we have another means to find 
the root cause.

Unfortunately if this is going to take several days to reproduce, we may 
be in for a tedious bug chase :-(



> ----------
> In the kernel logs - nothing at 20:00, but first message after 20:00
> is at 20:41:
> 
> Aug 20 20:41:05 mythbox kernel: [888366.618809] pvrusb2: Encoder timed
> out waiting for us; arranging to retry
> Aug 20 20:41:05 mythbox kernel: [888366.618820] pvrusb2: Encoder command: 0x82
> Aug 20 20:41:05 mythbox kernel: [888366.619087] pvrusb2: Error
> recovery initiated
> Aug 20 20:41:05 mythbox kernel: [888366.619091] pvrusb2: Retrying
> device reconfiguration

Unfortunately that message is "normal".  Every once in a while the 
encoder chip will wedge itself when we try to stream with it.  This 
behavior has been observed for YEARS, and I've never been able to find 
out the trigger.  However the driver detects this and recovers by 
reloading and reconfiguring the encoder.  The whole recovery happens in 
a second or two.  This timeout only ever happens at all at the moment 
streaming is started.  Once it is going, I've never seen the encoder 
crash.  The upshot of all this is that while it's an interesting clue 
that this happened at the point when you got the backend timeout, this 
might not be the "smoking gun".

  -Mike


-- 

Mike Isely
isely @ pobox (dot) com
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8


More information about the pvrusb2 mailing list