Skip to content

fix: fix panic while tearing down reconnecting PTY #15615

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 21, 2024

fixes coder/internal#221

Fixes an issue where two goroutines were sharing the err variable, leading to a data race where we'd fail to process the error and then nil-pointer panic.

I ended up refactoring reconnecting PTY stuff into the reconnectingpty package, instead of having it on the agent. That createTailnet routine had waaay too many deeply nested goroutines, which is I'm sure a big contributor to the bug appearing in the first place.

Copy link
Contributor Author

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

@spikecurtis spikecurtis requested a review from johnstcn November 21, 2024 12:57
@spikecurtis spikecurtis marked this pull request as ready for review November 21, 2024 12:59
@spikecurtis spikecurtis force-pushed the spike/internal-221-reconnecting-pty branch from 05a33c0 to 6f45baf Compare November 21, 2024 13:01
@spikecurtis spikecurtis merged commit 103824f into main Nov 22, 2024
28 checks passed
@spikecurtis spikecurtis deleted the spike/internal-221-reconnecting-pty branch November 22, 2024 05:46
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.

flake: panic in agent.createTailnet()
2 participants