Skip to content

Mac client crashed when rebinding to interface #6641

@mihaip

Description

@mihaip

Observed that the Mac app (1.35.4) was in a "logged out" state this morning, with the backend not running. I had just woken up the machine and observed that my external display was not detected. The workaround for this is to unplug and plug back in my Thunderbolt dock, which also has Ethernet connectivity. This thus generates two rapid default interface change notifications.

The two interfaces on my machine are:

  • Ethernet: en4, index 8, IP 192.168.1.99
  • Wi-Fi: en0, index 15, IP 192.168.1.77
$ logprint -i 8f7c5e7a6a8a7de8906f727d1aaa17e53ed0cbd6066d24899abdc1191f05a8f9 -start=2022-12-06T16:53:00Z
2022-12-06 16:50:43.424785 +0000 UTC: LinkChange: major, rebinding. New state: interfaces.State{defaultRoute= ifs={en0:[192.168.1.77/24 fd3f:46a3:a86:47e9:10cd:4e29:f851:4038/64] utun3:[100.118.111.67/32 fd7a:115c:a1e0:ab12:4843:cd96:6276:6f43/48]} v4=true v6=true}
2022-12-06 16:50:43.424833 +0000 UTC: dns: Set: {DefaultResolvers:[] Routes:{beta.tailscale.net.:[] corp.ts.net.:[] ts-dns.test.:[100.120.55.47] ts.net.:[] ts.tailscale.com.:[8.8.8.8 8.8.4.4 2001:4860:4860::8888 2001:4860:4860::8844]}+65arpa SearchDomains:[corp.ts.net. tailscale.com.be
ta.tailscale.net. ts-dns.test. ts.tailscale.com.] Hosts:864}
2022-12-06 16:50:43.429069 +0000 UTC: getDNSServers: OS DNS servers: [192.168.1.254]
2022-12-06 16:50:43.429151 +0000 UTC: dns: Resolvercfg: {Routes:{.:[192.168.1.254] ts-dns.test.:[100.120.55.47] ts.tailscale.com.:[8.8.8.8 8.8.
4.4 2001:4860:4860::8888 2001:4860:4860::8844]} Hosts:864 LocalDomains:[corp.ts.net. beta.tailscale.net. ts.net.]+65arpa}
2022-12-06 16:50:43.429177 +0000 UTC: dns: OScfg: {Nameservers:[100.100.100.100] SearchDomains:[corp.ts.net. tailscale.com.beta.tailscale.net. 
ts-dns.test. ts.tailscale.com.] MatchDomains:[] Hosts:[]}
2022-12-06 16:50:43.429427 +0000 UTC: wgengine: set DNS config again after major link change
2022-12-06 16:50:43.438109 +0000 UTC: getDNSServers: OS DNS servers: [192.168.1.254]
2022-12-06 16:50:43.438224 +0000 UTC: [unexpected] netns: bindConnToInterface("udp6", ":51573"), v6=true, index=8: device not configured
2022-12-06 16:50:43.438336 +0000 UTC: magicsock: unable to bind udp6 port 51573: listen udp6 :51573: device not configured
2022-12-06 16:50:43.43887 +0000 UTC: getDNSServers: OS DNS servers: [192.168.1.254]
2022-12-06 16:50:43.438903 +0000 UTC: [unexpected] netns: bindConnToInterface("udp6", ":0"), v6=true, index=8: device not configured
2022-12-06 16:50:43.438973 +0000 UTC: magicsock: unable to bind udp6 port 0: listen udp6 :0: device not configured
2022-12-06 16:53:06.100000841 +0000 UTC: panic: sync/atomic: store of inconsistently typed value into Value
2022-12-06 16:53:06.100001057 +0000 UTC: goroutine 402515 [running]:
2022-12-06 16:53:06.100001165 +0000 UTC: sync/atomic.(*Value).Store(0x1400027eb10, {0x101707720, 0x14000a5e2e8})
2022-12-06 16:53:06.10000127 +0000 UTC:         sync/atomic/value.go:78 +0xd8
2022-12-06 16:53:06.100001374 +0000 UTC: tailscale.com/syncs.(*AtomicValue[...]).Store(0x101701c60?, {0x101793f70?, 0x14000a5e2e8?})
2022-12-06 16:53:06.100001586 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/syncs/syncs.go:52 +0x3c
2022-12-06 16:53:06.100001708 +0000 UTC: tailscale.com/wgengine/magicsock.(*RebindingUDPConn).setConnLocked(0x1400027eb10, {0x101793f70?, 0x140
00a5e2e8?})
2022-12-06 16:53:06.100001926 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/magicsock/magicsock.go:3026 +0x6c
2022-12-06 16:53:06.100002061 +0000 UTC: tailscale.com/wgengine/magicsock.(*Conn).bindSocket(0x1400027ea80, 0x1400027eb10, {0x101406768, 0x4}, 
0x0)
2022-12-06 16:53:06.100002177 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/magicsock/magicsock.go:2911 +0x77c
2022-12-06 16:53:06.100002292 +0000 UTC: tailscale.com/wgengine/magicsock.(*Conn).rebind(0x1400027ea80, 0x0?)
2022-12-06 16:53:06.100002402 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/magicsock/magicsock.go:2928 +0x40
2022-12-06 16:53:06.10000251 +0000 UTC: tailscale.com/wgengine/magicsock.(*Conn).Rebind(0x1400027ea80)
2022-12-06 16:53:06.100002617 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/magicsock/magicsock.go:2942 +0x68
2022-12-06 16:53:06.100002727 +0000 UTC: tailscale.com/wgengine.(*userspaceEngine).linkChange(0x1400027e700, 0x1, 0x140011f2640)
2022-12-06 16:53:06.100002837 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/userspace.go:1214 +0x3ac
2022-12-06 16:53:06.100002944 +0000 UTC: tailscale.com/wgengine.NewUserspaceEngine.func1(0x0?, 0x14000d1a230?)
2022-12-06 16:53:06.100003055 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/userspace.go:347 +0x3c
2022-12-06 16:53:06.100003165 +0000 UTC: created by tailscale.com/wgengine/monitor.(*Mon).debounce
2022-12-06 16:53:06.100003273 +0000 UTC:        tailscale.com@v1.1.1-0.20221205213320-79f3a5d75380/wgengine/monitor/monitor.go:326 +0x4f8

This is due to the changes from #6566, will investigate more.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions