Skip to content

sync: fix the connection fd leak on the server side#301

Merged
teawater merged 2 commits intocontainerd:0.5.0from
lifupan:0.5.0
Jun 24, 2025
Merged

sync: fix the connection fd leak on the server side#301
teawater merged 2 commits intocontainerd:0.5.0from
lifupan:0.5.0

Conversation

@lifupan
Copy link
Copy Markdown
Collaborator

@lifupan lifupan commented Jun 24, 2025

We need to ensure that only when the connection is successfully inserted into the connections map can the handler send fd to notify the reaper to recycle the connection.

Otherwise, the handler may have been executed and sent fd to notify the reaper to recycle the connection, and the connection has not been inserted into the map. Then the reaper cannot find the corresponding connection after receiving the fd, and loses the opportunity to recycle the connection, causing fd leakage;

Fupan Li and others added 2 commits June 24, 2025 10:12
We need to ensure that only when the connection is successfully
inserted into the connections map can the handler send fd
to notify the reaper to recycle the connection.

Otherwise, the handler may have been executed and sent fd to notify
the reaper to recycle the connection, and the connection has
not been inserted into the map. Then the reaper cannot find the corresponding
connection after receiving the fd, and loses the opportunity to recycle the
connection, causing fd leakage;

Signed-off-by: Fupan Li <fupan.lfp@antgroup.com>
Fix failure with deny workflow in CI.
This requires bumping cargo-deny-action, which introduces a breaking change in the syntax of deny.toml

Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com>
Copy link
Copy Markdown
Member

@Tim-Zhang Tim-Zhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @lifupan

@teawater teawater merged commit e030fd2 into containerd:0.5.0 Jun 24, 2025
7 of 8 checks passed
Tim-Zhang added a commit to Tim-Zhang/ttrpc-rust that referenced this pull request Jun 24, 2025
Changelog:
- containerd#301

Signed-off-by: Tim Zhang <tim@hyper.sh>
@Tim-Zhang Tim-Zhang mentioned this pull request Jun 24, 2025
Tim-Zhang added a commit to Tim-Zhang/ttrpc-rust that referenced this pull request Jun 24, 2025
Changelog:
- containerd#301

Signed-off-by: Tim Zhang <tim@hyper.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants