Skip to content

Conversation

@lifupan
Copy link
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;

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 <[email protected]>
@Tim-Zhang Tim-Zhang merged commit 02bf427 into containerd:0.8.0 Jun 24, 2025
10 checks passed
Tim-Zhang added a commit to Tim-Zhang/ttrpc-rust that referenced this pull request Jun 24, 2025
Changelog:
- containerd#302

Signed-off-by: Tim Zhang <[email protected]>
@Tim-Zhang Tim-Zhang mentioned this pull request Jun 24, 2025
@lifupan lifupan deleted the 0.8.0 branch June 24, 2025 06:14
Tim-Zhang added a commit to Tim-Zhang/ttrpc-rust that referenced this pull request Jun 24, 2025
Changelog:
- containerd#302

Signed-off-by: Tim Zhang <[email protected]>
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.

3 participants