# Tivo acting strange - gettin' old?



## helpdeskdan (Jun 28, 2004)

My ol' upgraded 14 hour (dang, can't even remember the model number now) has suddenly started acting wierd.

I noticed a problem with mfs_ftp - it would download well, then stall. It would pick up for a second, then stall again - never finish. Very odd - no interface errors. Kill the process, and it would still do it again.

Finally gave up on mfs_ftp, and tried downloading it through vserver/vstream-client. Very similar thing; stalls! It eventually did get the whole file. Then, it rebooted - must have crashed.

It never used to reboot before. For instance, when I kill the mfs_ftp process, it reboots. That's new; I've been trying to figure out the stalling problem for a month, but it never rebooted when killing the ps. And, as I said, it rebooted after downloading via vserver. Odd.

I haven't changed anything on my tivo in a long time, and it hasn't had a problem with processes crashing and rebooting the Tivo. Is my Tivo on it's way up? It has been running for 6 years....

Thanks,
-Dan


----------



## BTUx9 (Nov 13, 2003)

look in the logs for hard drive messages... could also be fragmenting badly (especially if you're recording suggestions)


----------



## helpdeskdan (Jun 28, 2004)

Thanks - where would these logs be?


----------



## BTUx9 (Nov 13, 2003)

/var/log


----------



## helpdeskdan (Jun 28, 2004)

Thanks, I'm looking at them now. How could it be fragmented? Is that not impossible in a Linux filesystem?


----------



## BTUx9 (Nov 13, 2003)

helpdeskdan said:


> Thanks, I'm looking at them now. How could it be fragmented? Is that not impossible in a Linux filesystem?


well... no, and no.
The shows aren't stored in a linux filesystem, but in tivo's proprietary fs
the filesystem DOES use a buddy system map, which helps out with fragmentation, and it uses VERY large cluster sizes compared to most other filesystems

For this reason, many people believe fragmentation shouldn't be a problem, but I disagree.

Unlike most filesystems, where a fair percentage of space is unallocated, once a tivo is up and running, there is almost NO unallocated space. The only time tivo actually deallocates the space that a recording is using is when it needs it for a new recording, and it always reaps the oldest one, paying no attention to whether the freed up space is contiguous with any existing free blocks (this is why shows can be undeleted)

this mechanism GUARANTEES fragmentation over time.

on my tivos (dual-tuner dtivos that record suggestions -- the WORST situation as far as fragmenting is concerned) I occasionally go through, delete a bunch of shows, and then run a script to release the space

Not sure just how much it helps, but it can't hurt


----------



## helpdeskdan (Jun 28, 2004)

Many thanks for your continued replies! I found nothing of any interest in my log files. Nevertheless, I would interested in trying your defrag script - where did you obtain it from?


----------



## BTUx9 (Nov 13, 2003)

helpdeskdan said:


> Many thanks for your continued replies! I found nothing of any interest in my log files. Nevertheless, I would interested in trying your defrag script - where did you obtain it from?


I wrote it myself

I'll attach a copy

I'll probably add this routine to TWP 1.4 at some point


----------



## helpdeskdan (Jun 28, 2004)

Thanks - neat script! I don't think that's my problem though. I've always used tivo suggestions, and this just started a couple of month ago. Maybe something got corrupt on the drive.


----------



## tivoupgrade (Sep 27, 2000)

helpdeskdan said:


> Maybe something got corrupt on the drive.


That is the most likely scenario -- but the real issue is what caused the corruption; I'd suggest you pull the drive when you have a chance and run manufacturer's diagnostics on it; that will help to narrow things down...


----------



## helpdeskdan (Jun 28, 2004)

Thank you both very much for helping me with this annoying problem!

I am baffled in that I would imagine drive corruption would effect more than just downloading. The Tivo's operation works fine, tivoweb seems to work fine, it is only downloading via msftp and vserver that seem to stall/crash. Wouldn't the shows also exhibit problems while watching on the tivo?


----------



## BTUx9 (Nov 13, 2003)

helpdeskdan said:


> Thank you both very much for helping me with this annoying problem!
> 
> I am baffled in that I would imagine drive corruption would effect more than just downloading. The Tivo's operation works fine, tivoweb seems to work fine, it is only downloading via msftp and vserver that seem to stall/crash. Wouldn't the shows also exhibit problems while watching on the tivo?


Hmm... well, if you truly haven't changed ANYTHING with your hacks recently, I suppose your network device or router could be the culprit... those are much lessly to go bad over time than a HD, but it does happen.


----------



## helpdeskdan (Jun 28, 2004)

I really do not believe my problem can be solved as nobody else is having any similar problems. The strange thing is that on some nights it seems to download just fine, as if there were no problems. On other nights, I get these strange problems! It will download for a 10 - 15 seconds, then stall for 45, then 10, then stall for 60, then 8 seconds, then another stall. The network graph is nothing but small, tall mountains separated by large valleys. There's no router in between my computer and the tivo, just a switch or two. It is so weird - why would it work some nights? There is no explanation. I need an exorcist or something. 

Thanks, 
-Dan


----------



## jporter12 (Mar 10, 2006)

Maybe a cabling issue? Have you tried swapping cables, and stuff like that? Do you have more than one computer you can try it on, and have you? It is possible that it's somewhere other than the TiVo, since everything else works ok. I can't get very specific since it seems you have a series 1, and I have never messed with one, just thinking about some general stuff.


----------



## helpdeskdan (Jun 28, 2004)

I appreciate people still trying to help me out with this weird problem. I will try to obtain a long crossover cable to test it. Also, the series 1 requires you to have a second cable running to the inside, so I'll also have to rule out that. I don't see any errors in ifconfig though. Granted, maybe the tivo doesn't log them.


----------



## helpdeskdan (Jun 28, 2004)

Now, HERE is where the plot gets thicker. I can PUT films on the tivo, just fine!! Some slight variation, but no hug valleys in the traffic map. 

And, looking at the ifconfig, I don't seen any errors:

eth0 Link encap:Ethernet HWaddr 00:0B:AD:15:75:F2 
inet addr:10.42.42.3 Bcast:10.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:650466 errors:0 dropped:0 overruns:0 frame:0
TX packets:1056742 errors:0 dropped:0 overruns:0 carrier:0 coll:0
Interrupt:29 

NO errors on my end either:
d[email protected]:~$ ifconfig
eth0 Link encap:Ethernet HWaddr 00:16:76E:51:3A 
inet addr:10.42.42.100 Bcast:10.42.42.255 Mask:255.255.255.0
inet6 addr: fe80::216:76ff:fede:513a/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:189353 errors:0 dropped:0 overruns:0 frame:0
TX packets:192392 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100 
RX bytes:53233969 (50.7 MiB) TX bytes:252525621 (240.8 MiB)
Base address:0xecc0 Memory:dfde0000-dfe00000 

Maybe in between the two switches? Something to think about - I'll still look for that long cord instead of 2 switches. 

Is there an alternate way besides ms_ftp to extract .ty's? Linux based, of course. 

Thanks all to whom have taken time to read this.


----------



## helpdeskdan (Jun 28, 2004)

Tonight I had a bright Idea - try limiting the transfer rate. Seemed like a good idea in theory - perhaps it was trying to download too fast. So, I set it to 200k. Still stalled. Took slightly longer, but it still stalled. It was a good theory though; dang, what COULD be the problem?! This is driving me nuts. I spent all this time/money on my tivo hack and it's broken beyond repair. (Or understanding)


----------



## BTUx9 (Nov 13, 2003)

helpdeskdan said:


> Is there an alternate way besides ms_ftp to extract .ty's? Linux based, of course.


vserver/tserver (I believe there's a tivotool script which acts as a frontend for vserver)

and the .ty links on TWP plus use the mfs_* binaries directly
(make sure you have the latest)


----------



## helpdeskdan (Jun 28, 2004)

Just looked at the wireshark output - lost frames! Interesting. Perhaps it is a layer1/2 problem. Need to buy a new wire crimper. Will do more tests - many thanks to all who have posted!!


----------



## helpdeskdan (Jun 28, 2004)

Got it. Wires were actually not the problem. My zonet switch does not like to talk to my linksys switch. Why? No idea. Disconnect everything from both switches and hook them together and the light will flash and flash even though there is no traffic. The two switches must not correctly set duplex - my guess is that the zonet switch thinks it's talking half duplex as it's light flashes. No solution - they aren't managed hubs. Low on cash - buy another crappy zonet, I guess. Before, I just used a 10 mb hub - the linksys was smart enough to figure out it was talking to a half duplex device and all was well. Except, of course, transfer speed sucked. 

It all makes sense. Neither side's ifconfig would show any errors because the switches would discard any corrupt frames. And, although ms_ftp could correct for errors some of the time, give it enough errors and it would freak out not knowing which sequence number to resume on. The traffic would stall for a minute or two. Then, it would start up again till it lost more frames.

Thanks all for the help - the problem had nothing to do with the Tivo afterall! I can extract from my tivo again!!


----------

