Tailscale on Synology crashing

I’m running the Tailscale 1.22.1 package on my Synology DS918+ with DSM 7, but Tailscale will run for a little while and then crash. I found the logs (at /var/packages/Tailscale/var in case you’re looking for them) and at the beginning of the latest “tailscaled.stdout.log” file I can see this:

logtail started
Program starting: v1.22.1-tc8fb4f8c7, Go 1.17.8-tsdce70b6d32: []string{"/volume2/@appstore/Tailscale/bin/tailscaled", "--state=/volume2/@appdata/Tailscale/tailscaled.state", "--socket=/volume2/@appdata/Tailscale/>
RAW-STDERR: ***
RAW-STDERR: *** Lines prefixed with RAW-STDERR below bypassed logtail and probably come from a previous run of the program
RAW-STDERR: ***
RAW-STDERR:
RAW-STDERR: panic: Incrementing non-positive count 0xc0000fe000 on stack.PacketBuffer
RAW-STDERR:
RAW-STDERR: goroutine 244 [running]:
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/stack.(*packetBufferRefs).IncRef(0xc0000fe000)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/stack/packet_buffer_refs.go:80 +0x105
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/transport/udp.(*endpoint).HandlePacket(0xc000576c00, {0xa2a9, {0xc0007325f0, 0x4}, 0xa2a9, {0xc0007325ec, 0x4}}, 0xc0000fe000)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/transport/udp/endpoint.go:924 +0x2ed
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/stack.(*endpointsByNIC).handlePacket(0xc000482f60, {0xa2a9, {0xc0007325f0, 0x4}, 0xa2a9, {0xc0007325ec, 0x4}}, 0xc0000fe000)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/stack/transport_demuxer.go:185 +0x27f
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/stack.(*transportDemuxer).deliverPacket(0xc00026e138, 0x11, 0xc0000fe000, {0xa2a9, {0xc0007325f0, 0x4}, 0xa2a9, {0xc0007325ec, 0x4}})
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/stack/transport_demuxer.go:595 +0x3c5
LogID: 0235ea33916bff2b15472d83569c63d2e63fad33ee2758c47bc07c91188aed72
logpolicy: using $STATE_DIRECTORY, "/volume2/@appdata/Tailscale"
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverTransportPacket(0xc00000a1e0, 0x11, 0xc0000fe000)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/stack/nic.go:861 +0x1fe
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).handleValidatedPacket(0xc0001a6e00, {0xc000618cc0, 0x14, 0x60}, 0xc0000fe380, {0x0, 0x0})
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/network/ipv4/ipv4.go:998 +0xfd6
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/network/ipv4.(*endpoint).HandlePacket(0xc0001a6e00, 0x88fb75)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/network/ipv4/ipv4.go:784 +0x2b8
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/stack.(*nic).DeliverNetworkPacket(0xc00000a1e0, {0xc00024dbf0, 0x1}, {0x0, 0x0}, 0x800, 0xc0000fe380)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/stack/nic.go:777 +0x2dd
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/link/channel.(*Endpoint).InjectLinkAddr(...)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/link/channel/channel.go:196
RAW-STDERR: gvisor.dev/gvisor/pkg/tcpip/link/channel.(*Endpoint).InjectInbound(...)
RAW-STDERR:     gvisor.dev/gvisor@v0.0.0-20220126021142-d8aa030b2591/pkg/tcpip/link/channel/channel.go:191
RAW-STDERR: tailscale.com/wgengine/netstack.(*Impl).injectInbound(0xc000138280, 0xc00052c080, 0xc0000c54a0)
RAW-STDERR:     tailscale.com/wgengine/netstack/netstack.go:577 +0x744
RAW-STDERR: tailscale.com/net/tstun.(*Wrapper).filterIn(0xc0004bc000, {0xc000870010, 0x54, 0xffef})
RAW-STDERR:     tailscale.com/net/tstun/wrap.go:614 +0x78d
RAW-STDERR: tailscale.com/net/tstun.(*Wrapper).Write(0xc0004bc000, {0xc000870000, 0xc000150500, 0x1}, 0x10)
RAW-STDERR:     tailscale.com/net/tstun/wrap.go:627 +0x7c
RAW-STDERR: golang.zx2c4.com/wireguard/device.(*Peer).RoutineSequentialReceiver(0xc000130e00)
RAW-STDERR:     golang.zx2c4.com/wireguard@v0.0.0-20211116201604-de7c702ace45/device/receive.go:477 +0x4d1
RAW-STDERR: created by golang.zx2c4.com/wireguard/device.(*Peer).Start
RAW-STDERR:     golang.zx2c4.com/wireguard@v0.0.0-20211116201604-de7c702ace45/device/peer.go:199 +0x295

Any ideas on what’s going on? How can I get my Tailscale package running stably here? Thanks!

1 Like

I’m in a similar situation (DS920+ with DSM 7) and Tailscale 1.22.1 will run fine for a week or two and then randomly stop a couple times over one weekend.

As an alternative to figuring out whatever the particular Synology/Tailscale issue is, I’d settle for finding out a way to automatically restart a stopped package.

That gave me an idea. It’s a band-aid, but will help until it gets fixed at least.

Go to Control Panel–>Task Scheduler–>Create–>Scheduled Task–>Service

On General tab give it any name you like. On Schedule, set it to run Daily and a Frequency of every hour. Finally on Task Settings tab set to Start Service–>Tailscale. So if it crashes it should be back up at the top of every hour.

2 Likes

Hello - if you can log in to the Synology via ssh and run tailscale bugreport and get the code that returns and the rough time that this happened. You can post that here or send it to support@tailscale.com

BUG-0235ea33916bff2b15472d83569c63d2e63fad33ee2758c47bc07c91188aed72-20220518201636Z-2d6bc25ce82deb19

I can’t give an exact time as I’m not currently using Tailscale frequently enough to notice when it goes down. But it seems like whenever I do want to, it’s down.

BUG-8387ccc6b35e2f355b4c9b1d2db6d0f559b4d7eca7fa39b00dc8c285b2e15576-20220525164711Z-32566ef0c7282afb

Today it disconnected at 7:57am PDT.

Back running after I restarted the package.

RAW-STDERR: panic: Incrementing non-positive count 0x400046ca80 on stack.PacketBuffer
RAW-STDERR:
Program starting: v1.22.2-t6f700925c, Go 1.17.8-tsdce70b6: string{“/volume1/@appstore/Tailscale/bin/tailscaled”, “–st
ate=/volume1/@appdata/Tailscale/tailscaled.state”, “–socket=/volume1/@appdata/Tailscale/tailscaled.sock”, "–port=41641
", “–tun=userspace-networking”}
RAW-STDERR: goroutine 378 [running]:

I just installed it on Synology D418j. It still keeps crashing. Hope it can be fixed someday.

It is a nice setup. i thought i can use it as a backup wireguard server. Guess the quality is not there yet.

Nevertheless, keep it up. i hope someday this can work as a universal VPN network.