QUIC timeout handling is not thread-safe
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 50
- Forks
- 36
- Avg merge
- 3d 22h
- Merged PRs (30d)
- 2
Description
The quic_timer_handler() function runs in a separate thread, but sets tlshd_quic_conn::errcode with a non-atomic assignment. The field is also read non-atomically on the main thread.
Rather than changing all access to this field to be atomic, I think it would be more sensible to add a separate timeout flag that is accessed atomically and which the main thread can translate to errcode = ETIMEDOUT.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate quic_timer_handler() and every read and write of tlshd_quic_conn::errcode. Trace how the main thread handles timeout state, then verify that the timer thread's notification and the main-thread error translation are race-free. Confirm the existing build or test checks pass after the timeout behavior is covered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100