Skip to content

tailcat: clean up partially-initialized backends on startup errors - #11

Closed
awdemos wants to merge 1 commit into
tailscale:mainfrom
awdemos:fix-partial-start-cleanup
Closed

tailcat: clean up partially-initialized backends on startup errors#11
awdemos wants to merge 1 commit into
tailscale:mainfrom
awdemos:fix-partial-start-cleanup

Conversation

@awdemos

@awdemos awdemos commented Aug 27, 2026

Copy link
Copy Markdown

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.

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).
@bradfitz

Copy link
Copy Markdown
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.

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