tailscale/ipn/ipnlocal
Tom DNetto a515fc517b ipn/ipnlocal: make tkaSyncIfNeeded exclusive with a mutex
Running corp/ipn#TestNetworkLockE2E has a 1/300 chance of failing, and
deskchecking suggests thats whats happening are two netmaps are racing each
other to be processed through tkaSyncIfNeededLocked. This happens in the
first place because we release b.mu during network RPCs.

To fix this, we make the tka sync logic an exclusive section, so two
netmaps will need to wait for tka sync to complete serially (which is what
we would want anyway, as the second run through probably wont need to
sync).

Signed-off-by: Tom DNetto <tom@tailscale.com>
2022-10-14 12:42:43 -07:00
..
c2n.go wgengine/magicsock: make debug-level stuff not logged by default 2022-10-04 11:05:50 -07:00
dnsconfig_test.go all: convert more code to use net/netip directly 2022-07-25 21:53:49 -07:00
local_test.go envknob: support changing envknobs post-init 2022-09-15 15:04:02 -07:00
local.go ipn/ipnlocal: make tkaSyncIfNeeded exclusive with a mutex 2022-10-14 12:42:43 -07:00
loglines_test.go ipn/store: add common package for instantiating ipn.StateStores 2022-02-28 13:23:33 -08:00
network-lock_test.go ipn/ipnlocal: make tkaSyncIfNeeded exclusive with a mutex 2022-10-14 12:42:43 -07:00
network-lock.go ipn/ipnlocal: make tkaSyncIfNeeded exclusive with a mutex 2022-10-14 12:42:43 -07:00
peerapi_h2c.go wasm: exclude code that's not used on iOS for Wasm too 2022-06-06 13:52:52 -07:00
peerapi_macios_ext.go all: convert more code to use net/netip directly 2022-07-25 21:53:49 -07:00
peerapi_test.go all: fix spelling mistakes 2022-09-29 13:36:13 -07:00
peerapi.go all: fix spelling mistakes 2022-09-29 13:36:13 -07:00
ssh_stub.go ipn/ipnlocal: add c2n method to get SSH username candidates 2022-09-19 10:37:04 -07:00
ssh_test.go ipn/ipnlocal: add c2n method to get SSH username candidates 2022-09-19 10:37:04 -07:00
ssh.go ipn/ipnlocal: return usernames when Tailscale SSH is enabled 2022-09-21 14:06:40 -07:00
state_test.go syncs, all: move to using Go's new atomic types instead of ours 2022-08-04 07:47:59 -07:00