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

fix: Check that the largest_acked was sent #2150

Merged
merged 17 commits into from
Oct 8, 2024

Conversation

larseggert
Copy link
Collaborator

@larseggert larseggert commented Oct 7, 2024

This is a test and fix for the issue we're discussing with Avast.

It also includes an improvement to let handle_ack derive largest_acked on the fly, rather than needing to pass it in as an argument.

CC @mxinden

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden
Copy link

github-actions bot commented Oct 7, 2024

Failed Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

All results

Succeeded Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Unsupported Interop Tests

QUIC Interop Runner, client vs. server

neqo-latest as client

neqo-latest as server

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.39%. Comparing base (bd02153) to head (d675636).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2150      +/-   ##
==========================================
+ Coverage   95.35%   95.39%   +0.03%     
==========================================
  Files         112      112              
  Lines       36362    36364       +2     
==========================================
+ Hits        34674    34688      +14     
+ Misses       1688     1676      -12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Great catch! Thank you.

neqo-transport/src/connection/mod.rs Outdated Show resolved Hide resolved
@larseggert larseggert marked this pull request as ready for review October 7, 2024 11:59
Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>
Copy link
Collaborator

@mxinden mxinden left a comment

Choose a reason for hiding this comment

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

Apart from the outstanding comments on the added unit test, this pull request looks good to me.

neqo-transport/tests/connection.rs Outdated Show resolved Hide resolved
neqo-transport/tests/connection.rs Outdated Show resolved Hide resolved
larseggert and others added 2 commits October 7, 2024 17:08
Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>
Copy link

github-actions bot commented Oct 7, 2024

Benchmark results

Performance differences relative to bd02153.

coalesce_acked_from_zero 1+1 entries: Change within noise threshold.
       time:   [99.530 ns 99.919 ns 100.31 ns]
       change: [+0.3808% +0.7331% +1.0840%] (p = 0.00 < 0.05)

Found 13 outliers among 100 measurements (13.00%)
11 (11.00%) high mild
2 (2.00%) high severe

coalesce_acked_from_zero 3+1 entries: Change within noise threshold.
       time:   [117.40 ns 117.73 ns 118.10 ns]
       change: [+0.3123% +0.8458% +1.4374%] (p = 0.00 < 0.05)

Found 18 outliers among 100 measurements (18.00%)
1 (1.00%) low severe
2 (2.00%) low mild
4 (4.00%) high mild
11 (11.00%) high severe

coalesce_acked_from_zero 10+1 entries: Change within noise threshold.
       time:   [116.86 ns 117.15 ns 117.53 ns]
       change: [+0.0906% +0.5397% +0.9897%] (p = 0.01 < 0.05)

Found 15 outliers among 100 measurements (15.00%)
4 (4.00%) low severe
2 (2.00%) low mild
4 (4.00%) high mild
5 (5.00%) high severe

coalesce_acked_from_zero 1000+1 entries: Change within noise threshold.
       time:   [98.376 ns 98.520 ns 98.677 ns]
       change: [+0.5317% +1.4106% +2.3493%] (p = 0.00 < 0.05)

Found 9 outliers among 100 measurements (9.00%)
5 (5.00%) high mild
4 (4.00%) high severe

RxStreamOrderer::inbound_frame(): 💔 Performance has regressed.
       time:   [112.29 ms 112.35 ms 112.41 ms]
       change: [+1.0284% +1.1042% +1.1761%] (p = 0.00 < 0.05)

Found 11 outliers among 100 measurements (11.00%)
7 (7.00%) low mild
4 (4.00%) high mild

transfer/pacing-false/varying-seeds: No change in performance detected.
       time:   [26.752 ms 27.783 ms 28.811 ms]
       change: [-9.5487% -4.6858% +0.3675%] (p = 0.08 > 0.05)
transfer/pacing-true/varying-seeds: No change in performance detected.
       time:   [34.160 ms 35.884 ms 37.597 ms]
       change: [-11.860% -5.9244% +0.2607%] (p = 0.06 > 0.05)
transfer/pacing-false/same-seed: No change in performance detected.
       time:   [25.587 ms 26.321 ms 27.050 ms]
       change: [-4.5334% -0.3910% +3.5249%] (p = 0.85 > 0.05)
transfer/pacing-true/same-seed: No change in performance detected.
       time:   [40.924 ms 42.832 ms 44.744 ms]
       change: [-6.5364% -0.4233% +6.2079%] (p = 0.90 > 0.05)
1-conn/1-100mb-resp (aka. Download)/client: No change in performance detected.
       time:   [113.44 ms 113.96 ms 114.47 ms]
       thrpt:  [873.56 MiB/s 877.48 MiB/s 881.53 MiB/s]
change:
       time:   [-1.1277% -0.4615% +0.2393%] (p = 0.19 > 0.05)
       thrpt:  [-0.2388% +0.4636% +1.1405%]

Found 5 outliers among 100 measurements (5.00%)
4 (4.00%) low mild
1 (1.00%) high mild

1-conn/10_000-parallel-1b-resp (aka. RPS)/client: Change within noise threshold.
       time:   [309.77 ms 313.51 ms 317.24 ms]
       thrpt:  [31.522 Kelem/s 31.897 Kelem/s 32.282 Kelem/s]
change:
       time:   [-3.7901% -2.0361% -0.3446%] (p = 0.02 < 0.05)
       thrpt:  [+0.3458% +2.0785% +3.9394%]
1-conn/1-1b-resp (aka. HPS)/client: No change in performance detected.
       time:   [34.040 ms 34.229 ms 34.440 ms]
       thrpt:  [29.036  elem/s 29.215  elem/s 29.377  elem/s]
change:
       time:   [-0.3199% +0.5011% +1.3591%] (p = 0.24 > 0.05)
       thrpt:  [-1.3408% -0.4986% +0.3210%]

Found 6 outliers among 100 measurements (6.00%)
1 (1.00%) low mild
1 (1.00%) high mild
4 (4.00%) high severe

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing Mean [ms] Min [ms] Max [ms] Relative
msquic msquic 179.9 ± 86.8 103.9 349.6 1.00
neqo msquic reno on 270.8 ± 64.8 212.7 427.7 1.00
neqo msquic reno 229.5 ± 12.4 212.6 245.6 1.00
neqo msquic cubic on 279.3 ± 91.4 210.9 438.6 1.00
neqo msquic cubic 279.2 ± 86.0 215.8 442.4 1.00
msquic neqo reno on 130.2 ± 75.7 80.8 322.1 1.00
msquic neqo reno 114.2 ± 67.0 82.2 352.6 1.00
msquic neqo cubic on 93.8 ± 14.6 81.9 141.8 1.00
msquic neqo cubic 173.3 ± 117.6 83.2 513.8 1.00
neqo neqo reno on 173.8 ± 77.8 123.3 365.8 1.00
neqo neqo reno 194.1 ± 88.3 126.2 420.2 1.00
neqo neqo cubic on 220.5 ± 90.1 125.8 402.6 1.00
neqo neqo cubic 200.9 ± 105.9 121.9 422.2 1.00

⬇️ Download logs

Copy link

github-actions bot commented Oct 7, 2024

Firefox builds for this PR

The following builds are available for testing. Crossed-out builds did not succeed.

@larseggert larseggert linked an issue Oct 8, 2024 that may be closed by this pull request
@larseggert larseggert added this pull request to the merge queue Oct 8, 2024
Merged via the queue into mozilla:main with commit 9d12a1f Oct 8, 2024
61 of 62 checks passed
@larseggert larseggert deleted the fix-ack-for-unsent-pn branch October 8, 2024 06:02
KershawChang pushed a commit that referenced this pull request Oct 10, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 11, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 11, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 14, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 14, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
mxinden added a commit to mxinden/neqo that referenced this pull request Oct 15, 2024
* fix: Check that the largest_acked was sent

This is a test and fix for the issue we're discussing with Avast.

CC @mxinden

* Fix

* Do not use untrusted largest_ack

* Return Error::AckedUnsentPacket

* Tweaks

* Typo

* Tweaks

* Tweaks

* Update neqo-transport/src/connection/mod.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Update neqo-transport/tests/connection.rs

Co-authored-by: Max Inden <[email protected]>
Signed-off-by: Lars Eggert <[email protected]>

* Nit

* Simplify test

---------

Signed-off-by: Lars Eggert <[email protected]>
Co-authored-by: Max Inden <[email protected]>
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.

Crash in [@ neqo_common::codec::Encoder::encode_uint<T>]
3 participants