tailscale icon indicating copy to clipboard operation
tailscale copied to clipboard

FreeBSD update attempts cause frequent restarts

Open eric-eisenhart opened this issue 3 weeks ago • 1 comments

What is the issue?

It looks like when there's an update to tailscale available for FreeBSD, the FreeBSD update check restarts tailscaled every few hours until that update happens via the nearest mirror. (I'm unclear how tailscaled is doing these update checks)

uname:

FreeBSD [redacted] 15.0-RELEASE FreeBSD 15.0-RELEASE releng/15.0-n280995-7aedc8de6446 GENERIC amd64

/etc/os-release

NAME=FreeBSD
VERSION="15.0-RELEASE"
VERSION_ID="15.0"
ID=freebsd
ANSI_COLOR="0;31"
PRETTY_NAME="FreeBSD 15.0-RELEASE"
CPE_NAME="cpe:/o:freebsd:freebsd:15.0"
HOME_URL="https://FreeBSD.org/"
BUG_REPORT_URL="https://bugs.FreeBSD.org/"

(I believe we also saw same on FreeBSD 14; this was just the OS release of the 2 I was digging into the issue on)

We were periodically seeing log entries like these every few hours for days in a row, and then weeks without seeing anything like it:

kernel: tailscale0: link state changed to DOWN
kernel: tun0: link state changed to UP
kernel: tun0: changing name to 'tailscale0'

And this shows same time as those messages in /var/log/messages:

# ps auxw | grep tailscaled
root    84104   0.0  0.0   14188  2928  -  Is   15:11      0:00.00 daemon: tailscaled[84105] (daemon)
root    84105   0.0  0.5 1277828 37928  -  I    15:11      0:02.52 /usr/local/bin/tailscaled -port 41641 -tun tailscale0 -statedir 

I did

tailscale debug component-logs --for 48h magicsock
tailscale debug component-logs --for 48h syspolicy
tailscale debug daemon-logs

And saw this at approx same time as those same 3 things showed up in /var/log/messages:

c2n: GET /update received
c2n: POST /update received
c2n: running "/usr/local/bin/tailscale update --yes"
tailscaled got signal terminated; shutting down
canceling captive portal context
control: client.Shutdown ...

So, I tried: pkg update ; pkg upgrade and had no updates.

Then tried this:

# tailscale update --dry-run
Current: 1.88.3, Latest: 1.88.3_1

# tailscale update --yes
Updating Tailscale from 1.88.3 to 1.88.3_1; --yes given, continuing without prompts.
Updating FreeBSD-ports repository catalogue...
FreeBSD-ports repository is up to date.
Updating FreeBSD-ports-kmods repository catalogue...
FreeBSD-ports-kmods repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
Your packages are up to date.

# tailscale update --dry-run
Current: 1.88.3, Latest: 1.88.3_1

I also tried pkg --debug update --force ; pkg upgrade in case the system was caching outdated info and still no updates.

Looks like I'm getting the Chicago, US mirror on this server, but we saw same behaviors with a server that uses the palo alto mirror.

# host pkg.freebsd.org
pkg.freebsd.org is an alias for pkgmir.geo.freebsd.org.
pkgmir.geo.freebsd.org has address 173.228.147.98
pkgmir.geo.freebsd.org has IPv6 address 2610:1c0:1040:606c::50:1
pkgmir.geo.FreeBSD.org mail is handled by 0 .
_[/root/eric.eisenhart]_([email protected])_
# host 173.228.147.98
98.147.228.173.in-addr.arpa domain name pointer pkg0.chi.freebsd.org.
_[/root/eric.eisenhart]_([email protected])_
# host 2610:1c0:1040:606c::50:1
1.0.0.0.0.5.0.0.0.0.0.0.0.0.0.0.c.6.0.6.0.4.0.1.0.c.1.0.0.1.6.2.ip6.arpa domain name pointer pkg0.chi.freebsd.org.

Steps to reproduce

  1. FreeBSD 15 (or 14?) server
  2. tailscale installed, tailscaled running, connected to a tailnet, etc
  3. tailscale set --auto-update (I believe that's default that we didn't change)
  4. Wait for a tailscale update, but don't have that available on the local pkg.freebsd.org mirror yet.
  5. Watch for the tailscale0 interface going down and/or tailscaled restarting.

Are there any recent changes that introduced the issue?

Not on our side that I am aware of

OS

Other

OS version

FreeBSD 15

Tailscale version

1.88.3

Other software

No response

Bug report

BUG-c4b7e8d821d5bed273f98bda1555f56b0b6ca32b25613447e5357992d2c5b71c-20251204234751Z-7af2708cb5bea5c7

eric-eisenhart avatar Dec 04 '25 23:12 eric-eisenhart

I assume the issue can be avoided with tailscale set --auto-update=false, but I haven't tested that mitigation long enough to consider that mitigation verified.

eric-eisenhart avatar Dec 04 '25 23:12 eric-eisenhart