Skip to content

Clean up some request handling in the reverse tunnel agent#53200

Merged
espadolini merged 1 commit intomasterfrom
espadolini/reversetunnel-agent-request-cleanup
Mar 20, 2025
Merged

Clean up some request handling in the reverse tunnel agent#53200
espadolini merged 1 commit intomasterfrom
espadolini/reversetunnel-agent-request-cleanup

Conversation

@espadolini
Copy link
Copy Markdown
Contributor

This PR cleans up some of the SSH request and new channel handling in the reverse tunnel agent, including three separate occurrences of the same mishandling of closed channels that are selected on together with a context. Unfortunately a deeper fix that involves actually following the API contract of x/crypto/ssh (by actually exhausting all the relevant go channels rather than exiting on a context cancellation) could have other unforseen consequences in the handling of agents and their SSH connections in the agentpool and is thus out of scope for this specific fix.

Fixes #53165

changelog: fixed rare high CPU usage bug in reverse tunnel agents

@espadolini espadolini added this pull request to the merge queue Mar 20, 2025
Merged via the queue into master with commit 4e7685b Mar 20, 2025
45 checks passed
@espadolini espadolini deleted the espadolini/reversetunnel-agent-request-cleanup branch March 20, 2025 23:51
@backport-bot-workflows
Copy link
Copy Markdown
Contributor

@espadolini See the table below for backport results.

Branch Result
branch/v15 Failed
branch/v16 Failed
branch/v17 Failed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Teleport Agents that are otherwise idle use 100% CPU

3 participants