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: Resend stream data on ZeroRttRejected #2062

Merged
merged 10 commits into from
Aug 21, 2024

Conversation

larseggert
Copy link
Collaborator

@larseggert larseggert commented Aug 20, 2024

Make the neqo client re-initiate 0-RTT requests that were rejected by the server.

Copy link

github-actions bot commented Aug 20, 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

Firefox builds for this PR

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

@mxinden
Copy link
Collaborator

mxinden commented Aug 20, 2024

As far as I can tell, this is required by RFC 9001 @larseggert:

When 0-RTT is rejected, all connection characteristics that the client assumed might be incorrect. This includes the choice of application protocol, transport parameters, and any application configuration. The client therefore MUST reset the state of all streams, including application state bound to those streams.

https://www.rfc-editor.org/rfc/rfc9001.html#section-4.6.2

@larseggert
Copy link
Collaborator Author

larseggert commented Aug 20, 2024

Right. But at least I understood "reset the state of all streams" to mean "reset what you think has been sent/acked on each stream" and not "make it so the streams never existed".

If what we do is correct, we need the client to correctly handle this, i.e., manually RTX that data wherever we are currently logging Unhandled event ZeroRttRejected.

Look OK, @mxinden?

Let's see what the CI says.
@larseggert
Copy link
Collaborator Author

This fix to the client isn't causing any RTX of the rejected 0-RTT stream data. Search for 0-RTT rejected and see what happens afterwards in this log; no RTX of the rejected stream data: output.txt

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.

Keep in mind that a rejection of 0-RTT could be due to a reduction in the number of streams that you are allowed to create. You can't just rewind, you have to start over completely.

@larseggert larseggert changed the title test: Check for RTX of lost 0-RTT data on reject fix: Resend stream data on ZeroRttRejected Aug 21, 2024
@larseggert larseggert marked this pull request as ready for review August 21, 2024 05:54
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.32%. Comparing base (836ffc6) to head (833d28b).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2062      +/-   ##
==========================================
- Coverage   95.35%   95.32%   -0.04%     
==========================================
  Files         112      112              
  Lines       36505    36505              
==========================================
- Hits        34811    34797      -14     
- Misses       1694     1708      +14     

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

Copy link

github-actions bot commented Aug 21, 2024

Benchmark results

Performance differences relative to 836ffc6.

coalesce_acked_from_zero 1+1 entries: No change in performance detected.
       time:   [98.674 ns 98.941 ns 99.218 ns]
       change: [-1.2969% -0.4584% +0.1898%] (p = 0.26 > 0.05)

Found 10 outliers among 100 measurements (10.00%)
3 (3.00%) high mild
7 (7.00%) high severe

coalesce_acked_from_zero 3+1 entries: No change in performance detected.
       time:   [116.77 ns 117.03 ns 117.32 ns]
       change: [-1.5219% -0.3367% +0.5575%] (p = 0.59 > 0.05)

Found 14 outliers among 100 measurements (14.00%)
2 (2.00%) low mild
2 (2.00%) high mild
10 (10.00%) high severe

coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [116.59 ns 117.06 ns 117.63 ns]
       change: [-0.5935% +0.0176% +0.6404%] (p = 0.96 > 0.05)

Found 11 outliers among 100 measurements (11.00%)
1 (1.00%) low severe
3 (3.00%) low mild
7 (7.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [97.542 ns 97.730 ns 97.973 ns]
       change: [-0.2295% +0.4837% +1.1881%] (p = 0.19 > 0.05)

Found 14 outliers among 100 measurements (14.00%)
5 (5.00%) high mild
9 (9.00%) high severe

RxStreamOrderer::inbound_frame(): Change within noise threshold.
       time:   [111.36 ms 111.42 ms 111.48 ms]
       change: [+0.1193% +0.1904% +0.2645%] (p = 0.00 < 0.05)

Found 13 outliers among 100 measurements (13.00%)
8 (8.00%) low mild
5 (5.00%) high mild

transfer/pacing-false/varying-seeds: No change in performance detected.
       time:   [26.190 ms 27.354 ms 28.531 ms]
       change: [-10.821% -5.4934% +0.3695%] (p = 0.06 > 0.05)
transfer/pacing-true/varying-seeds: No change in performance detected.
       time:   [36.566 ms 38.312 ms 40.051 ms]
       change: [-7.3887% -1.3559% +5.1352%] (p = 0.68 > 0.05)
transfer/pacing-false/same-seed: No change in performance detected.
       time:   [32.760 ms 33.495 ms 34.214 ms]
       change: [-5.0436% -2.1540% +0.9448%] (p = 0.18 > 0.05)

Found 2 outliers among 100 measurements (2.00%)
2 (2.00%) low mild

transfer/pacing-true/same-seed: Change within noise threshold.
       time:   [40.954 ms 43.649 ms 46.314 ms]
       change: [-16.419% -8.7932% -1.4414%] (p = 0.03 < 0.05)
1-conn/1-100mb-resp (aka. Download)/client: Change within noise threshold.
       time:   [114.03 ms 114.40 ms 114.76 ms]
       thrpt:  [871.39 MiB/s 874.12 MiB/s 876.95 MiB/s]
change:
       time:   [-1.6153% -1.1535% -0.6610%] (p = 0.00 < 0.05)
       thrpt:  [+0.6654% +1.1670% +1.6418%]

Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) low mild

1-conn/10_000-parallel-1b-resp (aka. RPS)/client: No change in performance detected.
       time:   [308.73 ms 312.41 ms 316.17 ms]
       thrpt:  [31.629 Kelem/s 32.010 Kelem/s 32.391 Kelem/s]
change:
       time:   [-1.3711% +0.2503% +1.8516%] (p = 0.76 > 0.05)
       thrpt:  [-1.8179% -0.2497% +1.3901%]
1-conn/1-1b-resp (aka. HPS)/client: No change in performance detected.
       time:   [40.308 ms 41.010 ms 41.696 ms]
       thrpt:  [23.983  elem/s 24.384  elem/s 24.809  elem/s]
change:
       time:   [-2.3273% +0.0196% +2.3971%] (p = 0.99 > 0.05)
       thrpt:  [-2.3410% -0.0196% +2.3827%]

Client/server transfer results

Transfer of 33554432 bytes over loopback.

Client Server CC Pacing Mean [ms] Min [ms] Max [ms] Relative
msquic msquic 152.5 ± 92.8 83.1 399.0 1.00
neqo msquic reno on 221.9 ± 12.6 207.7 249.1 1.00
neqo msquic reno 216.2 ± 14.3 201.1 246.8 1.00
neqo msquic cubic on 267.5 ± 79.1 212.0 466.8 1.00
neqo msquic cubic 246.4 ± 78.8 203.5 463.4 1.00
msquic neqo reno on 103.7 ± 58.9 73.6 360.7 1.00
msquic neqo reno 115.7 ± 70.7 73.7 330.9 1.00
msquic neqo cubic on 124.2 ± 79.3 74.2 322.5 1.00
msquic neqo cubic 140.0 ± 97.8 74.5 360.0 1.00
neqo neqo reno on 176.5 ± 102.1 127.6 452.7 1.00
neqo neqo reno 180.1 ± 84.4 123.2 405.1 1.00
neqo neqo cubic on 209.1 ± 102.6 126.5 412.2 1.00
neqo neqo cubic 230.5 ± 88.6 126.7 417.4 1.00

⬇️ Download logs

@larseggert
Copy link
Collaborator Author

larseggert commented Aug 21, 2024

I think this is good to go. I see no more L1 and C1 failures when running QNS locally.

(There are still some on the interop runner, because quic-interop/quic-network-simulator#133 is not merged (my local copy has it).

With this (and the QNS patch), hopefully there are fewer spurious QNS failures so we can determine if #1998 is good to go, too.

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.

Change looks good to me. Thank you for the debugging work!

neqo-bin/src/client/http09.rs Show resolved Hide resolved
neqo-bin/src/client/mod.rs Outdated Show resolved Hide resolved
@larseggert larseggert added this pull request to the merge queue Aug 21, 2024
Merged via the queue into mozilla:main with commit 13237c3 Aug 21, 2024
54 of 56 checks passed
@larseggert larseggert deleted the test-0rtt-lost-data-rtx branch August 21, 2024 11:46
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.

4 participants