summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver
diff options
context:
space:
mode:
authorJames Tucker <james@tailscale.com>2026-02-28 15:53:09 -0800
committerJames Tucker <jftucker@gmail.com>2026-02-28 16:33:06 -0800
commitfa13f83375680d223d411604b7360b0325936b19 (patch)
tree71bb82e1b2f3ee5a5233b32214aa09c93bd7d0ab /control/controlhttp/controlhttpserver
parent439d84134d169db13b731a0cf515e0f5e342b984 (diff)
downloadtailscale-fa13f83375680d223d411604b7360b0325936b19.tar.xz
tailscale-fa13f83375680d223d411604b7360b0325936b19.zip
tsnet: fix deadlock in Server.Close during shutdown
Server.Close held s.mu for the entire shutdown duration, including netstack.Close (which waits for gVisor goroutines to exit) and lb.Shutdown. gVisor callbacks like getTCPHandlerForFlow acquire s.mu via listenerForDstAddr, so any in-flight gVisor goroutine attempting that callback during stack shutdown would deadlock with Close. Replace the mu-guarded closed bool with a sync.Once, and release s.mu after closing listeners but before the heavy shutdown operations. Also cancel shutdownCtx before netstack.Close so pending handlers observe cancellation rather than contending on the lock. Updates #18423 Signed-off-by: James Tucker <james@tailscale.com>
Diffstat (limited to 'control/controlhttp/controlhttpserver')
0 files changed, 0 insertions, 0 deletions