-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Live, multi-period DASH, Shaka makes thousands of requests for the same segments #1464
Comments
I tested in 2.4.1 today and can reproduce with that version. |
This appears to be caused by b212ef9. If I revert this change, the problem goes away. Still investigating... |
Just to confirm the above, I've tested and can reproduce in 2.3.9, as well as 2.4.1. |
I've sent an email to shaka-player-issues with a curl you can use to get a manifest url. |
|
StreamingEngine gets into a loop of scheduling updates every 0s. This is the V2 logging output, which is repeated over and over:
|
I think I will put together a simple demo app that I can send over to Shaka team to repro this issue. But that will not happen this week, and I'm on vacation next week, so I likely won't return to this issue until ~Jul 4 at the earliest. |
I think it would be much easier with a self-contained repro. Not having a license server makes repro-ing and fixing this hard. So we'll probably be waiting until you send us a repro. One thing you could try is removing this bit in the SegmentIndex. I think it is causing duplicate index entries and confusing streaming. |
Since we have gap jumping, we don't need to worry about a gap at the beginning of the segment index. By changing the start time of the first segment, it makes merging complicated since the pre-fit and post-fit times are different. This difference can cause duplicate entries in the index. Issue #1464 Closes #1486 Change-Id: Ib3521e186cd8e256366a3c3e922e0764bd58bbd9
I just pushed a change that will probably fix your issue. Could you retry from |
The fix seems to be good. So far I haven't seen it get into making thousands of requests like it was before. However, I do still see it periodically request a segment a second time. Here I've sorted the requests in the Network tab by name: The behaviour does not disrupt playback, but is there any reason why Shaka should request a segment twice? |
Since we have gap jumping, we don't need to worry about a gap at the beginning of the segment index. By changing the start time of the first segment, it makes merging complicated since the pre-fit and post-fit times are different. This difference can cause duplicate entries in the index. Issue #1464 Closes #1486 Change-Id: Ib3521e186cd8e256366a3c3e922e0764bd58bbd9
I consider this issue resolved. I will file a new issue for the duplicate requests if I have an issue with it. Thanks. |
(Updated 6/15 with results from some additional testing)
Have you read the FAQ and checked for duplicate open issues?:
Yes
What version of Shaka Player are you using?:
This is reproducible in 2.3.9 and 2.4.1, and master
Can you reproduce the issue with our latest release version?:
This is not reproducible in 2.3.8 or 2.4.0.
Can you reproduce the issue with the latest code from
master
?:Yes, I can reliably reproduce in master.
Are you using the demo app or your own custom app?:
Custom app
If custom app, can you reproduce the issue using our demo app?:
No
What browser and OS are you using?:
Chrome 67 macOS
What are the manifest and license server URIs?:
Sent a curl by email to obtain manifest url. Unfortunately it's not practical to share a license since there is a custom authorization flow.
What did you do?
Load multi-period live DASH stream with Shaka
What did you expect to happen?
If a request is successful, Shaka should not re-request the same segment.
What actually happened?
Shaka made thousands of requests for the same segments, in quick succession. Chrome network panel indicated HTTP status 200 (from disk cache) on subsequent requests for the same segment. See attachment below, which shows requests made after a few minutes of playback. It's hard to troubleshoot because DevTools becomes virtually unusable. Also note that I forced Shaka to use http_xhr_plugin to see if it was a problem with Fetch. I was able to reproduce using both plugins.
During this time, the player appears to go in and out of buffering states. It seems to recover at some point (it stops requesting the same segment over and over). Then playback proceeds. Then there is a period of buffering, and then playback proceeds again. Then it reaches a point where it makes several thousand more requests for the same segment, and goes through the whole process again.
This only appears to happen with live, multi-period content. This manifest comes from our ad provider, YoSpace. I was not able to reproduce with VOD or our regular single-period content. (For comparison, this manifest works as expected: https://dfwlive-sponsored.akamaized.net/Content/DASH.abre/Live/channel(CNNHD-8249.dfw.1080)/manifest_mobile.mpd)
For what it's worth I've only seen this happen with audio segments so far. That might be a coincidence. The behaviour looks like Shaka got stuck in a loop with a poorly defined exit condition. I will continue troubleshooting to see if I can learn more. Any ideas in the meantime?
Edit: appears to be caused by b212ef9
The text was updated successfully, but these errors were encountered: