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

Extend panic when pn_len is 0 with metadata #2134

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Sep 24, 2024

Connection::add_packet_number -> PacketBuilder::pn -> Encoder::encode_uint panics when pn_len is 0. These panics are seen in Firefox crash reports.

To be able to find the root cause of the panic, add additional metadata.

See #2132 for details.

`Connection::add_packet_number -> PacketBuilder::pn -> Encoder::encode_uint`
panics when `pn_len` is `0`. These panics are seen in Firefox crash reports.

To be able to find the root cause of the panic, add additional metadata.

See mozilla#2132 for details.
Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.35%. Comparing base (75372c2) to head (81691e0).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2134      +/-   ##
==========================================
+ Coverage   95.32%   95.35%   +0.02%     
==========================================
  Files         112      112              
  Lines       36319    36336      +17     
==========================================
+ Hits        34621    34648      +27     
+ Misses       1698     1688      -10     

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

Copy link

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

Benchmark results

Performance differences relative to d513712.

coalesce_acked_from_zero 1+1 entries: No change in performance detected.
       time:   [99.343 ns 99.727 ns 100.16 ns]
       change: [-0.2939% +0.1441% +0.5890%] (p = 0.53 > 0.05)

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

coalesce_acked_from_zero 3+1 entries: No change in performance detected.
       time:   [117.59 ns 117.91 ns 118.25 ns]
       change: [-6.6437% -2.1020% +0.5568%] (p = 0.51 > 0.05)

Found 15 outliers among 100 measurements (15.00%)
2 (2.00%) low severe
1 (1.00%) low mild
3 (3.00%) high mild
9 (9.00%) high severe

coalesce_acked_from_zero 10+1 entries: Change within noise threshold.
       time:   [117.51 ns 118.04 ns 118.65 ns]
       change: [+0.4098% +1.1540% +2.0174%] (p = 0.00 < 0.05)

Found 17 outliers among 100 measurements (17.00%)
6 (6.00%) low severe
11 (11.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [97.309 ns 97.466 ns 97.645 ns]
       change: [-0.9909% +0.7288% +2.3125%] (p = 0.43 > 0.05)

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

RxStreamOrderer::inbound_frame(): No change in performance detected.
       time:   [110.88 ms 111.01 ms 111.24 ms]
       change: [-0.2513% -0.1183% +0.0790%] (p = 0.21 > 0.05)

Found 20 outliers among 100 measurements (20.00%)
10 (10.00%) low mild
8 (8.00%) high mild
2 (2.00%) high severe

transfer/pacing-false/varying-seeds: No change in performance detected.
       time:   [26.372 ms 27.415 ms 28.473 ms]
       change: [-6.1079% -0.7408% +4.8356%] (p = 0.79 > 0.05)

Found 3 outliers among 100 measurements (3.00%)
3 (3.00%) high mild

transfer/pacing-true/varying-seeds: No change in performance detected.
       time:   [35.169 ms 36.819 ms 38.470 ms]
       change: [-7.3788% -1.0912% +6.4545%] (p = 0.75 > 0.05)
transfer/pacing-false/same-seed: No change in performance detected.
       time:   [25.971 ms 26.816 ms 27.664 ms]
       change: [-4.2573% -0.2365% +4.6325%] (p = 0.92 > 0.05)

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

transfer/pacing-true/same-seed: No change in performance detected.
       time:   [40.579 ms 42.626 ms 44.710 ms]
       change: [-4.6393% +2.0185% +9.5538%] (p = 0.56 > 0.05)
1-conn/1-100mb-resp (aka. Download)/client: No change in performance detected.
       time:   [113.08 ms 113.65 ms 114.18 ms]
       thrpt:  [875.83 MiB/s 879.91 MiB/s 884.35 MiB/s]
change:
       time:   [-0.9300% -0.2458% +0.4350%] (p = 0.48 > 0.05)
       thrpt:  [-0.4331% +0.2464% +0.9387%]

Found 7 outliers among 100 measurements (7.00%)
7 (7.00%) low mild

1-conn/10_000-parallel-1b-resp (aka. RPS)/client: No change in performance detected.
       time:   [310.48 ms 314.51 ms 318.53 ms]
       thrpt:  [31.394 Kelem/s 31.795 Kelem/s 32.208 Kelem/s]
change:
       time:   [-2.8644% -1.2110% +0.5577%] (p = 0.17 > 0.05)
       thrpt:  [-0.5546% +1.2259% +2.9488%]
1-conn/1-1b-resp (aka. HPS)/client: No change in performance detected.
       time:   [33.780 ms 33.934 ms 34.103 ms]
       thrpt:  [29.323  elem/s 29.469  elem/s 29.603  elem/s]
change:
       time:   [-1.0975% -0.2937% +0.4881%] (p = 0.46 > 0.05)
       thrpt:  [-0.4857% +0.2946% +1.1097%]

Found 5 outliers among 100 measurements (5.00%)
2 (2.00%) low mild
3 (3.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 105.8 ± 19.4 90.1 183.8 1.00
neqo msquic reno on 230.6 ± 15.0 209.0 255.7 1.00
neqo msquic reno 218.5 ± 10.5 205.1 237.4 1.00
neqo msquic cubic on 211.1 ± 7.6 202.4 228.1 1.00
neqo msquic cubic 215.2 ± 11.3 203.5 234.2 1.00
msquic neqo reno on 89.4 ± 9.4 81.6 115.4 1.00
msquic neqo reno 97.4 ± 25.8 75.2 184.4 1.00
msquic neqo cubic on 97.7 ± 29.9 81.6 187.4 1.00
msquic neqo cubic 100.2 ± 27.1 82.3 179.9 1.00
neqo neqo reno on 146.0 ± 23.2 125.1 210.5 1.00
neqo neqo reno 165.8 ± 88.0 123.6 513.3 1.00
neqo neqo cubic on 287.7 ± 147.8 156.8 468.8 1.00
neqo neqo cubic 178.6 ± 59.9 126.7 363.9 1.00

⬇️ Download logs

Copy link

Firefox builds for this PR

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

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.

I'm sure that this is fine.

neqo-transport/src/connection/mod.rs Show resolved Hide resolved
@larseggert larseggert added this pull request to the merge queue Sep 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 25, 2024
@larseggert larseggert added this pull request to the merge queue Sep 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 25, 2024
@larseggert larseggert added this pull request to the merge queue Sep 25, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 25, 2024
@mxinden
Copy link
Collaborator Author

mxinden commented Sep 25, 2024

codecov/patch 66.66% of diff hit (target 95.35%)

Oh, what is happening here? Taking a look now.

// pn_len can't be zero (unacked_range is > 0)
assert!(
pn_len > 0,
"pn_len can't be zero as unacked_range should be > 0, pn {pn}, largest_acknowledged {largest_acknowledged:?}, tx {tx}"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Seems like codecov is failing, given that this particular line, i.e. the formatting in the case of a panic, is not covered by tests.

https://app.codecov.io/gh/mozilla/neqo/commit/f4af74c4a9fcbeb1b95092f180ea07bd7f110611

I don't think it makes sense to write tests for each of our assertions. If you think differently, I can add a test for this particular one.

@larseggert larseggert merged commit 55e3a93 into mozilla:main Sep 25, 2024
63 checks passed
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.

3 participants