Skip to content
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

Processing saved packet may overflow cubic cc #1163

Merged
merged 2 commits into from Jun 17, 2021

Conversation

ddragana
Copy link
Contributor

Saved packets are process with a timestamp that correspond to time they have been received. This may overflow the calculation of the time spent in ca.

Saved packets are process with a timestamp that correspond to time they have been received. This may overflow the calculation of the time spent in ca.
@ddragana
Copy link
Contributor Author

ddragana commented Jun 16, 2021

This should fix bug 1716588 (only the crash reports that involve cubic).

This is triggered when saved-packets are process (see this crash report).
I only have an artificial test, I could not make a test that is triggering this with a quic connection and saved packets.

Copy link
Member

@martinthomson martinthomson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

We have quite a few time-traveling tests that could have tripped this, but they all use Reno. Maybe we should consider switching our default CC in tests (maybe using a feature flag so that we can just build and run tests under two different configurations).

.map_or(min_rtt, |t| now + min_rtt - t)
.map_or(min_rtt, |t| {
if now + min_rtt < t {
min_rtt
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth commenting here that this only happens when processing old packets that were saved and replayed with old timestamps. In that case, using a fixed value is safe.

It's a shame that we can't use saturating_sub() and all that with Duration yet. Those could make this slightly nicer.

@ddragana ddragana merged commit dab8b75 into mozilla:main Jun 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants