Project

General

Profile

Bug #1790

Timeshift not working

Added by Paul Ricken about 11 years ago. Updated about 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
Category:
Timeshift
Target version:
-
Start date:
2013-08-30
Due date:
% Done:

0%

Estimated time:
Found in version:
3.5.243
Affected Versions:

Description

Hello guys,

I have problems with timeshift working with XBMC. My HTPC is running latest XBMCBUNTU (12.10). At first I was using the stable version Frodo 12.2 and the current stable version of tvheadend from your ubuntu ppa. When I tried to use timeshift, it worked for a few seconds and then freezed. I switched debugging on in the webinterface and paused for a few minutes (the first few times I paused just for a few seconds to see if logging works ;-) ):

Aug 23 20:18:48.718 timeshift: ts 5 change speed 0
Aug 23 20:18:53.650 timeshift: ts 5 change speed 100
Aug 23 20:18:57.847 timeshift: ts 5 change speed 0
Aug 23 20:19:30.202 timeshift: ts 5 change speed 100
Aug 23 20:19:33.895 timeshift: ts 5 change speed 0
Aug 23 20:20:00.149 epg: expire event 15131 from Sky Comedy
Aug 23 20:20:00.150 epg: now/next 15133/15135 set on Sky Comedy
Aug 23 20:20:00.150 epg: arm channel timer @ 1377288600 for Sky Comedy
Aug 23 20:20:00.150 epg: inform HTSP of now event change on Sky Comedy
Aug 23 20:20:00.150 epg: expire event 18065 from 13th Street HD
Aug 23 20:20:00.150 epg: now/next 18071/18073 set on 13th Street HD
Aug 23 20:20:00.150 epg: arm channel timer @ 1377288600 for 13th Street HD
Aug 23 20:20:00.150 epg: inform HTSP of now event change on 13th Street HD
Aug 23 20:20:07.781 timeshift: ts 5 buffer full

--- RESUMED TV ----

Aug 23 20:20:49.247 timeshift: ts 5 change speed 100
Aug 23 20:21:20.565 timeshift: ts 5 remove /home/htpc/buffer/5/tvh-1354
Aug 23 20:22:20.538 timeshift: ts 5 sob speed 100

As you can see, after resuming at 20:20:49 tv worked for about 30 seconds before freezing at 20:21:20.

Timeshift path is /home/htpc and df says:

/dev/sda7 26G 4.4G 20G 19% /home

so there should have been enough space.

I played a little bit with timeshift and monitored the buffer folder. When I pause a file named "tv-1399" was created. After that file reached a size of 16092 bytes another file ("tv-1400") was created (man, "was created"...is that proper english?) and when that file reached 23036 bytes the log said "buffer full". Second time the first while reached 5080 bytes and the second one 24700.

When I couldn't find an answer (and was frustrated with trying vdr) I upgraded my XBMC to one of the latest nightly (Gotham) and also upgraded tvheadend to the latest unstable, but it didn't help. The timeshift files are still being created but the log doesn't say anything about thimeshift. I can see that there was one timeshift file create with 1.4MB and another one which growed up to 44MB and then stopped.

What I get now is only this:

Loglevel debug: enabled
Aug 30 21:53:35.169 subscription: "192.168.2.152 [ htpc | XBMC Media Center ]" unsubscribing from "ProSieben" 
Aug 30 21:53:39.511 Service: Subscription "192.168.2.152 [ htpc | XBMC Media Center ]": Skipping "STV090x Multistandard 1/BetaDigital: 12,544,750 kHz Horizontal (No satconf)/ProSieben" -- not enabled
Aug 30 21:53:39.511 subscription: "192.168.2.152 [ htpc | XBMC Media Center ]" subscribing on "ProSieben", weight: 150, adapter: "STV090x Multistandard 0", network: "ASTRA 1", mux: "ASTRA 1: 12,544,750 kHz Horizontal (No satconf)", provider: "ProSiebenSat.1", service: "ProSieben", quality: 100

PAUSED

RESUMED

After resuming, playback worked for around 30 seconds and then freezed.

In addition to that: Is it correct that tvheadend "splits" the timeshift files?

Please, I already invested hours in analyzing what could cause this problem. I (and my wife :D) just want to watch live tv with working, stable timeshift.

If you need any further infos, just asked. Thanks!


Files

tvh.JPG (24.9 KB) tvh.JPG Martijn Jagers, 2013-10-07 16:40

History

#1

Updated by Adam Sutton about 11 years ago

  • Status changed from New to Need feedback

Can you post your timeshift configuration, just so I can double check what you have. By the sounds of it you have on-demand enabled and I think this has been known to have problems, it was added as a bit of an after thought at the request of a few users.

As for the files, yes this is right. It used to split it every second, but that was a bit excessive and could potentially create 1000's of files which on some systems could become inefficient, so the split point was changed. I forget the exact number now, probably a minute or so. Basically this is what, without using some advanced/non-standard FS features, allows us to create a simple ring buffer on disk. We drop the oldest file (N minutes) etc.. Of course this only happens with non-ondemand and while playing back.

Adam

#2

Updated by Paul Ricken about 11 years ago

First of all, thanks for your fast answer!

You're right, I have on-demand enabled and unlimited for max period and max size. I don't have problem with unchecking "on-demand" since I find it more comfortable anyway. But then I should set a maximum for the size, right?

That's a damn simple idea to split files for ringbuffer, never thought about that :D.

I will try disabling on-demand and set timeshift file size to 10GB.

#3

Updated by Paul Ricken about 11 years ago

Unfortunatly this didn't help. I turned "on-demand" off, set max filesize to 10000, restarted tvheadend service and watched channel. After a minute I rewinded for a few seconds. The first timeshift file was about 40 MB, then the second file was created, grew to ~40 MB and stopped. No more files were created and tv freezed after a minute. (I'm sorry, it's to late for good english grammar :D).

#4

Updated by Paul Ricken about 11 years ago

Here is some additional info:

I have "enabled" checked on, "on-demand" checked off and unlimited for both (size and time) on. I've monitored the timeshift folder and saw, that there are always only 2 timeshift files, both with ~25 MB. When the second file reached that size, the first one was deleted and a new timeshift appeared. So there are always only the last two timeshift files. And 50 MB timeshift buffer isn't very much :D.

#5

Updated by Paul Ricken about 11 years ago

Any Info? It's a shame that I have to switch my pvr backend because of this issue...

#6

Updated by Martijn Jagers about 11 years ago

I have the exact same issue. Using Ubuntu 12.04 with TVHeadend 3.5.243 and XBMC 12.2 (standard). In the buffer I always see two files of about 40-50MB for which indeed the first is deleted when the second reaches the 40-50MB...

I have OnDemand unchecked, and put the rest on unlimited, because of advice earlier given by Adam.

Any news on this topic? For me this means the backend is nearly unusable because of it...

#7

Updated by Martijn Jagers about 11 years ago

screenshot of what happens

#8

Updated by bastiaan evers almost 11 years ago

Just wanted to say I have the same problem using build 3.9.282.
Adam, has this been recognized as a bug? The status says need feedback. Could you indicate what additional feedback you need or else change the status?

Thanks.

#9

Updated by Ramon Zambelli almost 11 years ago

Same problem for me using Tvheadend 3.9.304~gc50b049 and XBMC 12.3 (tried the Gotham nightly build but same problem).

Thanks.

#10

Updated by saen acro almost 11 years ago

Test with ram drive partition for timeshift
HDD sometime can't handle speed of stream and crash on moment store and read

https://wiki.archlinux.org/index.php/Ramdisk

#11

Updated by Adam Sutton over 10 years ago

  • Status changed from Need feedback to Fixed

Going to mark this has fixed, though I'm sure it probably isn't! However we found several bugs in pvr.hts, and one in TVH (or which a workaround exists). Unfortunately the fixes haven't made it upstream as I@m now maintaining my own PVR addon.

Adam

#12

Updated by Martijn Jagers almost 10 years ago

Adam Sutton wrote:

Going to mark this has fixed, though I'm sure it probably isn't! However we found several bugs in pvr.hts, and one in TVH (or which a workaround exists). Unfortunately the fixes haven't made it upstream as I@m now maintaining my own PVR addon.

Adam

Hi Adam,

For a year or so I did not have this issue, but it's back! I created a complete new system for my TVH needs, and compiled the newest GIT (2245). This issue like described in the top is occurring exactly like that again. I have always 2 rolling buffer files, when the third one starts buffering it deletes the first. All known workarounds like the unlimited flags etc I have tried, but no luck. Also the Ramdisk proposal mentioned above does not solve it. When I hit PAUZE it completely stops buffering when the second file has completed. The log mentiones 'ts 0 buffer full', but the system has about 100G of free space.

So, it is a really weird problem, and it's driving me crazy ;). Debugged, traced everything, but nothing more than 'ts 0 buffer full' is not mentioned...

Please help!

#13

Updated by J. Dierkse almost 10 years ago

I've been looking into the code of timeshift for a bit, and I think a "&& !timeshift_unlimited_period" clause missing in timeshift/timeshift_filemgr.c line 211 ("if (ts->max_time && tsf_hd && tsf_tl) {")

#14

Updated by Gabor Kovacs about 9 years ago

I have the same issue:
Raspberry PI 2, 800GB Free Space on disk, HTS Tvheadend 3.4 wheezy on Raspbian

I click pause, it pauses. If I keep it paused for about 30 seconds it will freeze soon.
Watching the timeshift folder and the debug log: When the second timeshift cache file is created a "buffer full" event is displayed and stops creating the cache.

I've tried with Unlimited size checkbox on, then with limited to 200000000. All the same, buffer is reported full after 2nd file.

Also available in: Atom PDF