tailcat: clean up partially-initialized backends on startup errors - #11
Closed
awdemos wants to merge 1 commit into
Closed
tailcat: clean up partially-initialized backends on startup errors#11awdemos wants to merge 1 commit into
awdemos wants to merge 1 commit into
Conversation
Server.Start and Client.initLocked created netMon, the WireGuard engine, and netstack before assigning s.lb/c.lb. If any intermediate step failed, those resources leaked because Close saw a nil backend. Use named return values and deferred cleanup so that netMon, the engine, and netstack are closed when startup does not complete. Also reset s.lb to nil in Server.Start on failure, and close and clear c.lb in Client.ensureStarted when lb.Start fails, so the next use retries from a clean state instead of reusing a broken backend. Updates tailscale/tailcat (adversarial audit).
Member
|
You've burned my trust at this point sending a bunch of PRs that do nothing and have no tests (or have a test that already passed without your change) and don't have a corresponding issue or even a description of what the problem was. So I'm going to close this. If a human wants to tell me what the problem is, then we can fix it. We can even fix it with AI, but we need to know what we're fixing and verify it actually fixes it, first. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Server.Start and Client.initLocked created netMon, the WireGuard engine, and netstack before assigning s.lb/c.lb. If any intermediate step failed, those resources leaked because Close saw a nil backend.
Use named return values and deferred cleanup so that netMon, the engine, and netstack are closed when startup does not complete. Also reset s.lb to nil in Server.Start on failure, and close and clear c.lb in Client.ensureStarted when lb.Start fails, so the next use retries from a clean state instead of reusing a broken backend.