tailscale / tailscale/tailscale

wireguard-go: add lock order docs, checker, fix lock ordering bugs

Open
#19,513 0 comments 0 reactions 0 assignees View on GitHub
go
Dominant language
Go
Stars
36.5k
Forks
3.2k
Avg merge
2d 3h
Merged PRs (30d)
123

Description

We've had way too many deadlocks in wireguard-go over time (e.g. #18124, #18124, one I just hit on #19359, etc).

After that most recent one, I started dreaming of (and had Claude build) a static lock analyzer for wireguard-go that looks at its AST and looks at all the paths of what can be held where. It made a lock rank ordering and found some cycles, which all looked real.

Tracking bug to publish that tool and run its tests regularly as part of its CI.

(Related-ish: #12625)

/cc @raggi @tailscale/packets

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.