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 race condition when receiving 0-RTT packets #3074

Merged
merged 5 commits into from
Mar 11, 2021

Conversation

marten-seemann
Copy link
Member

Fixes #2629. Depends #3066.

By moving the logic for queueing 0-RTT packets into the packet handler map, we can avoid the race condition between receiving 0-RTT packets and the creation of new sessions.

@marten-seemann marten-seemann force-pushed the fix-0rtt-queue-race branch 2 times, most recently from 2cf5294 to 496b0e4 Compare March 8, 2021 09:42
@codecov
Copy link

codecov bot commented Mar 8, 2021

Codecov Report

Merging #3074 (2bd316b) into master (b2c2e49) will decrease coverage by 0.12%.
The diff coverage is 82.76%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3074      +/-   ##
==========================================
- Coverage   85.84%   85.71%   -0.12%     
==========================================
  Files         132      131       -1     
  Lines        9519     9520       +1     
==========================================
- Hits         8171     8160      -11     
- Misses        983      991       +8     
- Partials      365      369       +4     
Impacted Files Coverage Δ
internal/wire/header.go 90.32% <71.43%> (-1.13%) ⬇️
packet_handler_map.go 75.10% <82.46%> (+0.83%) ⬆️
server.go 80.47% <86.96%> (-1.78%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b2c2e49...2bd316b. Read the comment docs.

@marten-seemann marten-seemann force-pushed the fix-0rtt-queue-race branch 2 times, most recently from 6a02c4d to acf6db7 Compare March 8, 2021 10:02
Copy link
Member

@lucas-clemente lucas-clemente left a comment

Choose a reason for hiding this comment

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

lgtm modulo comments in dependee PR

packet_handler_map.go Show resolved Hide resolved
This prevents a race condition between receiving of 0-RTT packets and
the creation of new session.
@marten-seemann marten-seemann merged commit 3bce408 into master Mar 11, 2021
@marten-seemann marten-seemann deleted the fix-0rtt-queue-race branch March 11, 2021 13:38
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
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.

Server receives 0-RTT packets, but does not deliver them to QUIC session.
2 participants