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(udp): test blocking Socket #2002

Merged
merged 2 commits into from
Jul 22, 2024
Merged

fix(udp): test blocking Socket #2002

merged 2 commits into from
Jul 22, 2024

Conversation

mxinden
Copy link
Collaborator

@mxinden mxinden commented Jul 22, 2024

quinn_udp::UdpSocketState sets the the OS socket to non-blocking in order to be used by poll based runtimes like tokio.

For basic unit tests, this might result in race conditions, e.g. where one socket tries to receive before the other is done sending, thus returning WouldBlock.

This commit sets the OS sockets back to blocking on neqo-udp unit tests.


Fixes #2001.

Taken from quinn-udp.

`quinn_udp::UdpSocketState` sets the the OS socket to non-blocking in order to
be used by poll based runtimes like `tokio`.

For basic unit tests, this might result in race conditions, e.g. where one
socket tries to receive before the other is done sending, thus returning
`WouldBlock`.

This commit sets the OS sockets back to blocking on `neqo-udp` unit tests.
Copy link

github-actions bot commented Jul 22, 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

@mxinden
Copy link
Collaborator Author

mxinden commented Jul 22, 2024

Windows CI failure would be fixed by #2003.

Copy link

Firefox builds for this PR

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

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.99%. Comparing base (f0bffce) to head (dbdef20).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2002      +/-   ##
==========================================
- Coverage   94.99%   94.99%   -0.01%     
==========================================
  Files         112      112              
  Lines       36363    36371       +8     
==========================================
+ Hits        34544    34550       +6     
- Misses       1819     1821       +2     

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

Copy link

Benchmark results

Performance differences relative to 2e419cc.

coalesce_acked_from_zero 1+1 entries: Change within noise threshold.
       time:   [192.35 ns 192.75 ns 193.21 ns]
       change: [+0.1798% +0.5919% +0.9537%] (p = 0.00 < 0.05)

Found 3 outliers among 100 measurements (3.00%)
2 (2.00%) high mild
1 (1.00%) high severe

coalesce_acked_from_zero 3+1 entries: No change in performance detected.
       time:   [233.21 ns 233.74 ns 234.35 ns]
       change: [-0.4819% -0.1446% +0.1835%] (p = 0.41 > 0.05)

Found 15 outliers among 100 measurements (15.00%)
1 (1.00%) low mild
6 (6.00%) high mild
8 (8.00%) high severe

coalesce_acked_from_zero 10+1 entries: No change in performance detected.
       time:   [232.92 ns 233.67 ns 234.60 ns]
       change: [-0.8072% -0.3737% +0.0785%] (p = 0.11 > 0.05)

Found 7 outliers among 100 measurements (7.00%)
1 (1.00%) high mild
6 (6.00%) high severe

coalesce_acked_from_zero 1000+1 entries: No change in performance detected.
       time:   [216.86 ns 217.01 ns 217.21 ns]
       change: [-0.4146% +0.3555% +1.2498%] (p = 0.39 > 0.05)

Found 18 outliers among 100 measurements (18.00%)
2 (2.00%) low mild
6 (6.00%) high mild
10 (10.00%) high severe

RxStreamOrderer::inbound_frame(): Change within noise threshold.
       time:   [118.91 ms 119.09 ms 119.33 ms]
       change: [-0.8204% -0.5552% -0.2929%] (p = 0.00 < 0.05)

Found 1 outliers among 100 measurements (1.00%)
1 (1.00%) high severe

transfer/Run multiple transfers with varying seeds: No change in performance detected.
       time:   [53.370 ms 56.503 ms 59.631 ms]
       thrpt:  [67.079 MiB/s 70.793 MiB/s 74.948 MiB/s]
change:
       time:   [-3.4035% +4.5762% +12.685%] (p = 0.27 > 0.05)
       thrpt:  [-11.257% -4.3759% +3.5234%]
transfer/Run multiple transfers with the same seed: Change within noise threshold.
       time:   [61.245 ms 67.990 ms 74.764 ms]
       thrpt:  [53.502 MiB/s 58.832 MiB/s 65.312 MiB/s]
change:
       time:   [-22.432% -12.016% -0.0808%] (p = 0.05 < 0.05)
       thrpt:  [+0.0808% +13.657% +28.919%]
1-conn/1-100mb-resp (aka. Download)/client: No change in performance detected.
       time:   [292.20 ms 295.59 ms 299.12 ms]
       thrpt:  [334.31 MiB/s 338.31 MiB/s 342.24 MiB/s]
change:
       time:   [-0.2633% +1.4923% +3.2789%] (p = 0.13 > 0.05)
       thrpt:  [-3.1748% -1.4704% +0.2640%]
1-conn/10_000-parallel-1b-resp (aka. RPS)/client: No change in performance detected.
       time:   [415.77 ms 419.22 ms 422.63 ms]
       thrpt:  [23.661 Kelem/s 23.854 Kelem/s 24.052 Kelem/s]
change:
       time:   [-0.1296% +1.1014% +2.2117%] (p = 0.07 > 0.05)
       thrpt:  [-2.1638% -1.0894% +0.1298%]

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

1-conn/1-1b-resp (aka. HPS)/client: No change in performance detected.
       time:   [68.103 ms 68.461 ms 68.867 ms]
       thrpt:  [14.521  elem/s 14.607  elem/s 14.684  elem/s]
change:
       time:   [-0.4964% +0.2673% +1.0211%] (p = 0.51 > 0.05)
       thrpt:  [-1.0108% -0.2666% +0.4988%]

Found 10 outliers among 100 measurements (10.00%)
1 (1.00%) low severe
1 (1.00%) low mild
8 (8.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 144.5 ± 32.3 101.5 212.5 1.00
neqo msquic reno on 262.9 ± 4.2 256.0 267.6 1.00
neqo msquic reno 272.0 ± 11.8 259.8 291.0 1.00
neqo msquic cubic on 271.7 ± 27.0 247.4 344.4 1.00
neqo msquic cubic 263.9 ± 9.6 249.1 279.6 1.00
msquic neqo reno on 156.7 ± 17.9 114.8 203.5 1.00
msquic neqo reno 154.3 ± 34.1 113.5 268.9 1.00
msquic neqo cubic on 151.8 ± 9.2 141.2 170.6 1.00
msquic neqo cubic 177.9 ± 16.8 154.4 212.9 1.00
neqo neqo reno on 185.0 ± 15.5 157.4 207.6 1.00
neqo neqo reno 174.9 ± 11.9 153.9 203.8 1.00
neqo neqo cubic on 188.6 ± 42.0 152.4 343.1 1.00
neqo neqo cubic 179.1 ± 13.4 158.4 214.4 1.00

⬇️ Download logs

@larseggert larseggert added this pull request to the merge queue Jul 22, 2024
Merged via the queue into mozilla:main with commit 904acd3 Jul 22, 2024
55 of 57 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.

WouldBlock, message: "Resource temporarily unavailable"
2 participants