Skip to content

iOS: traffic to an unreachable peer exhausts the 64-buffer WireGuard pool and stalls all peers and 100.100.100.100 for ~100 s #21773

Open

Description

@nickvikeras

What is the issue?

On iOS, sending packets to a peer that never completes a WireGuard handshake (offline, asleep, or otherwise unreachable) stalls the whole tunnel for about 100 s. While it lasts, no traffic flows to any peer, including healthy ones, and 100.100.100.100 stops answering. Then everything recovers by itself, and it happens again if the packets keep coming.

In my case an app on the phone retried a TCP connect to an offline peer about every 10 s. Every few minutes the SSH session to a different, healthy peer froze for roughly 100 s. From inside the stall, ICMP to the healthy peer and DNS queries to 100.100.100.100 both timed out. Over two weeks of app logs, 27 sessions were lost in 134 minutes connected while the app was retrying the offline peer, against 3 in 151 minutes while it was not.

The cause is in wireguard-go's buffer pool combined with the iOS limits in wgengine/wgcfg/mem_ios.go. This is from reading v1.104.1 and github.com/tailscale/wireguard-go@417aef361226, plus the reproduction below:

  1. mem_ios.go:20-26 sets WithQueueStagedSize(64) and WithPreallocatedBuffersPerPool(64). With a preallocation cap, smallPacketBufs aliases packetBufs (device/pools.go:110), so the TUN reader and every receive loop draw from one WaitPool of 64 buffers. WaitPool.Get blocks with no timeout when the pool is exhausted (pools.go:28-38).
  2. A packet to a peer with no current keypair goes into that peer's staged queue and keeps its buffer (device/send.go:456-479). SendStagedPackets then calls SendHandshakeInitiation(false) (send.go:488-491).
  3. SendHandshakeInitiation(false) resets handshakeAttempts to 0 before its RekeyTimeout rate limit check (send.go:164-173). As long as packets to the dead peer keep arriving more often than every ~90 s, expiredRetransmitHandshake never reaches MaxTimerHandshakes. FlushStagedPackets (timers.go:79-90) never runs, and the staged queue only grows.
  4. The staged queue would drop its oldest entry at 64 entries, but the pool runs out first: about 62 staged buffers, plus the TUN reader's own buffer, plus each receive loop's. RoutineReadFromTUN then blocks in getPacketBuf (send.go:360-368). That goroutine also runs tstun.Wrapper.Read, where quad-100 is intercepted (net/tstun/wrap.go:790-795), so quad-100 stops answering too. The receive loops block in getPacketBuf (receive.go:110-113) once they have handed off their buffer.
  5. Now nothing new reaches the dead peer's queue, so the attempt counter stops being reset. About 20 × (5 s + jitter) ≈ 100 s later the handshake gives up, FlushStagedPackets frees the buffers, and traffic resumes. Then the queue starts filling again.

The default (non-iOS) settings are not affected, because the pool is uncapped there.

Steps to reproduce

Add this test to device/ in tailscale/wireguard-go at 417aef361226 and run go test -run '^TestRepro' -v -timeout 20m ./device/. The three tests take about 10 minutes in total:

package device

import (
	"encoding/hex"
	"fmt"
	"net/netip"
	"os"
	"testing"
	"time"

	"github.com/tailscale/wireguard-go/tun/tuntest"
)

// The options from tailscale's wgengine/wgcfg/mem_ios.go.
func iosOptions() []Option {
	return []Option{
		WithQueueStagedSize(64),
		WithQueueOutboundSize(64),
		WithQueueInboundSize(64),
		WithQueueHandshakeSize(64),
		WithPreallocatedBuffersPerPool(64),
	}
}

// One packet every 1.5 s to a peer that never answers, and once a second a
// ping to a healthy peer, reported as healthy=true/false.
func runPoolRepro(t *testing.T, opts []Option, sendToDeadPeer bool, dur time.Duration) {
	pair := genTestPair(t, false, opts...)
	local, healthy := pair[0], pair[1]

	sk, _ := newPrivateKey()
	pk := sk.publicKey()
	if err := local.dev.IpcSet(uapiCfg(
		"public_key", hex.EncodeToString(pk[:]),
		"allowed_ip", "1.0.0.3/32",
		"endpoint", "127.0.0.1:99",
	)); err != nil {
		t.Fatal(err)
	}
	dead := local.dev.LookupPeer(pk)
	deadIP := netip.MustParseAddr("1.0.0.3")

	arrivals := make(chan time.Time, 1024)
	go func() {
		for range healthy.tun.Inbound {
			arrivals <- time.Now()
		}
	}()
	go func() {
		for range local.tun.Inbound {
		}
	}()
	poolInUse := func() uint32 {
		p := local.dev.pool.packetBufs
		p.lock.Lock()
		defer p.lock.Unlock()
		return p.count
	}

	start := time.Now()
	lastOK := true
	sent, blocked := 0, 0
	for sec := 0; time.Since(start) < dur; sec++ {
		if sendToDeadPeer && sec >= 5 && sec%3 != 2 {
			select {
			case local.tun.Outbound <- tuntest.Ping(deadIP, local.ip):
				sent++
			case <-time.After(200 * time.Millisecond):
				blocked++
			}
		}
		for len(arrivals) > 0 {
			<-arrivals
		}
		ok := false
		select {
		case local.tun.Outbound <- tuntest.Ping(healthy.ip, local.ip):
			select {
			case <-arrivals:
				ok = true
			case <-time.After(800 * time.Millisecond):
			}
		case <-time.After(800 * time.Millisecond):
		}
		if ok != lastOK || sec%15 == 0 {
			fmt.Fprintf(os.Stderr, "REPRO t=%v healthy=%v staged=%d pool_in_use=%d sent=%d blocked=%d attempts=%d\n",
				time.Since(start).Truncate(time.Second), ok, len(dead.queue.staged), poolInUse(),
				sent, blocked, dead.timers.handshakeAttempts.Load())
		}
		lastOK = ok
		if ok {
			time.Sleep(time.Until(start.Add(time.Duration(sec+1) * time.Second)))
		}
	}
}

func TestReproIOSPoolDeadPeer(t *testing.T)     { runPoolRepro(t, iosOptions(), true, 330*time.Second) }
func TestReproIOSPoolNoDeadPeer(t *testing.T)   { runPoolRepro(t, iosOptions(), false, 150*time.Second) }
func TestReproDefaultPoolDeadPeer(t *testing.T) { runPoolRepro(t, nil, true, 150*time.Second) }

Output with the iOS options (abridged):

REPRO t=1m30s healthy=true  staged=57 pool_in_use=60 sent=57 blocked=0  attempts=0
REPRO t=1m37s healthy=false staged=62 pool_in_use=64 sent=62 blocked=0  attempts=0
REPRO t=2m27s healthy=false staged=62 pool_in_use=64 sent=62 blocked=35 attempts=10
REPRO t=3m9s  healthy=false staged=62 pool_in_use=64 sent=62 blocked=65 attempts=18
DEBUG: dev0: ... peer(dXOL…2jxM) - Handshake did not complete after 20 attempts, giving up
REPRO t=3m17s healthy=true  staged=0  pool_in_use=3  sent=62 blocked=71 attempts=19
...
REPRO t=4m57s healthy=false staged=62 pool_in_use=64 sent=124 blocked=71 attempts=0

The healthy peer is unreachable from 1m37s to 3m17s, exactly 100 s, then it stalls again at 4m57s. The two controls pass: with the iOS options and no traffic to the dead peer, the healthy peer stays reachable for 150 s. With the default options and the dead peer, it also stays reachable, with 87 packets staged at the end.

Possible fixes, any one of which seems enough:

  • Make the staged queue smaller than the pool on iOS, or bound the total staged across peers, so staging can never take every buffer.
  • Don't reset handshakeAttempts on SendHandshakeInitiation calls that are rate-limited by RekeyTimeout, so the give-up and flush still happen while packets keep arriving.
  • Give the receive path its own pool (or a reserve), so a handshake response can still be read when the TUN side is exhausted.

Are there any recent changes that introduced the issue?

I saw this on 1.104.x. v1.102.4's wgengine/mem_ios.go set the same 64/64 values through package globals, so it is probably older than 1.104.

OS

iOS

OS version

iOS 27.0.1 (24A446), iPhone 17 Pro

Tailscale version

1.104.x (the node reports capability version 148)

Other software

An SSH client that retries unreachable hosts: anything that keeps sending to an offline peer triggers it.

Bug report

No response

Activity

  1. added
    connectivity
    OS-ios
    bug
    on Oct 13, 2026
  2. added theissue type on Oct 13, 2026
  3. mdbraber commented on Oct 15, 2026

    @mdbraber

    Mitigated this issue slightly by setting net.ipv4.tcp_retries2=6 on my Headscale container to have it drop unreachable hosts sooner

  4. serialx commented on Oct 17, 2026

    @serialx

    Hit this on iOS 27.0.1 (Tailscale 1.104.x) with a real app as the trigger. The numbers match your analysis closely.

    Trigger: Orca Mobile, which connects to a desktop app over the tailnet, had a saved host on a node that had been offline for 3 days. It retried that host indefinitely, with backoff capped at 15 s. Meanwhile, its session to a healthy macOS peer (direct LAN path) froze for about 100 s at a time, with 15 s to 4.5 min of normal traffic in between. Turning Tailscale off and then on restored it for a few minutes.

    What a 5 s probe from the macOS peer (1.104.1) showed during each freeze:

    • Each freeze lasted 96–100 s and ended without user action.
    • tailscale ping --tsmp failed first. Disco pings over the direct path kept answering for a few more seconds, then only via DERP, then not at all. Plain ICMP to the phone's LAN address kept answering throughout, so the phone's Wi-Fi and OS were fine.
    • The phone kept sending handshake initiations and disco over DERP, but never completed a handshake with the Mac.
    • On recovery, the first packets from the phone were stale: wg: Received invalid response message (a reply to an initiation the Mac had already superseded) and got TSMP pong … cb=false for a ping that had already timed out. That fits receive loops blocked in getPacketBuf and then draining their backlog.

    Bisection:

    • All apps closed: 0 failed probes out of 107 over 9 min, with clean rekeys every 2 min. Before that, the longest healthy run was 4.5 min.
    • Removed the offline host from the app: Orca stayed connected for 7 min with no drops, and 0 of 83 probes failed.

    Several of the iOS 27 "connected but no traffic; turning Tailscale off and on fixes it briefly" reports (#21387, comments on #21388) look like this. It may be worth asking those reporters whether something on the device keeps retrying an offline peer.

  5. mgalgs commented on Oct 19, 2026

    @mgalgs

    Possibly the same issue, or a close relative, on iOS 1.104.1 with a self-hosted headscale (v0.29.3) control server.

    Symptoms: two iPhones on 1.104.1, split tunnel (no exit node, split DNS only, no global resolvers). Intermittently, pages stall mid-load ("loading forever") on both Wi-Fi and cellular. Turning the VPN off makes the next page load at once. Toggling it back on works again for a while.

    Onset: it began overnight on one phone (2026-10-15 ~02:14 local, which looks like an App Store auto-update) and the next day on the other. Nothing on the server side changed in that window.

    What the subnet router sees: the subnet router (Linux, tailscaled) logs updating discoKey for <phone IP> via mapSession for each phone. Its journal goes back to August with zero of these before 10-15. Since then:

    day phone A phone B
    10-15 0 285
    10-16 339 191
    10-17 516 430
    10-18 362 329

    So the phones' network extension appears to restart every few minutes, and each restart changes its disco key.

    Tailnet: ~12 nodes. Several peers visible to the phones were offline or expired (a laptop that only runs Tailscale when away from home, another iPhone offline for two weeks, one expired node). This matches the unreachable-peer trigger described above, but I could not see what the phones were sending to them. I have deleted the expired node and will report back on whether the stalls continue.

    Bug report from phone A (iOS 1.104.1): BUG-338a005ec7d3d75ef05a7c7677341495c10ae1a6afe0c55e024ed7d1b048ebdf-20261019021726Z-5832ae9b3b3bcae1

  6. serialx commented on Oct 19, 2026

    @serialx

    Following up on my earlier measurements: the v1.104.1 source is consistent with @nickvikeras’s diagnosis.

    The relevant configuration is in wgengine/wgcfg/mem_ios.go: both the per-peer staged queue and the shared buffer pool are limited to 64. In device/pools.go, WaitPool.Get() blocks when that limit is reached. This explains how packets waiting for an unreachable peer can prevent unrelated traffic from progressing.

    The non-iOS configuration does not impose this pool cap, which is consistent with the original report’s passing control test using default options. In my case, the healthy macOS peer losing contact with the phone is therefore consistent with the stall being on the iOS side.

    There is also an existing comment immediately above the iOS settings about eliminating the WaitPool ceiling, referencing tailscale/corp#46396. Could a maintainer check whether that work covers this reproduction?

    Any mitigation based on reducing the per-peer staged queue should also be tested with multiple unreachable peers: their combined staged packets could still exhaust the shared pool.

  7. serialx commented on Oct 19, 2026

    @serialx

    @jwhited, could you take a look at this? Your August 31 change added the comment in mem_ios.go about eliminating the WaitPool ceiling, referencing tailscale/corp#46396.

    The original report includes a standalone reproduction where traffic to one unreachable peer exhausts the shared pool and stalls healthy peers and Quad100. My earlier comment documents matching 96–100-second stalls on an iPhone; removing the offline host from the app stopped them.

    Does this reproduction fall under corp#46396, and is there a preferred direction for a fix?

  8. felixlunzenfichter commented on Oct 20, 2026

    @felixlunzenfichter

    Another data point that looks like this bug, from an iPhone (iOS 26.6) whose Tailscale app updated on Oct 13, presumably to 1.104.1. The Mac it talks to runs 1.102.3.

    Setup: an app on the phone keeps several TCP connections to one Mac peer on the same LAN. It reconnects every 2–4 s when they drop, and it opens a short-lived TCP connection for each log line, so it sends a steady stream of SYNs to that peer.

    What happened, twice in one day (Oct 20):

    1. The phone left Wi-Fi ("all links down; pausing") and later rejoined the same LAN.
    2. Back on Wi-Fi, the phone stayed connected to DERP and disco reported a direct path to the Mac (now using 192.168.x.x:41641). Every TCP connect to the Mac still timed out: open-conn-track: timeout opening (TCP … => <mac>:9998) to node [...]; online=yes, lastRecv=58m0s.
    3. Within a few seconds to a minute of the app's retries, the phone logged health(warnable=magicsock-receive-func-error): error: The MagicSock function ReceiveIPv4 is not running (once ReceiveDERP is not running). That matches the receive loops blocking in getPacketBuf described above.
    4. In the morning the app retried for 3–4 minutes with no recovery, then again for ~3 minutes after a Mac reboot. That second time, the phone recovered within seconds of the Mac sending traffic to it (tailscale ping, then ICMP), and the receive-func-error warning cleared about a minute later. In the afternoon the stall lasted ~85 s before the Mac's ping, so it can't be told apart from the ~100 s self-recovery you describe.

    On the Mac side during the morning stall, the peer showed as idle with ~100 B tx / 148 B rx, so the phone's SYNs weren't reaching the Mac.

    An iPad on the same LAN, which never leaves Wi-Fi, was unaffected throughout.

    Workaround we're using: a Mac-side job that runs tailscale ping and an ICMP ping to the phone every 30 s.

  9. SunflowersLwtech commented on Oct 21, 2026

    @SunflowersLwtech

    Another data point, from devices that use an exit node, and a proposed fix: tailscale/wireguard-go#111.

    What we saw. An iPhone 15 Pro Max on Tailscale 1.104.1 uses an exit node, a Linux box behind double NAT, so away from home the phone reaches it through DERP. On Oct 21 at about 05:10 UTC the phone changed networks, and from then until the VPN was toggled at about 06:00 UTC it had no connectivity through Tailscale:

    • tailscale ping to the phone from the exit node and from another node timed out.
    • On the exit node, tailscale status showed the phone as active; relay "tok", tx 13416 rx 0, and later relay "hkg" with tx growing and rx stuck at 2960.
    • The phone's Warnings screen showed "The MagicSock function ReceiveDERP is not running".
    • Turning the exit node off in the app at 05:54 did not bring the tunnel back. Toggling the VPN in iOS Settings at about 06:00 did, at once, with a direct path at 8 ms.

    An iPad on 1.104.1, also using the exit node, stopped answering pings the same way later that day and came back after a VPN toggle. So with an exit node the stall did not end after about 100 s; on the phone it lasted about 50 minutes, until the VPN was toggled.

    The ReceiveDERP warning fits the analysis above. health.ReceiveFuncStats reports a receive func as not running when wireguard-go has not called it since the last check and is not inside it, which is what a receive goroutine waiting in WaitPool.Get looks like. We have no goroutine dump from the phone, so that part is circumstantial; the end-to-end run below shows the same state.

    Why an exit node makes it worse. All of the device's traffic is for the exit node, and traffic keeps coming back once it is reachable again. In a model of this on the unfixed code (exit node cut off for 210 s, 100 ms one-way latency, 100 packets/s out and 50 back), traffic with the exit node came back 1m17s and 4m46s after the link returned in two of six runs, and not within 10 minutes in the other four. In the stalled runs we logged, the handshake attempt count stopped moving, so the ~90 s give-up never came. With the fix, traffic was back within 10 s in every run.

    End to end with real tailscaled (three daemons on one Linux host with the integration test control server; a local patch applies the mem_ios.go options on Linux, and the phone ended up on DERP only): with the exit node frozen for 200 s and then resumed, the unfixed build lost a healthy peer as soon as the session with the exit node expired, and reached neither the exit node nor the healthy peer again in the following 5 minutes, with its TUN reader and DERP receive goroutine both in WaitPool.Get. With the fix, the healthy peer was never lost and the exit node answered again 7 s after it resumed.

    The fix limits the packets staged across all peers to half of the pool when the pool is bounded, dropping the oldest staged packets of the peers with the most staged. As noted above, a smaller staged queue per peer is not enough on its own: with 16 per peer, four unreachable peers still stall. The PR has the tests, raw output and a mutation table. iOS would pick it up with a wireguard-go bump.

  10. piercecohen1 commented on Oct 24, 2026

    @piercecohen1

    Another data point that fits this one, seen from the server side.

    The iPhone runs iOS 27.0.1. The peer it uses all day is a Linux server on 1.104.1. A second peer, a macOS laptop on the same tailnet, is often asleep or offline. Most likely an app on the phone that is paired with both machines keeps retrying the laptop while it's away, though I haven't confirmed which app.

    Over the past week, in hours when the phone was active and the laptop was offline, the phone's connection to the server stalled in 13 of 34 hours. In hours when the laptop was online, it stalled in 1 of 43. The stalls happened on cellular, on two different Wi-Fi networks, and once on the server's own LAN, so they follow the phone rather than a network.

    Last night's episode from the server's log (server clock):

    • The direct path to the phone was re-established at 23:20:39, 23:22:21, 23:24:04 and 23:25:49. That is a cycle of about 100 to 105 s, which matches the stall length described here.
    • Between those points the server kept receiving disco pings from the phone over DERP about every 6 s (magicsock: new contact: peer=[…] cached=false via=derp) but no data. Both tailscale ping and tailscale ping --tsmp from the server to the phone timed out during a stall.
    • When the path came back, several TCP SYNs that the phone had sent to the server's Serve port arrived together, long after the app on the phone had given up, and were refused (CreateEndpoint error for <phone>:<port> -> <server>:443: connection was refused).
    • The phone's disco key stayed the same all evening, so the network extension was not restarting.
    • The server logged no link changes and no DERP errors in that window, and its kernel showed no UDP receive-buffer drops.

    The laptop came back online at 00:22 and the server log has shown no stall from the phone since.

    Server-side bug report: BUG-69a6d27e0dfb4a4884ab017275903e1a6591648af53022580c39bc3e4ddfdacf-20261024032900Z-6b793f0b8e70aa25

  11. luben93 commented on Oct 30, 2026

    @luben93

    Another data point, with a client-side mitigation. My setup matches the ones above: an iPhone with Orca Mobile paired with a normally-up Linux host and a normally-offline Mac. The connection to the healthy host stalls mid-stream and I recover by toggling Tailscale; I have not yet timed whether it would clear on its own after about 100 s.

    The Orca side is tracked in stablyai/orca#13354 (iOS: Orca mobile disconnects when backgrounded over Tailscale). A draft PR in Orca reduces how often the app dials a host that has never connected in the session (no backoff reset on every foreground, a 5 minute retry, nothing while backgrounded): stablyai/orca#36352. That only lowers the traffic that triggers this; it does not fix the pool exhaustion.

    Also, to avoid confusion: I opened #22084 for a different theory (the receive routine ending after a UDP read error). In light of this issue I am not claiming it fixes these stalls. The "ReceiveIPv4 is not running" warning may simply be what the health check reports when the receive loops are blocked on the exhausted pool.

  12. lucastraba commented on Nov 4, 2026

    @lucastraba

    One more confirmed trigger: T3 Code's iOS app (2.0.0; iOS 27.0, Tailscale 1.104.4), paired with an always-on Linux server and a MacBook that is often asleep. It is the same pattern as the Orca and "app paired with both machines" reports above.

    Seen from the Linux server (1.104.2) while the Mac was offline:

    • magicsock: new contact: peer=[<phone>] … via=derp about every 3 s, with no data getting through.
    • Then peer [<phone>] disco key changed, every 2–3 minutes at the worst (7 times in under an hour).
    • Throughout, derp-N does not know about peer [<mac>].

    In the week before, nearly every hour with these restarts fell in a stretch when the Mac was offline.

    Confirmation: switching the Mac environment off in the app (no other change) stopped it at once: no restarts in the next 17 minutes of heavy use. Over the next 9 days, with the Mac offline in 165 hours and the environment kept off, there were 2 restarts.

    One detail that may matter: the phone's disco key changed with each stall, unlike in the server-side report above. I didn't record whether that was the extension restarting by itself or a manual toggle.

    App side: pingdotgg/t3code#11236, pingdotgg/t3code#24064.

  13. 2 remaining items

  14. self-assigned this
    on Nov 11, 2026
  15. jwhited commented on Nov 12, 2026

    @jwhited
    Member

    Thanks for the detailed reports! Tailscale v1.105.251 (a7befef) addresses an issue with the staged packet queue in wireguard-go that can lead to communications deadlock on iOS, AppleTV, and Android platforms. If you’re able to test v1.105.251 or later from our unstable track via TestFlight, we’d appreciate hearing whether it resolves the issue for you.

  16. bytesapart commented on Nov 13, 2026

    @bytesapart

    Thanks to everyone who's contributed to resolving this issue. I've tried the TestFlight version, and, at least for me, on iOS with Orca app, I'm no longer getting disconnects.

  17. MrSco commented on Nov 14, 2026

    @MrSco

    iOS 27.2, Tailscale 1.104.6. Same trigger: the T3 Code iOS app retries an offline peer (port 3773) about every 5s, and the tunnel and DNS freeze until I toggle the VPN.

    BUG-7023fceba7313cc8ab2ee54468d619eb89dcab14b6c09578eb3b9333436106e9-20261114112703Z-2548c784537a859d

  18. luben93 commented on Nov 14, 2026

    @luben93

    On Tailscale Version: 1.105.251 (101.105.251)
    The issue have not come up again using orca and an online Linux host and offline Mac host (I have also updated the router settings to allow for Tailscale direct on local connections but that did not seem to solve the issue )

  19. pcc0x commented on Nov 24, 2026

    @pcc0x

    Test result for 1.105.368 (TestFlight), compared with 1.104.7 (App Store). One iPhone, its tunnel over mobile data.

    Trigger: I cut the home internet, so every home node went offline, including the tailnet's only two DNS servers (home resolvers on tailnet addresses, "Override local DNS" on). The phone kept an SSH session by tailnet IP to a node with its own uplink, and I watched that node's side every 10 to 20 s.

    1.104.7:

    • "Use Tailscale DNS settings" on: the tunnel stalled 35 to 120 s after each connect, 5 of 5 runs. On the far node, bytes from the phone stayed flat while bytes to it kept rising, and the phone reached it only via DERP (new contact ... via derp about every 3 s).
    • Setting off, nothing on the phone talking to the home nodes: 3 of 3 sessions clean for 5 minutes.
    • Setting off, with an app retrying an offline home node: stalled about 40 s after the app opened (1 run).
    • Turning the VPN off and on in the app restored traffic; force-quitting the app did not restart the tunnel.

    1.105.368, same setup, home offline for 45 minutes:

    • Setting on: 2 of 2 sessions clean for 5 minutes.
    • Setting off, with the same app failing against the offline node: 2 of 2 clean.
    • Twice a session dropped while the SSH app was in the background (once before the first case, once inside the second setting-off session, which reconnected in one tap and ran clean). Both times the far node kept a direct path with traffic both ways, so I read those as iOS suspending the app, not this bug.

    So 1.105.368 fixes it for me. Small sample: one phone, 2 sessions per case.

    Bug report from 1.104.7 (setting on): BUG-e35c4508d54e10ce950e72041e5307dcc3d37ed86da4a36bb846aa76fc38e0cc-20261122101608Z-92b5494fc39c9288

  20. Clarit7 commented on Nov 25, 2026

    @Clarit7

    Another data point that fits this: iOS 27.2.1, Tailscale 1.104.7 (App Store), on cellular. The peer is Windows 11, also on 1.104.7.

    Bug report from the iPhone, taken while the tunnel was stuck and before toggling:
    BUG-02a3e9d444a054b2802db87c65d89a7596e9d25a1b51a418a7ed0eefbf0a1ca1-20261125145046Z-8d5ff8034844f592

    Trigger. The iPhone runs remote-agent apps (Paseo, and earlier Orca) that keep several hosts registered. Some of those hosts are usually offline tailnet nodes: a WSL Linux node and a Mac that is normally powered off. Only these apps showed the stalls. Reopening the app never recovered it; toggling the VPN always did, and the stall often came back within minutes.

    Timeline from the Windows peer, 2026-11-25 UTC. The peer ran tailscale ping -c 3 --timeout 5s to the phone every 30 s. The app was in the foreground with the screen on.

    UTC Result
    14:44:59 direct 29 ms
    14:45:29 direct failed, DERP only (89 to 130 ms)
    14:45:59 to 14:51:00 no reply, apart from two isolated direct pongs at 1.38 s and 2.1 s

    The phone's ordinary internet kept working. The app fell back to its own non-Tailscale relay about 15 s after the tailnet connection dropped.

    Peer side (tailscaled log). The direct endpoint kept being re-confirmed (magicsock: disco: node [...] now using <phone>:41641), and the endpoint did not change. WireGuard handshake messages from the phone were rejected:

    14:44:45 wg: [v2] Received invalid initiation message from <phone nodekey>
    14:47:05 wg: [v2] Received invalid response message from <phone nodekey>   (x3)
    14:48:49 wg: [v2] Received invalid response message from <phone nodekey>
    14:49:12 CreateEndpoint error for <phone>:56333 -> <peer>:443: operation timed out
    14:50:32 wg: [v2] Received invalid response message from <phone nodekey>
    14:52:37 wg: [v2] Received invalid initiation message from <phone nodekey>
    

    Over the whole day the Windows peer logged 54 invalid initiation and response messages from the phone. They came in clusters at the times the stalls were noticed. It logged none from any other peer, including a macOS client that was online all day.

    In one 20 s window during the stall, peer stats for the phone showed rx +592 bytes (4 x 148, the size of a handshake initiation) and tx +400 bytes. That fits the phone repeatedly initiating handshakes without ever finishing one.

    Configuring the Windows peer as a peer relay made no difference. The data plane on the phone stops while the path itself still works.

    I'll try 1.105.x from TestFlight and report back whether the stalls stop.

  21. Clarit7 commented on Nov 25, 2026

    @Clarit7

    Follow-up to my earlier comment: the 1.105.x TestFlight build looks like it fixes this for me.

    Same setup: iPhone on cellular with iOS 27.2.1, the Windows 11 peer on 1.104.7, and the same app with offline hosts still registered. The Windows peer ran tailscale ping to the phone every 30 s.

    • 1.104.7 (App Store): the app connected, and about a minute later the tunnel stalled. The peer logged invalid handshake messages from the phone, and only a VPN toggle recovered it.
    • 1.105.x (TestFlight): after installing and reconnecting, the path stayed direct (16 to 60 ms) for over 15 minutes. That included a change of the phone's source port (41641 to 39341), the screen being off for a long stretch, and resumes. The app reconnected over the tailnet every time, with no toggle needed.

    One observation in case it's relevant: on 1.105.x there was a single 5-minute window (2026-11-25 15:12 to 15:17 UTC) where the phone did not answer pings from the peer, even with the Tailscale app open on screen. It recovered by itself as soon as the phone opened a new outbound connection. I haven't seen it again, and it didn't affect use.

  22. Nelglor commented on Nov 26, 2026

    @Nelglor

    Note

    🤖 Claude Fable 5.2 responding on behalf of Nick

    Another stall that fits this issue, with a bug report taken on the iPhone while it was stuck. The peer's log shows the roughly 100 s cycle from the original report.

    • iPhone, taken during the stall, before toggling: BUG-136e6c85ad63c658481bafb25b2f30b5a73d69fbd9f0960dff0062e1eebf77ff-20261126211005Z-1cd3f520eba85bee
    • Linux peer (tailscaled 1.104.5), same stall: BUG-8d58705bcc0292da7fedf5537a88bc1c96f700e07fba3125cae0fc1f5fe132e8-20261126210426Z-7d5b9b993b8bb15e

    Setup

    • Tailscale iOS 1.104.7 from the App Store. That was read off the About screen on 2026-11-23 and not rechecked today.
    • The phone was on Wi-Fi away from home. Its endpoint did not change during the stall.
    • Tailnet DNS is two resolvers on tailnet addresses, with "Override local DNS" on.
    • The phone runs a remote-agent app with several tailnet hosts saved. Two nodes on the tailnet were offline at the time. I have not confirmed that the app was dialing those two.

    Timeline, 2026-11-26 UTC, from the Linux peer's tailscaled log

    UTC Peer's view of the iPhone
    21:01:17 to 21:03:53 direct path, last handshake 21:02:10
    21:02:48 the app on the phone connects to a second peer over the tailnet
    21:04:10 to 21:05:33 new contact ... via=derp about every 5 s, tailscale ping times out 3/3
    21:05:38 one direct contact
    21:05:52 to 21:07:11 DERP only
    21:07:16 one direct contact
    21:07:33 to 21:08:54 DERP only, tailscale ping times out 3/3
    21:08:59 one direct contact
    21:09:13 to 21:10:38 DERP only
    21:10:38 direct contact
    21:10:46 VPN toggled on the phone (disco key change), direct again within 1 s

    The direct contacts are 98, 103 and 99 s apart. The second peer's last handshake with the phone was 21:02:47, with none after it until the toggle, and its pings timed out as well.

    On the phone. At 21:09 the Warnings screen showed only this, with no MagicSock warning:

    DNS Unavailable
    Tailscale can't reach the configured DNS servers. Internet connectivity may be affected.
    Code: dns-forward-failing
    

    Both resolvers were up and answering other nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

OS-iosbugconnectivity

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions