Skip to content

netstack: remove timed-out endpoints from pendingEndpoints queue. #11557

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JiaHuann
Copy link

When a handshake times out, the endpoint may remain stuck in the lEP's pendingEndpoints queue.

Related to #11536

It has passed the test-case for //pkg/tcpip:tcpip_test
image

When a handshake times out, the endpoint may remain stuck in the lEP's pendingEndpoints queue.

Related to google#11536
@JiaHuann JiaHuann marked this pull request as draft March 17, 2025 07:08
@JiaHuann JiaHuann marked this pull request as ready for review March 17, 2025 08:05
if e.h != nil && e.h.listenEP != nil {
lEP := e.h.listenEP
lEP.acceptMu.Lock()
delete(lEP.acceptQueue.pendingEndpoints, e)

Choose a reason for hiding this comment

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

Do we also need to remove it from lEP.acceptQueue.endpoints (completed handshaking but not taken by an accept call) during cleanupLocked?

Choose a reason for hiding this comment

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

For instance, if cleanupLocked is triggered by a timeout handle, if present, or by an explicit reset from the peer.

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.

2 participants