n0-computer / n0-computer/net-tools

Make sure wakers are not overwritten for write readyness

Open
#28 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
29
Forks
36
Avg merge
1d 10h
Merged PRs (30d)
6

Description

Context from this in a PR discussion: https://github.com/n0-computer/net-tools/pull/26#discussion_r2115436630

The way to fix this is to use .writable() and store the future to for polling, similar to how we do it in quinn.

However, in this case it's a little more complicated, since we've also got a lock around our socket, and might have to replace the socket when it errors out and needs to be rebound, so we should also store multiple wakers for each task that tried to send on a currently-being-replaced socket.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked PR discussion and compare the proposed use of tokio's UdpSocket.writable() with quinn/src/runtime/tokio.rs. Trace how the socket lock and rebinding on errors interact with senders, then ensure each task's waker remains registered while a socket is being replaced.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.