-
Notifications
You must be signed in to change notification settings - Fork 124
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
Conversation
`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.
Codecov ReportAll modified and coverable lines are covered by tests ✅
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. |
Failed Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
All resultsSucceeded Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
Unsupported Interop TestsQUIC Interop Runner, client vs. server neqo-latest as client
neqo-latest as server
|
Benchmark resultsPerformance 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) 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) 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) 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) 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) 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) 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) 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%] 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%] Client/server transfer resultsTransfer of 33554432 bytes over loopback.
|
There was a problem hiding this 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.
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}" |
There was a problem hiding this comment.
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.
Connection::add_packet_number -> PacketBuilder::pn -> Encoder::encode_uint
panics whenpn_len
is0
. 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.