[mythtv-users] recordings dying w/ IOBOUND & ivtv 'needed 1 bufs for stream 0' messages

Justin Walther justin.walther at gmail.com
Fri Jul 29 14:03:35 EDT 2005


Have you solved this problem yet?  I recently removed my drives from
the LVM setup and am recording on a single drive formatted with XFS. 
I also deleted all my recordings to make sure that it wasn't an issue
with fragmentation and I'm STILL getting recordings ending early
nonstop.  Here are just a few of the 84 entries since July25.  Yes,
this has happened 84 times in the past 4 days.

Jul 26 18:31:35 mythbox kernel: ivtv: needed 1 bufs for stream 0,
received 0 differ by (1) bufs
Jul 26 18:31:35 mythbox kernel: ivtv: needed 1 bufs for stream 0,
received 0 differ by (1) bufs
Jul 26 19:00:04 mythbox kernel: ivtv: needed 1 bufs for stream 0,
received 0 differ by (1) bufs
Jul 26 19:30:10 mythbox kernel: ivtv: needed 1 bufs for stream 0,
received 0 differ by (1) bufs
Jul 26 22:00:39 mythbox kernel: ivtv: needed 1 bufs for stream 0,
received 0 differ by (1) bufs
Jul 26 23:30:10 mythbox kernel: ivtv: needed 1 bufs for stream 0,
received 0 differ by (1) bufs

Clearly since I removed all recordings it didn't even need to
autoexpire any, though I have found in the past that recording 2 shows
and autoexpiring a show will cause this condition.

Please...there has to be an answer.  Perhaps Myth can be fixed so the
backend merely misses a frame or 2 instead of just dying completely
when it runs into this condition?

Thanks for any help,
Justin

On 1/17/05, mythtv-users.mythtv.org at tgice.com
<mythtv-users.mythtv.org at tgice.com> wrote:
> I'm having a problem with my backend sporadically (at least a few times
> a week) dying in the middle of recordings, and refusing to record
> anymore until the backend is restarted.
> 
> The symptoms are very similar to those reported in this thread:
> 
>    http://www.gossamer-threads.com/lists/mythtv/users/91978
> 
> In my mythbackend.log, I'll see something like this:
> 
>    2005-01-16 19:00:02 Started recording "The Simpsons" on channel: 1006
> on cardid:   1, sourceid 1
>    2005-01-16 19:00:02 Started recording "Law & Order" on channel: 1033
> on cardid:   2, sourceid 1
>    2005-01-16 19:00:03 Changing from None to RecordingOnly
>    2005-01-16 19:00:03 Changing from None to RecordingOnly
>    2005-01-16 19:00:04 Found changes in the todo list.
>    2005-01-16 19:00:12 Scheduled 611 items in 8.42573 seconds.
>    2005-01-16 19:02:28 MainServer::HandleAnnounce Playback
>    2005-01-16 19:02:28 adding: themyth as a client (events: 0)
>    2005-01-16 19:02:57 MainServer::HandleAnnounce Playback
>    2005-01-16 19:02:57 adding: themyth as a client (events: 0)
>    2005-01-16 19:02:57 MainServer::HandleAnnounce FileTransfer
>    2005-01-16 19:02:57 adding: themyth as a remote file transfer
>    2005-01-16 19:02:58 MainServer::HandleAnnounce FileTransfer
> 
> and then a few of these:
> 
>    2005-01-16 19:03:23 IOBOUND - blocking in ThreadedFileWriter::Write()
> 
> and in my syslog, at the same time (here around 19:03:23), I'll see
> something like this:
> 
>    Jan 16 19:00:04 themyth saa7115: decoder enable output
>    Jan 16 19:03:27 themyth ivtv: needed 1 bufs for stream 0, received 0
> differ by (1) bufs
>    Jan 16 19:03:27 themyth ivtv: SCHED: free_q: 0 elements
>    Jan 16 19:03:27 themyth ivtv: SCHED: dma_q: 0 elements
>    Jan 16 19:03:27 themyth ivtv: SCHED: full_q: 128 elements
>    Jan 16 19:03:34 themyth ivtv: needed 1 bufs for stream 0, received 0
> differ by (1) bufs
>    Jan 16 19:03:34 themyth ivtv: SCHED: free_q: 0 elements
>    Jan 16 19:03:34 themyth ivtv: SCHED: dma_q: 0 elements
>    Jan 16 19:03:34 themyth ivtv: SCHED: full_q: 128 elements
> 
> And at this point, when I check the recording, it just ends.  From what
> I can tell (I'm just guessing), it appears that mythbackend (or ivtv, or
> w/e) can't write to the harddrive, so it just chokes.
> 
> For further information, I only started having this problem after adding
> a second PVR-250 (the original one was a PVR 250 part# 32031 and the new
> one is a PVR 250 part# 32552 (a 975, w/ the FM radio), and bumping
> (slightly) my ivtv versions, b/c I had to to get the new 32552 to work
> right.  It uses one of those LG TAPE tuners or w/e, and what I ended up
> doing to on my Gentoo 2.6.5 system is taking the ivtv-0.1.10-pre2-ck100z
> driver that'd I'd been using previously w/ the single card w/ no
> problems, and importing just the updated tuner information from
> ivtv-0.1.10-pre2-ck115i.  I also (of course) tried just using the
> straight ck115i, but had some sort of major stability issue or couldn't
> compile it or something, so I bailed.  (Also, as part of this I had to
> update at least one tuner.h (or something) file in the kernel so it'd
> recognize the LG TAPE tuner).
> 
> Already, I realize I'm going to be apologizing for the length of this
> post, but I just want to be sure to include all the details that might
> help the community track down this problem that at least some of us are
> having.  I guess it either has something to do with my ivtv driver
> (admittedly, *slightly* hacked together) or something particular to my
> system, possibly hardware based.
> 
> I'm running a Chaintech 7NIF2 motherboard w/ an Athlon XP 2400, 512 MB
> of PC2700,  and the two previously-mentioned PVR 250s (32031 & 32552),
> also I have two WD 7200rpm drives, one a 60GB w/ the system on it & some
> of the videos on an LVM ReiserFS system spanning to the WD 160GB drive,
> which is newish -- installed sometime last fall before the second PVR
> 250 tuner.
> 
> I'll mention one more thing, just for completeness.  I have the two WDs
> mounted right on top of each other in this rather cramped space in my
> smallish case that's designated for 3.5 inch drives.  I didn't start
> using SMARTD tools on them until I'd gotten the second one in there, and
> when I did, I noticed Celsius temperature reports from both in the ~100
> degree range.  I know that they're rated for only up to ~55 degrees
> Celsius, so when I first saw this it freaked me out.  But I think the
> temperature sensors must be a little funky or I'm reading the SMARTD
> output wrong, b/c when I pop the case and have my hand on them, they are
> not terribly hot (I can keep my hand there).  And if I put this digital
> room thermometer right on top of the drives while they're running, it
> only registers about 80 degrees F, well below the ~212 degrees F that
> 100 degrees Celsius is (damnable English system! why do only those
> degrees really have a feel for me!?!?)
> 
> So my random guess based on this was maybe the drives really are too
> hot, and when I'm recording two shows simultaneously (I *don't* think
> this problem only happens on dual recording, but I'm not sure), there's
> too much bandwidth requirement and the drives can't take it.
> 
> Anyway, again, I apologize for the extreme verbosity of the post, but I
> like to get all the details out there right away.  Does anyone else feel
> my pain or have ideas to try?
> 
> Thanks guys, mythtv rocks -- esp. when I've got it all stable and what not.
> 
> jl
> 
> p.s.  In that thread I ref'd way at the beginning, one of the guys had a
> smart idea that I've implemented (but haven't tested yet, since it
> hasn't happened since then) using the 'swatch' package to monitor the
> syslog for those ivtv messages that indicate a problem and just restart
> the backend whenever those come up.  I modified mine slightly to work
> with gentoo, so here's what I did:
> 
> first:
>    time nice emerge swatch
> 
> then create: /etc/swatch.conf:
> 
>    watchfor /ivtv: SCHED/
>    echo
>    exec "/etc/init.d/mythbackend stop && /etc/init.d/mythbackend zap &&
> sleep 2 && /etc/init.d/mythbackend start"
> 
> (he just had a mythbackend restart, I think I've noticed problems with
> that before)
> 
> and then add this to either your /etc/rc.local (everything but Gentoo, I
> guess) or your /etc/conf.d/local.start (for Gentoo):
> 
>   swatch --config-file=/etc/swatch.conf --tail-file=/var/log/messages >>
> /var/log/swatch.log 2>&1 &
> 
> (for those not well-versed in this output redirection stuff, I *believe*
> what I've got here redirects stdout & errout to that swatch.log file, if
> you want to recreate everytime the machine starts, just change that '>>'
> to '>' or use the: '&> /var/log/swatch.log &' notation).
> 
> Thanks, I'm done, seriously.
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


More information about the mythtv-users mailing list