New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement filecache retry logic #8723
Conversation
jenkins build this please |
@Paxxi : Please review/comment |
ping @Paxxi. Anyone else against this? |
I don't understand all those FileCache hacks and there are many in that So @Paxxi please review. 2016-01-09 9:38 GMT+01:00 arnova notifications@github.com:
Fingerprint: 4606 DA19 EC2E 9A0B 0157 C81B DA07 CF63 1A99 5A9B |
|
78c03b8
to
cc6968c
Compare
Sorry about the radio silence, too many notifications :) |
@Paxxi : No problem and thanks for the review. I think I'll stick to int since that's what the surrounding functions in that area use as well. I'll squash it and I think it's ready to go in then. |
58ec61d
to
0c14f24
Compare
@Paxxi: Mind reviewing it again. I simplified the logic somewhat. Thanks! jenkins build this please |
9668872
to
d7bdcc0
Compare
@MilhouseVH : Could you include this in your builds so it gets some proper testing before it's merged into mainline? |
Will do, thanks. |
@MilhouseVH : No, thank you ;-) |
This PR is causing a range request failure when attempting to play content from Amazon Prime - see this debug log: http://pastebin.com/raw/EaW1W3np With this PR, the request to Amazon will fail with:
To reproduce you'll need:
If you live in the UK you may also need Getflix to access the US as the UK isn't working well at all (probably unrelated to this PR, likely an add-on issue). I'm in the UK, but get the above curl error when accessing US or DE content (with or without Getflix) while PR8723 is included, Without PR8723, content from the US via Getflix will play normally. |
I came over this issue today also with inputstream with @MilhouseVH openelec:
My guess was that it is curl, but the user has installed 7.47.1 (the newest version), but good to know that it seems to be something inside kodi - I'm not keen on fixing curl code. B:t.w: the behaviour was a little bit strange: Download was working once, after that not anymore. |
Strange I've reviewed the code once again and I can't seem to find which change is responsible for this. @MilhouseVH : You're 100% sure it's this PR causing it and not the e.g. libcurl update? |
@arnova: Absolutely 100% sure, yes. |
To be clear, I stopped adding this PR and the problem went away - Amazon Prime now worked. In addition, I built master for Ubuntu x86_64 without any other changes and Amazon Prime worked. I then rebuilt with this PR and could then reproduce the range request failure. |
just a question: has anything of this development found its way to master? Today I have this (and never saw this before): 15:39:17 T:160 DEBUG: Curl::Debug - SSL_DATA_OUT: ����V where dose the content-range come from? I didn't set it. I stoill have the feeling that there is something uninitialized. |
@MilhouseVH : Sure, but in principle if no other problems popup this should be merged in a few weeks. Please ping me in case you want to drop it. @fritsch : I'm running (XFCE) Mint 17.2, which is based on Ubuntu 14.04-LTS. I though we'd always support the last LTS version of Ubuntu? When did we drop support for it? @FernetMenta : Thanks for the info. @mapfau : Nothing has been merged to master yet concerning this or anything else concerning Curl. I'll have a look at your issue. |
@arnova Ubuntu 16.04 LTS is released in 1 months and kodi v17 most likely after it.Kodi v16 supports 14.04 just fine - but sucks VAAPI feature wise. |
I'll, because its reproducable on my machine |
@mapfau : Looking over the code, I suspect a problem in libcurl itself. I don't see anything (obvious) in our code that could cause this. |
@arnova sorry - I passed the headers too late, it was my fault :-( |
@mapfau : No problem :) |
jenkins build this please |
@MilhouseVH : No reports of problems with this? I just added an IO control option to properly handle enabling/disabling retrying inside file implementations when cache is used. The changes are pretty simple/straightforward. Please review, but I don't think they require any additional testing. |
No further reports of any problems after your fix for Amazon. I've tested your latest changes and Amazon is still working. |
jenkins build this please |
I believe this PR broke video queue on android. Behaviour is as follows: |
@arnova |
trac.kodi.tv all debuglog are mandatory |
the issue i described is now resolved with the latest nightly. |
Same! Fixed with latest build. |
@RubenTeixeira : Great that it's fixed but please next time don't start blaming (random) commits/PRs unless fairly sure it's the cause. And if not, use the forum instead. |
@arnova i'm sorry, but from the previous build to the troubling one, the only commit related to buffering was this one. |
This PR implements retry logic for our filecache. Especially poor (wifi) connections benefit from this. Previously we would simply (silently) abort in case a single Read() failed.
With this we simply retry a read, as long as we have data in our cache. This PR also adjusts Curl's fillbuffer retry logic to properly support Read() retries. This also disables CFileCurl's internal retry logic which could cause long waits (hangs) on exit when .e.g a connection timeout occurred.