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

Open
#230 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

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.

Dominant language
Rust
Stars
374
Forks
64
Avg merge
3d 5h
Merged PRs (30d)
6

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

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.

More from containerd/ttrpc-rust

All issues in containerd/ttrpc-rust

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.