Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix: fix hang in teardown of TestConn_CoordinatorRollingRestart #15624

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

Merged
merged 1 commit into from
Nov 22, 2024

Conversation

spikecurtis
Copy link
Contributor

@spikecurtis spikecurtis commented Nov 22, 2024

fixes a flake seen on main: https://github.com/coder/coder/actions/runs/11967210463/job/33364072261

the TCP echo server had a waitgroup to ensure that all accepted connections get torn down, but no explicit teardown of the connection. We depended on the tailnet agent closing its side of the connection, which depends on closing the tunneled connection. The tunneled FIN could race with tearing down the tunnel itself.

So, this PR adds explicit t.Cleanup to close the echo connection. It also removes the waitgroup. The purpose of the waitgroup was to ensure that all goroutines created by the echo listener get shut down, but we have goleak for that, which fails much faster than the 20 minutes this test run took.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@spikecurtis spikecurtis marked this pull request as ready for review November 22, 2024 07:31
@spikecurtis spikecurtis merged commit b5fbfd7 into main Nov 22, 2024
35 checks passed
@spikecurtis spikecurtis deleted the spike/rolling-restart-teardown branch November 22, 2024 07:44
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