containerd / containerd/ttrpc-rust

[sync/server] wtc race maybe cause zero worker thread

Open
#230 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
369
Forks
60
PR merge metrics
No merged PRs in 30d

Description

# Description of problem

wtc race maybe cause zero worker thread here.
https://github.com/containerd/ttrpc-rust/blob/152ac12c30f65b79407d4411c40d8c86bc5ae949/src/sync/server.rs#L111

could reproduce it by add `sleep 1s` before
https://github.com/containerd/ttrpc-rust/blob/152ac12c30f65b79407d4411c40d8c86bc5ae949/src/sync/server.rs#L112

# Expected result

There is at least one worker thread for the accepted socket fd.

# Actual result
Mabye there is no worker thread for the accepted socket fd.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/sync/server.rs at the linked lines around 111-112 and reproduce the race by adding the reported 1-second sleep before line 112. Trace accepted socket handling and worker-thread creation, then verify that every accepted socket fd has at least one worker thread and that the reproduction no longer leaves it unserved.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.