ttrpc-rust icon indicating copy to clipboard operation
ttrpc-rust copied to clipboard

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

Open yuqitao opened this issue 8 months ago • 0 comments

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.

yuqitao avatar Jul 01 '24 02:07 yuqitao