tailscale / tailscale

The easiest, most secure way to use WireGuard and 2FA.
https://tailscale.com
BSD 3-Clause "New" or "Revised" License
19.32k stars 1.51k forks source link

Tailscale 1.32.1 fails to start with SIGSEGV #6065

Closed andrew-d closed 2 years ago

andrew-d commented 2 years ago

What is the issue?

Report from a user.

From the Go version:

logtail started
Program starting: v1.33.0-dev-t, Go 1.19.2: []string{"tailscaled"}
LogID: REDACTED
logpolicy: using system state directory "/Library/Tailscale"
flushing log.
logger closing down
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1353997]

goroutine 37 [running]:
tailscale.com/net/interfaces.isDefaultGateway(0x6?)
    /Users/REDACTED/go/pkg/mod/tailscale.com@v1.1.1-0.20221025201637-d60f7fe33f54/net/interfaces/interfaces_bsd.go:131 +0x77
tailscale.com/net/interfaces.DefaultRouteInterfaceIndex()
    /Users/REDACTED/go/pkg/mod/tailscale.com@v1.1.1-0.20221025201637-d60f7fe33f54/net/interfaces/interfaces_bsd.go:68 +0x14a
tailscale.com/net/netns.controlLogf(0x18bc9c8, {0xc000312060, 0x4}, {0xc000352078, 0x11}, {0x19a9300?, 0xc000344030})
    /Users/REDACTED/go/pkg/mod/tailscale.com@v1.1.1-0.20221025201637-d60f7fe33f54/net/netns/netns_darwin_tailscaled.go:35 +0xbe
tailscale.com/net/netns.control.func1({0xc000312060?, 0x1867259?}, {0xc000352078?, 0x199b844?}, {0x19a9300?, 0xc000344030?})
    /Users/REDACTED/go/pkg/mod/tailscale.com@v1.1.1-0.20221025201637-d60f7fe33f54/net/netns/netns_darwin_tailscaled.go:22 +0x46
net.(*netFD).dial(0xc000314280, {0x19a9ff8, 0xc000310180}, {0x19abc90, 0x0}, {0x19abc90?, 0xc00033e390}, 0xc00030c0d0)
    /usr/local/Cellar/go/1.19.2/libexec/src/net/sock_posix.go:128 +0x25f
net.socket({0x19a9ff8, 0xc000310180}, {0x1867259, 0x3}, 0x2, 0x1, 0x0?, 0x0?, {0x19abc90, 0x0}, ...)
    /usr/local/Cellar/go/1.19.2/libexec/src/net/sock_posix.go:70 +0x2b2
net.internetSocket({0x19a9ff8, 0xc000310180}, {0x1867259, 0x3}, {0x19abc90, 0x0}, {0x19abc90, 0xc00033e390}, 0x28?, 0x0, ...)
    /usr/local/Cellar/go/1.19.2/libexec/src/net/ipsock_posix.go:142 +0xf8
net.(*sysDialer).doDialTCP(0xc000340240, {0x19a9ff8, 0xc000310180}, 0x0, 0x1769260?)
    /usr/local/Cellar/go/1.19.2/libexec/src/net/tcpsock_posix.go:68 +0xa5
net.(*sysDialer).dialTCP(0x1e46303?, {0x19a9ff8?, 0xc000310180?}, 0xc000060570?, 0x106c416?)
    /usr/local/Cellar/go/1.19.2/libexec/src/net/tcpsock_posix.go:64 +0x69
net.(*sysDialer).dialSingle(0xc000340240, {0x19a9ff8, 0xc000310180}, {0x19a7170?, 0xc00033e390})
    /usr/local/Cellar/go/1.19.2/libexec/src/net/dial.go:582 +0x214
net.(*sysDialer).dialSerial(0xc000340240, {0x19a9ff8, 0xc000310180}, {0xc00030c150?, 0x1, 0x11c2845?})
    /usr/local/Cellar/go/1.19.2/libexec/src/net/dial.go:550 +0x312
net.(*sysDialer).dialParallel.func1({0x19a9ff8?, 0xc000310180?}, 0x1)
    /usr/local/Cellar/go/1.19.2/libexec/src/net/dial.go:470 +0x92
created by net.(*sysDialer).dialParallel
    /usr/local/Cellar/go/1.19.2/libexec/src/net/dial.go:485 +0x30a

From the non-App Store GUI version:

default 15:52:05.321124-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: ***
default 15:52:05.321150-0700    io.tailscale.ipn.macsys.network-extension   goSetupLogs: success (started with NaNM); version 1.32.1-t3444ebbd5-g7977e0008, go1.19.2-ts3fd24dee31
default 15:52:05.321171-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: *** Lines prefixed with RAW-STDERR below bypassed logtail and probably come from a previous run of the program
default 15:52:05.321466-0700    io.tailscale.ipn.macsys.network-extension   ^NaNM up=1666738325+0 Sys=14.2M HeapAlloc=0.6M HeapSys=3.6M HeapIdle=1.9M HeapInuse=1.7M HeapReleased=1.8M StackInuse=0.4M StackSys=0.4M MSpanInuse=0.0M MSpanSys=0.0M BuckHashSys=1.4M GCSys=7.8M OtherSys=0.9M NumGC=0 cpuU=25861000 cpuS=18798000 goroutines=4
default 15:52:05.321465-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: ***
default 15:52:05.321713-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:
default 15:52:05.321835-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: panic: runtime error: invalid memory address or nil pointer dereference
default 15:52:05.321966-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x10c78cbd7]
default 15:52:05.322124-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:
default 15:52:05.322340-0700    io.tailscale.ipn.macsys.network-extension   initSameUserProofToken: done=true
default 15:52:05.322314-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: goroutine 17 [running, locked to thread]:
default 15:52:05.322582-0700    io.tailscale.ipn.macsys.network-extension   setupLogs: logging configured: loaded
default 15:52:05.322587-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/net/interfaces.isDefaultGateway(0x6?)
default 15:52:05.322945-0700    io.tailscale.ipn.macsys.network-extension   cannot obtain app group ID from bundle
default 15:52:05.322761-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/net/interfaces/interfaces_bsd.go:131 +0x77
default 15:52:05.323169-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/net/interfaces.DefaultRouteInterfaceIndex()
default 15:52:05.323301-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/net/interfaces/interfaces_bsd.go:68 +0x14a
default 15:52:05.323415-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/net/interfaces.defaultRoute()
default 15:52:05.323522-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/net/interfaces/interfaces_bsd.go:27 +0x2f
default 15:52:05.323625-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/net/interfaces.DefaultRoute(...)
default 15:52:05.323724-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/net/interfaces/interfaces.go:724
default 15:52:05.323971-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/net/interfaces.GetState()
default 15:52:05.324074-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/net/interfaces/interfaces.go:523 +0xb9
default 15:52:05.324908-0700    io.tailscale.ipn.macsys.network-extension   startTunnel: interface name utun0
default 15:52:05.324475-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/wgengine/monitor.(*Mon).interfaceStateUncached(...)
default 15:52:05.325221-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/wgengine/monitor/monitor.go:122
default 15:52:05.325339-0700    io.tailscale.ipn.macsys.network-extension   runBackend called, tunFD=9, PreallocatedBuffersPerPool=0
default 15:52:05.325364-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/wgengine/monitor.New(0x10ce99658)
default 15:52:05.325665-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/wgengine/monitor/monitor.go:94 +0x18b
default 15:52:05.325784-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: tailscale.com/wgengine.NewUserspaceEngine(0x10ce99658, {{0x10ceab7d8, 0xc0001e8580}, 0x0, {0x10cea7600, 0xc000118690}, {0x10cea89b8, 0xc000118690}, 0x0, 0xc0001e6dd0, ...})
default 15:52:05.325916-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.com@v1.32.1/wgengine/userspace.go:320 +0x4da
default 15:52:05.326035-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: main.RunBackend(0x10c38c6e0, 0x9)
default 15:52:05.326220-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.io/xcode/ipn-go-bridge/ipn.go:462 +0x51f
default 15:52:05.326344-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR: main.goRunBackend(0x10c3a2df8?, 0x3a060?, {0x60000172a810?, 0xe?})
default 15:52:05.326517-0700    io.tailscale.ipn.macsys.network-extension   RAW-STDERR:     tailscale.io/xcode/ipn-go-bridge/export_cgo.go:48 +0x105

I believe this is caused by #5940 (cc @knyar)

Steps to reproduce

No response

Are there any recent changes that introduced the issue?

No response

OS

macOS

OS version

No response

Tailscale version

1.32.1

Bug report

No response

DentonGentry commented 2 years ago

macOS and iOS rollouts are currently paused, they got to something less than 3%.

andrew-d commented 2 years ago

macOS and iOS rollouts are currently paused, they got to something less than 3%.

Yes, though the binaries linked from pkgs.tailscale.com are the broken version (https://pkgs.tailscale.com/stable/#macos)