macOS TCP Stack Breaks After Exactly 49.7 Days of Uptime Due to 32-bit Timestamp Overflow

DanielLockyer · x · 2026-11-17

The Photon team, while building an iMessage API for AI agents on Mac-backed systems, discovered that macOS machines running continuously for 49.7 days stop accepting new TCP connections — while ping and existing connections appear normal. They reproduced it on two machines and traced the root cause to XNU's handling of a 32-bit TCP timestamp counter wrapping around (2^32 ms ≈ 49.7 days).

Real-world symptoms vary: uploads larger than 4MB failing, and Claude sessions hanging seemingly at random. The fix is simply rebooting the machine. Their engineering blog walks through the discovery, reproduction, and the kernel code path behind the bug — a warning for anyone running long-lived Mac servers for agent infrastructure.

Original post →

More from Fun

Fun channel →