{"code":"var Component=(()=>{var k=Object.create;var h=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var u=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var m=(s,e)=>()=>(e||s((e={exports:{}}).exports,e),e.exports),E=(s,e)=>{for(var n in e)h(s,n,{get:e[n],enumerable:!0})},l=(s,e,n,a)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let t of g(e))!y.call(s,t)&&t!==n&&h(s,t,{get:()=>e[t],enumerable:!(a=p(e,t))||a.enumerable});return s};var f=(s,e,n)=>(n=s!=null?k(u(s)):{},l(e||!s||!s.__esModule?h(n,\"default\",{value:s,enumerable:!0}):n,s)),b=s=>l(h({},\"__esModule\",{value:!0}),s);var d=m((v,r)=>{r.exports=_jsx_runtime});var F={};E(F,{default:()=>o});var i=f(d());function c(s){let e={a:\"a\",code:\"code\",h2:\"h2\",h3:\"h3\",img:\"img\",li:\"li\",ol:\"ol\",p:\"p\",pre:\"pre\",span:\"span\",strong:\"strong\",table:\"table\",tbody:\"tbody\",td:\"td\",th:\"th\",thead:\"thead\",tr:\"tr\",ul:\"ul\",...s.components};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(e.p,{children:\"In early 2026, an independent security researcher known as Photon published a detailed analysis on their blog (photon.codes) that sent shockwaves through the macOS community: a bug lurking deep inside Apple's XNU kernel silently kills every new TCP connection on any Mac that has been running for exactly 49.7 days without a reboot. No warning dialog. No error message. Your Mac simply stops connecting to the internet, to local network shares, to everything that relies on TCP -- and the only fix is a full restart. The discovery was subsequently covered by Tom's Hardware, analyzed in depth by TidBITS, and debated across Reddit, MacRumors forums, and Hacker News, generating thousands of comments and considerable alarm. This article provides a comprehensive guide to understanding the bug, determining whether you are affected, protecting yourself immediately, and what Apple is doing about it.\"}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:\"macOS 49-Day TCP Bug Network Death Timer\",src:\"/images/blog/macos-tahoe-49-day-tcp-bug-network-fix-guide-2026/hero.webp\",width:\"2848\",height:\"1504\"})}),`\n`,(0,i.jsx)(e.h2,{id:\"key-takeaways\",children:\"Key Takeaways\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsx)(e.li,{children:(0,i.jsx)(e.strong,{children:\"A critical integer overflow bug in the macOS XNU kernel causes all new TCP connections to silently fail after approximately 49.7 days (49 days, 17 hours, 2 minutes, and 47 seconds) of continuous uptime.\"})}),`\n`,(0,i.jsx)(e.li,{children:(0,i.jsx)(e.strong,{children:\"The bug cannot be resolved by toggling Wi-Fi, resetting network settings, or restarting individual applications -- only a full system reboot restores network connectivity.\"})}),`\n`,(0,i.jsx)(e.li,{children:(0,i.jsx)(e.strong,{children:\"Users most at risk include those running Mac minis as servers, always-on development machines, media servers, home automation hubs, and any Mac that is rarely restarted.\"})}),`\n`,(0,i.jsx)(e.li,{children:(0,i.jsx)(e.strong,{children:\"Apple is expected to ship a fix in macOS 26.5, currently in beta 2, but no patch exists for current production releases.\"})}),`\n`,(0,i.jsx)(e.li,{children:(0,i.jsx)(e.strong,{children:\"You can protect yourself immediately by checking your uptime with a simple Terminal command and scheduling periodic restarts well before the 49-day threshold.\"})}),`\n`]}),`\n`,(0,i.jsx)(e.h2,{id:\"what-is-the-49-day-tcp-bug\",children:\"What Is the 49-Day TCP Bug?\"}),`\n`,(0,i.jsx)(e.p,{children:\"The 49-day TCP bug is a software defect in Apple's XNU kernel -- the core operating system kernel that underpins macOS, iOS, iPadOS, and all other Apple platforms. The bug was discovered through careful analysis of the XNU source code (which Apple publishes as open source) by Photon, who traced a mysterious pattern of network failures on long-running Macs to a specific comparison operation in the kernel's TCP stack.\"}),`\n`,(0,i.jsx)(e.p,{children:\"At its core, the bug is an integer overflow. The XNU kernel maintains an internal timer that tracks system uptime in milliseconds using a 32-bit unsigned integer (uint32_t). A 32-bit unsigned integer can hold a maximum value of 4,294,967,295. When you convert that number of milliseconds into days, you get approximately 49.71 days:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M 6,1 C 4.354992,1 3,2.354992 3,4 v 16 c 0,1.645008 1.354992,3 3,3 h 12 c 1.645008,0 3,-1.354992 3,-3 V 8 7 A 1.0001,1.0001 0 0 0 20.707031,6.2929687 l -5,-5 A 1.0001,1.0001 0 0 0 15,1 h -1 z m 0,2 h 7 v 3 c 0,1.645008 1.354992,3 3,3 h 3 v 11 c 0,0.564129 -0.435871,1 -1,1 H 6 C 5.4358712,21 5,20.564129 5,20 V 4 C 5,3.4358712 5.4358712,3 6,3 Z M 15,3.4140625 18.585937,7 H 16 C 15.435871,7 15,6.5641288 15,6 Z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"4,294,967,295 milliseconds\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"= 4,294,967.295 seconds\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"= 71,582.788 minutes\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"= 1,193.046 hours\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"= 49.71 days\"})})]})})}),`\n`,(0,i.jsx)(e.p,{children:\"After this threshold, the timer value wraps around from its maximum value back to zero. This is not unusual in computing -- timer wraps are a well-understood phenomenon, and robust code is written to handle them. However, the TCP stack in XNU contains a comparison operation that does not correctly handle this wraparound. When the timer overflows, the comparison produces incorrect results, causing the kernel to believe that every new TCP connection's timing parameters are invalid. The kernel silently drops all new TCP connection attempts as a result.\"}),`\n`,(0,i.jsx)(e.p,{children:\"Critically, existing TCP connections that were established before the overflow may continue to function for a time (since they have already completed the handshake process), but any new connection -- opening a new web page, starting a new SSH session, connecting to an API, checking email -- will fail. Over a short period after the overflow, even existing connections will time out and fail as well, leaving the Mac completely unable to communicate over TCP.\"}),`\n`,(0,i.jsx)(e.p,{children:'The bug affects the TCP protocol layer specifically. Other network protocols that do not rely on TCP (such as basic ICMP ping) may continue to function, which can make the problem particularly confusing to diagnose: your Mac appears to be \"connected\" to the network, it may even respond to ping, but no application-level network communication works.'}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:\"XNU Kernel TCP Integer Overflow Diagram\",src:\"/images/blog/macos-tahoe-49-day-tcp-bug-network-fix-guide-2026/content-1.webp\",width:\"2752\",height:\"1536\"})}),`\n`,(0,i.jsx)(e.h2,{id:\"how-does-it-affect-your-mac\",children:\"How Does It Affect Your Mac?\"}),`\n`,(0,i.jsx)(e.p,{children:\"The practical impact of the 49-day TCP bug depends entirely on one factor: how long your Mac runs between restarts. If you reboot, restart, or shut down your Mac at least once every 49 days, you will never encounter this bug. The timer resets to zero on every boot.\"}),`\n`,(0,i.jsx)(e.p,{children:\"As TidBITS noted in their analysis of the issue, most ordinary Mac users are unlikely to be affected. Software updates from Apple typically require a restart, and many users shut down or restart their Macs at least once a week. For these users, the bug is essentially invisible.\"}),`\n`,(0,i.jsx)(e.p,{children:\"However, there are significant categories of Mac users for whom this bug is a serious operational risk:\"}),`\n`,(0,i.jsx)(e.h3,{id:\"mac-mini-servers-and-headless-macs\",children:\"Mac Mini Servers and Headless Macs\"}),`\n`,(0,i.jsx)(e.p,{children:\"The Mac mini has become increasingly popular as a compact, energy-efficient server. Users deploy Mac minis as web servers, CI/CD build servers, media servers (running Plex or Jellyfin), home automation controllers, and remote development machines. These machines are specifically designed to run continuously without restarts. A Mac mini server that is set up in January and left running will hit the 49-day mark in late February -- and lose all network connectivity without warning.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"always-on-development-machines\",children:\"Always-On Development Machines\"}),`\n`,(0,i.jsx)(e.p,{children:\"Many software developers leave their Macs running continuously, often with dozens of terminal sessions, development servers, database connections, and IDE windows open. Restarting means reconstructing this entire environment, which can take significant time. These users frequently accumulate uptimes well beyond 49 days.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"creative-professionals-with-long-render-jobs\",children:\"Creative Professionals with Long Render Jobs\"}),`\n`,(0,i.jsx)(e.p,{children:\"Video editors, 3D artists, and music producers sometimes run extended rendering or processing jobs that span days or weeks. They avoid restarting during these jobs, and if the job starts on a machine that already has significant uptime, the 49-day threshold could be crossed mid-render.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"enterprise-and-education-deployments\",children:\"Enterprise and Education Deployments\"}),`\n`,(0,i.jsx)(e.p,{children:\"Organizations that deploy Macs in kiosk mode, digital signage, lab environments, or shared workstations may configure these machines to run indefinitely. IT administrators who manage fleets of Macs need to be especially aware of this bug.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"home-automation-and-iot-hub-macs\",children:\"Home Automation and IoT Hub Macs\"}),`\n`,(0,i.jsx)(e.p,{children:\"Users who run HomeKit servers, Home Assistant, or other home automation platforms on always-on Macs are at risk. A network failure on the hub machine can take down the entire smart home infrastructure.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"how-to-know-if-you-are-currently-at-risk\",children:\"How to Know If You Are Currently at Risk\"}),`\n`,(0,i.jsx)(e.p,{children:\"The simplest test is to check your Mac's uptime. If your uptime is approaching or has exceeded 49 days, you should plan a restart. The next section explains exactly how to check.\"}),`\n`,(0,i.jsx)(e.h2,{id:\"how-to-check-your-macs-uptime\",children:\"How to Check Your Mac's Uptime\"}),`\n`,(0,i.jsx)(e.p,{children:\"There are several methods to check how long your Mac has been running since its last restart. Each provides slightly different information, and all are reliable.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"method-1-the-uptime-terminal-command\",children:\"Method 1: The uptime Terminal Command\"}),`\n`,(0,i.jsx)(e.p,{children:'Open Terminal (Applications > Utilities > Terminal, or use Spotlight with Cmd+Space and type \"Terminal\") and type:'}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"uptime\"})})})})}),`\n`,(0,i.jsx)(e.p,{children:\"This returns output similar to:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M 6,1 C 4.354992,1 3,2.354992 3,4 v 16 c 0,1.645008 1.354992,3 3,3 h 12 c 1.645008,0 3,-1.354992 3,-3 V 8 7 A 1.0001,1.0001 0 0 0 20.707031,6.2929687 l -5,-5 A 1.0001,1.0001 0 0 0 15,1 h -1 z m 0,2 h 7 v 3 c 0,1.645008 1.354992,3 3,3 h 3 v 11 c 0,0.564129 -0.435871,1 -1,1 H 6 C 5.4358712,21 5,20.564129 5,20 V 4 C 5,3.4358712 5.4358712,3 6,3 Z M 15,3.4140625 18.585937,7 H 16 C 15.435871,7 15,6.5641288 15,6 Z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"10:32  up 43 days, 7:14, 2 users, load averages: 1.82 2.01 1.97\"})})})})}),`\n`,(0,i.jsx)(e.p,{children:\"In this example, the Mac has been running for 43 days and about 7 hours. This machine is approaching the danger zone and should be restarted within the next few days.\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"For a more detailed guide on using Terminal commands effectively, see our \",(0,i.jsx)(e.a,{href:\"/blog/mac-terminal-mastery-2025-command-line-productivity-guide\",children:\"Terminal mastery guide\"}),\".\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"method-2-system_profiler-command\",children:\"Method 2: system_profiler Command\"}),`\n`,(0,i.jsx)(e.p,{children:\"For more detailed boot time information, use:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"system_profiler\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" SPSoftwareDataType\"})]})})})}),`\n`,(0,i.jsx)(e.p,{children:\"This returns output including:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M 6,1 C 4.354992,1 3,2.354992 3,4 v 16 c 0,1.645008 1.354992,3 3,3 h 12 c 1.645008,0 3,-1.354992 3,-3 V 8 7 A 1.0001,1.0001 0 0 0 20.707031,6.2929687 l -5,-5 A 1.0001,1.0001 0 0 0 15,1 h -1 z m 0,2 h 7 v 3 c 0,1.645008 1.354992,3 3,3 h 3 v 11 c 0,0.564129 -0.435871,1 -1,1 H 6 C 5.4358712,21 5,20.564129 5,20 V 4 C 5,3.4358712 5.4358712,3 6,3 Z M 15,3.4140625 18.585937,7 H 16 C 15.435871,7 15,6.5641288 15,6 Z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"Software:\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"    System Software Overview:\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"      System Version: macOS 26.4 (26E252)\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"      Kernel Version: Darwin 25.5.0\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"      Boot Volume: Macintosh HD\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"      ...\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"      Time since boot: 43 days, 7:14\"})})]})})}),`\n`,(0,i.jsx)(e.p,{children:'The \"Time since boot\" line tells you exactly how long your system has been running.'}),`\n`,(0,i.jsx)(e.h3,{id:\"method-3-precise-boot-time-with-sysctl\",children:\"Method 3: Precise Boot Time with sysctl\"}),`\n`,(0,i.jsx)(e.p,{children:\"For the most precise information about when your Mac last booted, use:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sysctl\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" kern.boottime\"})]})})})}),`\n`,(0,i.jsx)(e.p,{children:\"This outputs:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M 6,1 C 4.354992,1 3,2.354992 3,4 v 16 c 0,1.645008 1.354992,3 3,3 h 12 c 1.645008,0 3,-1.354992 3,-3 V 8 7 A 1.0001,1.0001 0 0 0 20.707031,6.2929687 l -5,-5 A 1.0001,1.0001 0 0 0 15,1 h -1 z m 0,2 h 7 v 3 c 0,1.645008 1.354992,3 3,3 h 3 v 11 c 0,0.564129 -0.435871,1 -1,1 H 6 C 5.4358712,21 5,20.564129 5,20 V 4 C 5,3.4358712 5.4358712,3 6,3 Z M 15,3.4140625 18.585937,7 H 16 C 15.435871,7 15,6.5641288 15,6 Z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{children:\"kern.boottime: { sec = 1709812345, usec = 0 } Mon Mar  7 14:32:25 2026\"})})})})}),`\n`,(0,i.jsx)(e.p,{children:\"This tells you the exact date and time of the last boot, allowing you to calculate precisely when the 49-day threshold will be reached.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"method-4-a-quick-calculation-script\",children:\"Method 4: A Quick Calculation Script\"}),`\n`,(0,i.jsx)(e.p,{children:\"You can create a simple script that tells you exactly when the 49-day mark will hit:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"#!/bin/bash\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"boot_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$(\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sysctl\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -n\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" kern.boottime\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" awk\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" '{print $4}'\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" tr\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -d\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" ','\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\")\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"danger_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$((\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"boot_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" +\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 4294967\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"))\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"current_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$(\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"date\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" +%s\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\")\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"remaining\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$((\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"danger_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" -\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" current_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"))\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"if\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" [ $remaining \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"-le\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 0\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" ]; \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"then\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\"    echo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"WARNING: Your Mac has EXCEEDED the 49-day threshold!\"'})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\"    echo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"You should restart immediately.\"'})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"else\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    days\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$((\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"remaining\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" /\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 86400\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"))\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    hours\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$(((\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"remaining\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" %\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 86400\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\") \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"/\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 3600\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"))\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\"    echo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"Days until 49-day TCP bug: ${'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"days\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"} days, ${\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"hours\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'} hours\"'})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\"    echo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"Danger date: $('}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"date\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -r\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" $danger_time\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:')\"'})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"fi\"})})]})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"Save this as \",(0,i.jsx)(e.code,{children:\"check_tcp_bug.sh\"}),\", make it executable with \",(0,i.jsx)(e.code,{children:\"chmod +x check_tcp_bug.sh\"}),\", and run it with \",(0,i.jsx)(e.code,{children:\"./check_tcp_bug.sh\"}),\".\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"method-5-activity-monitor\",children:\"Method 5: Activity Monitor\"}),`\n`,(0,i.jsx)(e.p,{children:\"If you prefer a graphical approach, you can use Activity Monitor:\"}),`\n`,(0,i.jsxs)(e.ol,{children:[`\n`,(0,i.jsx)(e.li,{children:\"Open Activity Monitor (Applications > Utilities > Activity Monitor, or search for it in Spotlight)\"}),`\n`,(0,i.jsx)(e.li,{children:'Click on the \"CPU\" tab'}),`\n`,(0,i.jsx)(e.li,{children:'Look at the bottom of the window for \"System Uptime\" (in some versions, this may require the \"Window\" menu to show system information)'}),`\n`]}),`\n`,(0,i.jsxs)(e.p,{children:[\"For a comprehensive guide to Activity Monitor and all its capabilities, see our \",(0,i.jsx)(e.a,{href:\"/blog/mac-activity-monitor-complete-guide-2025\",children:\"Activity Monitor guide\"}),\".\"]}),`\n`,(0,i.jsx)(e.h2,{id:\"how-to-fix-and-prevent-the-bug\",children:\"How to Fix and Prevent the Bug\"}),`\n`,(0,i.jsx)(e.p,{children:\"Since there is no software patch available in current production releases of macOS, the only fix for the 49-day TCP bug is to restart your Mac before reaching the threshold. There are several approaches, ranging from simple manual restarts to fully automated solutions.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"immediate-fix-restart-your-mac\",children:\"Immediate Fix: Restart Your Mac\"}),`\n`,(0,i.jsx)(e.p,{children:\"If your Mac is currently experiencing network failures and has been running for 49 or more days, restart it immediately:\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"From the Apple menu\"}),': Click the Apple logo in the top-left corner and select \"Restart...\"']}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"From Terminal\"}),\": Run \",(0,i.jsx)(e.code,{children:\"sudo shutdown -r now\"})]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Force restart\"}),\" (if the Mac is unresponsive): Hold the power button for 10 seconds, then press it again to start up\"]}),`\n`]}),`\n`,(0,i.jsx)(e.p,{children:\"After the restart, all network connectivity will be restored immediately. The uptime counter resets to zero, giving you another 49 days before the bug could recur.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"prevention-strategy-1-schedule-a-monthly-restart\",children:\"Prevention Strategy 1: Schedule a Monthly Restart\"}),`\n`,(0,i.jsx)(e.p,{children:\"The simplest prevention strategy is to restart your Mac on a fixed schedule -- once a month is more than sufficient. Set a calendar reminder for the first day of each month (or any day you choose) to restart your Mac. A monthly restart keeps your uptime well below the 49-day danger threshold and also ensures that system updates and memory cleanup occur regularly.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"prevention-strategy-2-automated-restart-with-pmset\",children:\"Prevention Strategy 2: Automated Restart with pmset\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"macOS includes a built-in power management tool called \",(0,i.jsx)(e.code,{children:\"pmset\"}),\" that can schedule automatic restarts. This is the simplest automated approach:\"]}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Schedule a restart every Sunday at 3:00 AM\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" pmset\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" repeat\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" restart\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" MTWRFSU\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" 03:00:00\"})]})]})})}),`\n`,(0,i.jsx)(e.p,{children:\"To schedule it for a specific day each week:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Restart every Sunday at 4:00 AM\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" pmset\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" repeat\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" restart\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" U\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" 04:00:00\"})]})]})})}),`\n`,(0,i.jsx)(e.p,{children:\"To verify your scheduled restart:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"pmset\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -g\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" sched\"})]})})})}),`\n`,(0,i.jsx)(e.p,{children:\"To remove a scheduled restart:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" pmset\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" repeat\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" cancel\"})]})})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"The \",(0,i.jsx)(e.code,{children:\"pmset\"}),\" approach is ideal because it uses macOS's built-in power management system and will work even if no user is logged in, making it perfect for headless servers and always-on Macs.\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"prevention-strategy-3-automated-restart-with-launchd\",children:\"Prevention Strategy 3: Automated Restart with launchd\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"For more sophisticated control, you can create a \",(0,i.jsx)(e.code,{children:\"launchd\"}),\" plist that triggers a restart on a specific schedule. This approach gives you more flexibility than \",(0,i.jsx)(e.code,{children:\"pmset\"}),\":\"]}),`\n`,(0,i.jsxs)(e.p,{children:[\"Create a file at \",(0,i.jsx)(e.code,{children:\"/Library/LaunchDaemons/com.local.scheduled-restart.plist\"}),\":\"]}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M 6,1 C 4.354992,1 3,2.354992 3,4 v 16 c 0,1.645008 1.354992,3 3,3 h 12 c 1.645008,0 3,-1.354992 3,-3 V 8 7 A 1.0001,1.0001 0 0 0 20.707031,6.2929687 l -5,-5 A 1.0001,1.0001 0 0 0 15,1 h -1 z m 0,2 h 7 v 3 c 0,1.645008 1.354992,3 3,3 h 3 v 11 c 0,0.564129 -0.435871,1 -1,1 H 6 C 5.4358712,21 5,20.564129 5,20 V 4 C 5,3.4358712 5.4358712,3 6,3 Z M 15,3.4140625 18.585937,7 H 16 C 15.435871,7 15,6.5641288 15,6 Z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"<?\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"xml\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" version\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'\"1.0\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" encoding\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'\"UTF-8\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"?>\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"<!\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"DOCTYPE\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" plist\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:' PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">'})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"<\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"plist\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" version\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'\"1.0\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"<\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"dict\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">Label</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">com.local.scheduled-restart</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">ProgramArguments</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"array\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">/sbin/shutdown</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">-r</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">now</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"string\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    </\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"array\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">StartCalendarInterval</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"dict\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">Weekday</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"integer\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">7</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"integer\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">Hour</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"integer\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">4</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"integer\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">Minute</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"        <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"integer\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">0</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"integer\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    </\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"dict\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">RunAtLoad</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"key\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"    <\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"false\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"/>\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"dict\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"</\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#22863A\",\"--shiki-dark\":\"#85E89D\"},children:\"plist\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\">\"})]})]})})}),`\n`,(0,i.jsx)(e.p,{children:\"Load it with:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" launchctl\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" load\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" /Library/LaunchDaemons/com.local.scheduled-restart.plist\"})]})})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"This will restart your Mac every Sunday at 4:00 AM. You can adjust the \",(0,i.jsx)(e.code,{children:\"Weekday\"}),\", \",(0,i.jsx)(e.code,{children:\"Hour\"}),\", and \",(0,i.jsx)(e.code,{children:\"Minute\"}),\" values to suit your needs. Weekday values are: 1 (Monday) through 7 (Sunday).\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"prevention-strategy-4-uptime-monitoring-script\",children:\"Prevention Strategy 4: Uptime Monitoring Script\"}),`\n`,(0,i.jsx)(e.p,{children:\"For users who want a warning before the threshold rather than an automatic restart, you can set up a monitoring script that alerts you when uptime approaches 40 days:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"#!/bin/bash\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Save as /usr/local/bin/uptime_monitor.sh\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"THRESHOLD_DAYS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"40\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"UPTIME_SECONDS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$(( \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"$(date\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" +%s\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\") - $(\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sysctl\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -n\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" kern.boottime\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" awk\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" '{print $4}'\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" tr\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -d\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" ','\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\") ))\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"UPTIME_DAYS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$(( \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"UPTIME_SECONDS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" /\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 86400\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" ))\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"if\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" [ $UPTIME_DAYS \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"-ge\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" $THRESHOLD_DAYS ]; \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"then\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"    osascript\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -e\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"display notification '}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:'\\\\\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"Your Mac has been running for ${\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"UPTIME_DAYS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"} days. Please restart soon to avoid the TCP bug.\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:'\\\\\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" with title \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:'\\\\\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"Uptime Warning\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:'\\\\\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" subtitle \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:'\\\\\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"49-Day TCP Bug Prevention\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:'\\\\\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'\"'})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"fi\"})})]})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"Combine this with a \",(0,i.jsx)(e.code,{children:\"launchd\"}),\" plist that runs the script daily, and you will receive a macOS notification when it is time to restart.\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"prevention-strategy-5-using-the-shutdown-command-directly\",children:\"Prevention Strategy 5: Using the shutdown Command Directly\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"For a quick, one-time scheduled restart, you can use the \",(0,i.jsx)(e.code,{children:\"shutdown\"}),\" command:\"]}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Restart in 30 minutes\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" shutdown\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -r\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" +30\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Restart at a specific time today\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" shutdown\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -r\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" 23:00\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Cancel a pending restart\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"sudo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" shutdown\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -c\"})]})]})})}),`\n`,(0,i.jsx)(e.p,{children:\"This is useful for scheduling a restart later in the day when you know you will not be actively using the Mac.\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"If your Mac is experiencing broader network issues beyond this specific bug, our \",(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-wifi-dropping-complete-fix-guide-2025\",children:\"macOS Tahoe WiFi troubleshooting guide\"}),\" covers additional diagnostics and fixes.\"]}),`\n`,(0,i.jsx)(e.h2,{id:\"is-a-patch-coming\",children:\"Is a Patch Coming?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Yes. Apple has acknowledged the issue, and a fix is expected to ship in macOS 26.5. As of the time of writing, macOS 26.5 is in its second beta release (beta 2), available to developers and public beta testers through Apple's beta program.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"current-status\",children:\"Current Status\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"macOS 26.4 and earlier\"}),\": Bug is present in all production releases. No workaround exists other than restarting before 49 days.\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"macOS 26.5 beta 1\"}),\": Initial beta did not include the fix.\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"macOS 26.5 beta 2\"}),\": Reports from beta testers suggest that Apple has addressed the underlying integer overflow in the TCP stack. However, because the bug requires 49 days of uptime to manifest, it is difficult to verify the fix quickly through normal beta testing.\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Expected release\"}),\": Based on Apple's typical beta cycle, macOS 26.5 is expected to reach general availability in late spring or early summer 2026.\"]}),`\n`]}),`\n`,(0,i.jsx)(e.h3,{id:\"why-hasnt-apple-patched-it-sooner\",children:\"Why Hasn't Apple Patched It Sooner?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Several factors likely contributed to the delay:\"}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"Discovery timing\"}),\": The bug was publicly disclosed in early 2026. While it may have been reported to Apple through responsible disclosure channels before Photon's public blog post, the timeline for developing, testing, and shipping kernel-level fixes is measured in months, not days.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"Kernel-level complexity\"}),\": The XNU kernel is the foundation of every Apple platform. A fix to the TCP stack must be thoroughly tested to ensure it does not introduce regressions that could affect millions of devices. Integer overflow fixes in timer comparisons can have subtle interactions with other kernel subsystems.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"Testing difficulty\"}),\": Because the bug requires nearly 50 days of continuous uptime to reproduce, testing the fix is inherently slow. Apple likely needs to use time manipulation techniques in their testing environment to verify the fix, and then confirm it does not break normal TCP operations.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"The workaround is simple\"}),\": From Apple's risk-assessment perspective, the workaround (a routine restart) is simple and non-destructive. This reduces the urgency compared to, say, a remote code execution vulnerability.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[\"For more information about staying current with macOS updates and known issues, see our \",(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-troubleshooting-issues-solutions-january-2026\",children:\"macOS Tahoe troubleshooting guide\"}),\".\"]}),`\n`,(0,i.jsx)(e.h2,{id:\"the-technical-deep-dive-xnu-kernel-integer-overflow\",children:\"The Technical Deep Dive: XNU Kernel Integer Overflow\"}),`\n`,(0,i.jsx)(e.p,{children:\"This section is intended for developers, system administrators, and anyone with a technical interest in understanding exactly how and why this bug occurs at the code level.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"the-mechanics-of-the-overflow\",children:\"The Mechanics of the Overflow\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"The XNU kernel uses a tick counter to track system uptime. This counter is stored in a variable that uses the \",(0,i.jsx)(e.code,{children:\"uint32_t\"}),\" data type -- a 32-bit unsigned integer capable of holding values from 0 to 4,294,967,295.\"]}),`\n`,(0,i.jsx)(e.p,{children:\"The kernel increments this counter in millisecond intervals. The TCP stack uses this counter for various timing operations, including:\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Retransmission timers\"}),\": How long to wait before resending an unacknowledged packet\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Connection timeout calculations\"}),\": When to consider a connection attempt as failed\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Keep-alive timing\"}),\": When to send periodic keep-alive probes on idle connections\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Timestamp comparisons\"}),\": Validating TCP timestamp options in packet headers\"]}),`\n`]}),`\n`,(0,i.jsx)(e.p,{children:\"The critical flaw is in a comparison operation. In simplified pseudocode, the problematic logic looks something like this:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M16.5921 9.1962s-.354-3.298-3.627-3.39c-3.2741-.09-4.9552 2.474-4.9552 6.14 0 3.6651 1.858 6.5972 5.0451 6.5972 3.184 0 3.5381-3.665 3.5381-3.665l6.1041.365s.36 3.31-2.196 5.836c-2.552 2.5241-5.6901 2.9371-7.8762 2.9201-2.19-.017-5.2261.034-8.1602-2.97-2.938-3.0101-3.436-5.9302-3.436-8.8002 0-2.8701.556-6.6702 4.047-9.5502C7.444.72 9.849 0 12.254 0c10.0422 0 10.7172 9.2602 10.7172 9.2602z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"// Simplified representation of the buggy comparison\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"uint32_t\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" current_time \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" get_system_uptime_ms\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"();\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"uint32_t\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" connection_timestamp \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" tcp_header\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"->\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"timestamp;\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"// This comparison fails when current_time has wrapped around\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"if\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" (current_time \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"-\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" connection_timestamp \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\">\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" MAX_ALLOWED_DELTA) {\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:'    // Drop the connection as \"too old\" or \"invalid\"'})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"    drop_packet\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"();\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"}\"})})]})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"When the system has been running for less than 49.7 days, \",(0,i.jsx)(e.code,{children:\"current_time\"}),\" is a straightforward increasing value, and the comparison works correctly. But when \",(0,i.jsx)(e.code,{children:\"current_time\"}),\" overflows past 4,294,967,295 and wraps back to a small number (say, 1,000), the subtraction \",(0,i.jsx)(e.code,{children:\"current_time - connection_timestamp\"}),\" produces an unexpectedly large result due to unsigned integer underflow, causing the kernel to interpret every new connection's timing data as invalid.\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"why-wasnt-this-caught\",children:\"Why Wasn't This Caught?\"}),`\n`,(0,i.jsx)(e.p,{children:\"This type of bug is notoriously difficult to catch for several reasons:\"}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"1. Time-dependent reproduction\"}),\": The bug only manifests after 49.7 days. Most automated testing, including Apple's CI/CD pipelines, does not run individual test cycles for that duration. Unit tests for the TCP stack likely test correctness at various time values but may not specifically test the transition across the overflow boundary.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"2. The code looks correct at a glance\"}),\": The comparison operation is syntactically valid and works correctly for the first 49 days. A code reviewer would need to specifically consider the overflow case to spot the bug. In a codebase as large as XNU (millions of lines of code), this kind of subtle issue can easily slip through review.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"3. Modern Macs restart frequently\"}),\": macOS updates typically require restarts, and most consumer Macs are restarted regularly enough that the bug never manifests. It was only the growing population of always-on Mac servers (especially Mac minis) that created enough exposure for the pattern to be noticed.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[(0,i.jsx)(e.strong,{children:\"4. Misleading symptoms\"}),`: When the bug triggers, it looks like a network infrastructure problem, not an operating system bug. Users (and even experienced administrators) typically investigate their routers, DNS servers, ISP connections, and network switches before suspecting the Mac's kernel. Many users who hit this bug probably \"fixed\" it by restarting their Mac without ever realizing the restart itself was the fix, attributing the problem to some other cause.`]}),`\n`,(0,i.jsx)(e.h3,{id:\"the-correct-fix\",children:\"The Correct Fix\"}),`\n`,(0,i.jsx)(e.p,{children:\"The proper fix for a timer wraparound comparison in C is well-established. Instead of comparing raw timer values, the comparison should be done using signed arithmetic that correctly handles the wraparound:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"M16.5921 9.1962s-.354-3.298-3.627-3.39c-3.2741-.09-4.9552 2.474-4.9552 6.14 0 3.6651 1.858 6.5972 5.0451 6.5972 3.184 0 3.5381-3.665 3.5381-3.665l6.1041.365s.36 3.31-2.196 5.836c-2.552 2.5241-5.6901 2.9371-7.8762 2.9201-2.19-.017-5.2261.034-8.1602-2.97-2.938-3.0101-3.436-5.9302-3.436-8.8002 0-2.8701.556-6.6702 4.047-9.5502C7.444.72 9.849 0 12.254 0c10.0422 0 10.7172 9.2602 10.7172 9.2602z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"// Correct wraparound-safe comparison\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"// Cast the difference to a signed type\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"int32_t\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" time_delta \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" (\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"int32_t\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\")(current_time \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"-\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" connection_timestamp);\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"if\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" (time_delta \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\">\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" MAX_ALLOWED_DELTA \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"||\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" time_delta \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"<\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 0\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\") {\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"    drop_packet\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"();\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"}\"})})]})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"Alternatively, the kernel could use a 64-bit timer (\",(0,i.jsx)(e.code,{children:\"uint64_t\"}),\"), which would not overflow for approximately 584 million years -- effectively eliminating the overflow concern entirely. However, changing the timer width has broader implications throughout the kernel and would require more extensive changes and testing.\"]}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.img,{alt:\"TCP Connection Timeline and Overflow Point\",src:\"/images/blog/macos-tahoe-49-day-tcp-bug-network-fix-guide-2026/content-2.webp\",width:\"2752\",height:\"1536\"})}),`\n`,(0,i.jsx)(e.h3,{id:\"what-about-other-apple-platforms\",children:\"What About Other Apple Platforms?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Since XNU is the shared kernel across all Apple platforms (macOS, iOS, iPadOS, watchOS, tvOS, visionOS), the question naturally arises: are iPhones and iPads also affected?\"}),`\n`,(0,i.jsx)(e.p,{children:\"In theory, the same vulnerable code exists on all Apple platforms. In practice, iOS and iPadOS devices restart much more frequently than Macs -- system updates, battery depletion, and normal usage patterns mean that an iPhone almost never reaches 49 days of continuous uptime. Apple Watch and Apple TV devices similarly tend to restart regularly. However, if an iPad were somehow kept running continuously for 50 days without a restart, it would theoretically be affected by the same bug.\"}),`\n`,(0,i.jsx)(e.h2,{id:\"historical-context-this-isnt-the-first-time\",children:\"Historical Context: This Isn't the First Time\"}),`\n`,(0,i.jsx)(e.p,{children:\"The macOS 49-day TCP bug has a striking historical parallel that older computing veterans will immediately recognize: the infamous Windows 49-day bug of the 1990s.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"the-windows-497-day-bug\",children:\"The Windows 49.7-Day Bug\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"Microsoft Windows 95, Windows 98, and Windows ME all contained a nearly identical bug. The Windows kernel function \",(0,i.jsx)(e.code,{children:\"GetTickCount()\"}),\" returned a \",(0,i.jsx)(e.code,{children:\"DWORD\"}),\" (32-bit unsigned integer) representing the number of milliseconds since the system was started. After 49.7 days, this value overflowed and wrapped to zero.\"]}),`\n`,(0,i.jsx)(e.p,{children:\"The consequences in Windows were arguably more severe than the current macOS bug. On Windows 95, the overflow could cause:\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsx)(e.li,{children:\"System-wide freezes and crashes (Blue Screen of Death)\"}),`\n`,(0,i.jsx)(e.li,{children:\"Application hangs and data corruption\"}),`\n`,(0,i.jsx)(e.li,{children:\"Complete system instability requiring a reboot\"}),`\n`]}),`\n`,(0,i.jsxs)(e.p,{children:[\"The Windows bug was well-known and widely documented throughout the late 1990s. It became a standard example in programming textbooks of why integer overflow must be handled carefully. Microsoft eventually introduced \",(0,i.jsx)(e.code,{children:\"GetTickCount64()\"}),\" in Windows Vista (2007), which uses a 64-bit counter and will not overflow for approximately 584 million years.\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"the-irony\",children:\"The Irony\"}),`\n`,(0,i.jsx)(e.p,{children:\"The irony that Apple has now shipped essentially the same class of bug -- a 32-bit millisecond timer overflow -- nearly 30 years after it was a well-documented problem on Windows has not been lost on the developer community. Hacker News discussions around the macOS bug frequently reference the Windows precedent, with many commenters expressing surprise that such a well-known class of error could make it into a modern operating system kernel.\"}),`\n`,(0,i.jsx)(e.p,{children:\"However, it is worth noting that the XNU kernel is an enormous and complex codebase with decades of accumulated code. The specific comparison operation that contains the bug may have been written long ago (possibly during the NeXTSTEP era or the early days of OS X) and simply never exercised under conditions that would reveal the flaw until the recent trend of running Macs as always-on servers.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"other-notable-timer-overflow-bugs-in-computing-history\",children:\"Other Notable Timer Overflow Bugs in Computing History\"}),`\n`,(0,i.jsx)(e.p,{children:\"The 49-day overflow is part of a broader pattern of timer-related bugs throughout computing history:\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Boeing 787 Dreamliner (2015)\"}),\": The FAA issued an airworthiness directive requiring that Boeing 787 aircraft be power-cycled every 248 days to prevent a 32-bit timer overflow in the generator control units that could cause a complete loss of electrical power.\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"PlayStation 3 Leap Year Bug (2010)\"}),\": A miscalculation in the PS3's internal clock caused the system to believe the date was February 29, 2010 (which did not exist), bricking consoles worldwide for 24 hours.\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Mars Pathfinder (1997)\"}),\": While not strictly a timer overflow, the Pathfinder's priority inversion bug was discovered in the field after the rover had been operating on Mars, demonstrating how time-dependent bugs can evade extensive pre-deployment testing.\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Y2K (2000)\"}),\": The most famous date/time computing bug in history, where two-digit year representations threatened to cause widespread failures at the century boundary.\"]}),`\n`]}),`\n`,(0,i.jsx)(e.p,{children:\"These examples illustrate a consistent theme: time-related bugs are among the most insidious in computing because they evade testing that does not specifically account for extreme time durations or boundary conditions.\"}),`\n`,(0,i.jsx)(e.h2,{id:\"troubleshooting-signs-your-mac-has-hit-the-bug\",children:\"Troubleshooting: Signs Your Mac Has Hit the Bug\"}),`\n`,(0,i.jsx)(e.p,{children:\"If you suspect your Mac may have hit the 49-day TCP bug, here are the specific symptoms to look for and how to distinguish this bug from other network problems.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"primary-symptoms\",children:\"Primary Symptoms\"}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:\"1. All new TCP connections fail simultaneously\"})}),`\n`,(0,i.jsx)(e.p,{children:\"This is the hallmark symptom. It is not one application or one website -- it is everything that uses TCP:\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsx)(e.li,{children:\"Web browsers cannot load any pages (Safari, Chrome, Firefox -- all fail)\"}),`\n`,(0,i.jsx)(e.li,{children:\"Email clients cannot connect to mail servers\"}),`\n`,(0,i.jsx)(e.li,{children:\"SSH connections time out\"}),`\n`,(0,i.jsx)(e.li,{children:\"iMessage and FaceTime stop working\"}),`\n`,(0,i.jsx)(e.li,{children:\"iCloud sync stops\"}),`\n`,(0,i.jsx)(e.li,{children:\"App Store cannot connect\"}),`\n`,(0,i.jsx)(e.li,{children:\"File sharing and AirDrop may fail\"}),`\n`,(0,i.jsx)(e.li,{children:\"Homebrew, npm, pip, and other package managers cannot download anything\"}),`\n`]}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:\"2. Wi-Fi or Ethernet appears connected\"})}),`\n`,(0,i.jsx)(e.p,{children:\"Your Mac's menu bar still shows a connected Wi-Fi signal or Ethernet connection. The network interface is functioning at layers 1 and 2 (physical and data link) -- it is only layer 4 (transport/TCP) that is broken.\"}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:\"3. Ping may still work\"})}),`\n`,(0,i.jsx)(e.p,{children:\"Because ICMP ping does not use TCP, you may be able to successfully ping external hosts:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"ping\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" google.com\"})]})})})}),`\n`,(0,i.jsx)(e.p,{children:\"If ping works but web browsers and applications do not, this is a strong indicator of the TCP bug rather than a general network or DNS issue.\"}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:\"4. DNS resolution may still work\"})}),`\n`,(0,i.jsx)(e.p,{children:\"DNS queries that use UDP (the default for most DNS lookups) may continue to function:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"nslookup\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" google.com\"})]})})})}),`\n`,(0,i.jsx)(e.p,{children:\"If DNS resolves but TCP connections fail, the TCP bug is the likely culprit.\"}),`\n`,(0,i.jsx)(e.p,{children:(0,i.jsx)(e.strong,{children:\"5. Uptime is at or beyond 49 days\"})}),`\n`,(0,i.jsx)(e.p,{children:\"Check your uptime as described in the previous section. If your uptime is at or beyond 49 days and you are experiencing the symptoms above, the bug is almost certainly the cause.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"how-to-distinguish-from-other-network-problems\",children:\"How to Distinguish from Other Network Problems\"}),`\n`,(0,i.jsx)(e.p,{children:\"The 49-day TCP bug can be confused with several other common network issues. Here is how to tell them apart:\"}),`\n`,(0,i.jsxs)(e.table,{children:[(0,i.jsx)(e.thead,{children:(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.th,{children:\"Symptom\"}),(0,i.jsx)(e.th,{children:\"TCP Bug\"}),(0,i.jsx)(e.th,{children:\"Wi-Fi Problem\"}),(0,i.jsx)(e.th,{children:\"DNS Issue\"}),(0,i.jsx)(e.th,{children:\"Firewall Block\"}),(0,i.jsx)(e.th,{children:\"ISP Outage\"})]})}),(0,i.jsxs)(e.tbody,{children:[(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"All TCP connections fail\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Possible\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"Possible\"}),(0,i.jsx)(e.td,{children:\"Possible\"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"Ping works\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Possible\"}),(0,i.jsx)(e.td,{children:\"No\"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"DNS resolves\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Possible\"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"Wi-Fi shows connected\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Yes\"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"Uptime > 49 days\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Irrelevant\"}),(0,i.jsx)(e.td,{children:\"Irrelevant\"}),(0,i.jsx)(e.td,{children:\"Irrelevant\"}),(0,i.jsx)(e.td,{children:\"Irrelevant\"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"Other devices affected\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"Maybe\"}),(0,i.jsx)(e.td,{children:\"Maybe\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"Yes\"})]}),(0,i.jsxs)(e.tr,{children:[(0,i.jsx)(e.td,{children:\"Restart fixes it\"}),(0,i.jsx)(e.td,{children:\"Yes\"}),(0,i.jsx)(e.td,{children:\"Maybe\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"No\"}),(0,i.jsx)(e.td,{children:\"No\"})]})]})]}),`\n`,(0,i.jsx)(e.p,{children:\"The most definitive test is the combination of: uptime greater than 49 days + all TCP connections failing + ping working + restart fixing the problem. If all four conditions are met, you have encountered the bug.\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"For Wi-Fi-specific troubleshooting that may help rule out other causes, see our \",(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-wifi-dropping-complete-fix-guide-2025\",children:\"macOS Tahoe WiFi troubleshooting guide\"}),\".\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"network-diagnostic-commands\",children:\"Network Diagnostic Commands\"}),`\n`,(0,i.jsx)(e.p,{children:\"Run these commands in Terminal to gather diagnostic information:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Check uptime\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"uptime\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Test TCP connection to a known-good server\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"nc\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -zv\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" google.com\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 443\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Test DNS resolution\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"nslookup\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" apple.com\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Test ICMP connectivity\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"ping\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -c\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 4\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" 8.8.8.8\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Check network interfaces\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"ifconfig\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" grep\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"status\"'})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# View active TCP connections\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"netstat\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -an\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" grep\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" ESTABLISHED\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" head\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -20\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# Check for TCP connection errors\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"netstat\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -s\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" |\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\" grep\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" -i\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"error\\\\|fail\\\\|drop\\\\|overflow\"'})]})]})})}),`\n`,(0,i.jsxs)(e.p,{children:[\"If \",(0,i.jsx)(e.code,{children:\"nc -zv google.com 443\"}),\" fails (connection timed out) but \",(0,i.jsx)(e.code,{children:\"ping -c 4 8.8.8.8\"}),\" succeeds, and your uptime is at or beyond 49 days, you have strong evidence of the TCP bug.\"]}),`\n`,(0,i.jsxs)(e.p,{children:[\"If your Mac is also experiencing freezing or performance issues alongside network problems, our \",(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-freezing-lag-beach-ball-complete-fix-guide-2026\",children:\"macOS Tahoe freezing fix guide\"}),\" may provide additional helpful context.\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"what-to-do-when-you-confirm-the-bug\",children:\"What to Do When You Confirm the Bug\"}),`\n`,(0,i.jsxs)(e.ol,{children:[`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Save any unsaved work\"}),\" in open applications\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Gracefully close applications\"}),\" that have active file operations (databases, video encoding, etc.)\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Restart your Mac\"}),\" using \",(0,i.jsx)(e.code,{children:\"sudo shutdown -r now\"}),\" or the Apple menu\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Verify connectivity\"}),\" after the restart by loading a web page and running \",(0,i.jsx)(e.code,{children:\"uptime\"}),\" to confirm the counter has reset\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.strong,{children:\"Implement a prevention strategy\"}),\" from the section above to ensure you do not hit the bug again\"]}),`\n`]}),`\n`,(0,i.jsx)(e.h2,{id:\"faq\",children:\"FAQ\"}),`\n`,(0,i.jsx)(e.h3,{id:\"is-my-mac-affected-by-the-49-day-tcp-bug\",children:\"Is my Mac affected by the 49-day TCP bug?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Every Mac running macOS is potentially affected, regardless of hardware model, processor type, or macOS version. The bug exists in the XNU kernel, which is the foundation of all macOS installations. However, you will only experience the bug if your Mac runs continuously for more than 49.7 days without a restart. If you restart your Mac at least once a month -- whether manually or through system updates -- you will never encounter the bug.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"how-often-should-i-reboot-my-mac-to-avoid-the-bug\",children:\"How often should I reboot my Mac to avoid the bug?\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"Rebooting once every 30 days provides a comfortable safety margin below the 49.7-day threshold. For mission-critical server Macs, a weekly restart (ideally during off-peak hours) provides an even larger margin of safety. You can automate this using \",(0,i.jsx)(e.code,{children:\"pmset\"}),\", \",(0,i.jsx)(e.code,{children:\"launchd\"}),\", or a scheduled \",(0,i.jsx)(e.code,{children:\"shutdown -r\"}),\" command as described in the prevention section above. There is no downside to restarting more frequently -- in fact, regular restarts help clear memory leaks, apply pending updates, and maintain overall system health.\"]}),`\n`,(0,i.jsx)(e.h3,{id:\"will-apple-fix-this-bug\",children:\"Will Apple fix this bug?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Yes, Apple is expected to fix the bug in macOS 26.5, which is currently in beta 2 as of April 2026. Based on Apple's typical beta cycle, the public release is expected in late spring or early summer 2026. The fix will likely involve correcting the integer comparison in the XNU kernel's TCP stack to properly handle the 32-bit timer wraparound, or potentially upgrading the timer to a 64-bit integer. Until the fix ships in a production release, the only mitigation is to restart your Mac before reaching the 49-day uptime threshold.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"does-the-bug-affect-both-apple-silicon-and-intel-macs\",children:\"Does the bug affect both Apple Silicon and Intel Macs?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Yes. The bug is in the XNU kernel's TCP stack, which is architecture-independent code that runs on both Apple Silicon (M1, M2, M3, M4, and M5 series) and Intel processors. The integer overflow occurs in the same way regardless of the underlying hardware architecture. Whether you have a 2015 MacBook Pro with an Intel processor or a 2026 Mac Studio with an M5 Ultra, the bug behaves identically.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"can-i-check-my-macs-uptime-remotely\",children:\"Can I check my Mac's uptime remotely?\"}),`\n`,(0,i.jsx)(e.p,{children:\"Yes, if you have SSH access to your Mac (enabled through System Settings > General > Sharing > Remote Login), you can check uptime remotely:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsx)(e.code,{children:(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"ssh\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" username@your-mac-ip\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"uptime\"'})]})})})}),`\n`,(0,i.jsx)(e.p,{children:\"For managing multiple Macs, you could create a script that checks uptime across all machines:\"}),`\n`,(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(e.pre,{className:\"shiki shiki-themes github-light github-dark\",style:{\"--shiki-light\":\"#24292e\",\"--shiki-dark\":\"#e1e4e8\",\"--shiki-light-bg\":\"#fff\",\"--shiki-dark-bg\":\"#24292e\"},tabIndex:\"0\",icon:'<svg viewBox=\"0 0 24 24\"><path d=\"m 4,4 a 1,1 0 0 0 -0.7070312,0.2929687 1,1 0 0 0 0,1.4140625 L 8.5859375,11 3.2929688,16.292969 a 1,1 0 0 0 0,1.414062 1,1 0 0 0 1.4140624,0 l 5.9999998,-6 a 1.0001,1.0001 0 0 0 0,-1.414062 L 4.7070312,4.2929687 A 1,1 0 0 0 4,4 Z m 8,14 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 h 8 a 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z\" fill=\"currentColor\" /></svg>',children:(0,i.jsxs)(e.code,{children:[(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"#!/bin/bash\"})}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6A737D\",\"--shiki-dark\":\"#6A737D\"},children:\"# check_all_macs.sh\"})}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"MACS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"=\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"(\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'\"mac1.local\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"mac2.local\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"mac3.local\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\")\"})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\"}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"for\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\" mac \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"in\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"${'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"MACS\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"[\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"@\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:']}\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"; \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"do\"})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\"    echo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"--- '}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$mac\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' ---\"'})]}),`\n`,(0,i.jsxs)(e.span,{className:\"line\",children:[(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#6F42C1\",\"--shiki-dark\":\"#B392F0\"},children:\"    ssh\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\" user@\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#24292E\",\"--shiki-dark\":\"#E1E4E8\"},children:\"$mac \"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:'\"uptime\"'}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" 2>\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:\"/dev/null\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\" ||\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#005CC5\",\"--shiki-dark\":\"#79B8FF\"},children:\" echo\"}),(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#032F62\",\"--shiki-dark\":\"#9ECBFF\"},children:' \"  Connection failed\"'})]}),`\n`,(0,i.jsx)(e.span,{className:\"line\",children:(0,i.jsx)(e.span,{style:{\"--shiki-light\":\"#D73A49\",\"--shiki-dark\":\"#F97583\"},children:\"done\"})})]})})}),`\n`,(0,i.jsx)(e.p,{children:\"You can also use Apple Remote Desktop (ARD) or mobile device management (MDM) solutions to monitor uptime across a fleet of managed Macs.\"}),`\n`,(0,i.jsxs)(e.p,{children:[\"If you manage Macs that connect to network drives or NAS devices, the 49-day bug can also disrupt SMB file sharing connections. See our \",(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-smb-network-drive-nas-troubleshooting-complete-guide-2025\",children:\"macOS Tahoe SMB/NAS troubleshooting guide\"}),\" for related network storage troubleshooting.\"]}),`\n`,(0,i.jsx)(e.h2,{id:\"conclusion\",children:\"Conclusion\"}),`\n`,(0,i.jsx)(e.p,{children:\"The macOS 49-day TCP bug is a fascinating case study in how a subtle integer overflow -- one of the oldest and most well-documented classes of software bugs -- can persist undetected in a modern, mature operating system kernel for years, only to surface as an increasing number of users adopt always-on Mac server configurations.\"}),`\n`,(0,i.jsx)(e.p,{children:\"For most Mac users, the bug is an interesting technical curiosity that will never affect their daily computing. But for the growing community of users who rely on Macs as servers, development machines, and always-on infrastructure, it is a real operational hazard that demands attention and mitigation.\"}),`\n`,(0,i.jsx)(e.p,{children:\"The good news is that the mitigation is straightforward: check your uptime, restart before 49 days, and ideally automate the process so you never have to think about it again. And with macOS 26.5 on the horizon, a permanent fix is within reach.\"}),`\n`,(0,i.jsx)(e.p,{children:\"In the meantime, consider this an excellent reminder that even the most polished and reliable computing platforms are built by humans, and human-written code is never perfect. Regular restarts are not just a lazy IT support cliche -- they are a genuine best practice that protects against exactly this kind of latent defect.\"}),`\n`,(0,i.jsx)(e.h3,{id:\"related-resources\",children:\"Related Resources\"}),`\n`,(0,i.jsx)(e.p,{children:\"If you are troubleshooting other macOS Tahoe issues alongside the TCP bug, these guides may be helpful:\"}),`\n`,(0,i.jsxs)(e.ul,{children:[`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-wifi-dropping-complete-fix-guide-2025\",children:\"macOS Tahoe WiFi Troubleshooting Guide\"}),\" -- For Wi-Fi connectivity issues beyond the TCP bug\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-troubleshooting-issues-solutions-january-2026\",children:\"macOS Tahoe Complete Troubleshooting Guide\"}),\" -- For a comprehensive overview of known macOS Tahoe issues\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:\"/blog/mac-activity-monitor-complete-guide-2025\",children:\"Activity Monitor Complete Guide\"}),\" -- For monitoring system resources and diagnosing performance problems\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-freezing-lag-beach-ball-complete-fix-guide-2026\",children:\"macOS Tahoe Freezing Fix Guide\"}),\" -- For performance and freezing issues\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:\"/blog/macos-tahoe-smb-network-drive-nas-troubleshooting-complete-guide-2025\",children:\"macOS Tahoe SMB/NAS Troubleshooting\"}),\" -- For network storage connectivity problems\"]}),`\n`,(0,i.jsxs)(e.li,{children:[(0,i.jsx)(e.a,{href:\"/blog/mac-terminal-mastery-2025-command-line-productivity-guide\",children:\"Terminal Mastery Guide\"}),\" -- For learning the Terminal commands used throughout this article\"]}),`\n`]})]})}function o(s={}){let{wrapper:e}=s.components||{};return e?(0,i.jsx)(e,{...s,children:(0,i.jsx)(c,{...s})}):c(s)}return b(F);})();\n;return Component;","toc":[{"title":"Key Takeaways","url":"#key-takeaways","depth":2},{"title":"What Is the 49-Day TCP Bug?","url":"#what-is-the-49-day-tcp-bug","depth":2},{"title":"How Does It Affect Your Mac?","url":"#how-does-it-affect-your-mac","depth":2},{"title":"Mac Mini Servers and Headless Macs","url":"#mac-mini-servers-and-headless-macs","depth":3},{"title":"Always-On Development Machines","url":"#always-on-development-machines","depth":3},{"title":"Creative Professionals with Long Render Jobs","url":"#creative-professionals-with-long-render-jobs","depth":3},{"title":"Enterprise and Education Deployments","url":"#enterprise-and-education-deployments","depth":3},{"title":"Home Automation and IoT Hub Macs","url":"#home-automation-and-iot-hub-macs","depth":3},{"title":"How to Know If You Are Currently at Risk","url":"#how-to-know-if-you-are-currently-at-risk","depth":3},{"title":"How to Check Your Mac's Uptime","url":"#how-to-check-your-macs-uptime","depth":2},{"title":"Method 1: The uptime Terminal Command","url":"#method-1-the-uptime-terminal-command","depth":3},{"title":"Method 2: system_profiler Command","url":"#method-2-system_profiler-command","depth":3},{"title":"Method 3: Precise Boot Time with sysctl","url":"#method-3-precise-boot-time-with-sysctl","depth":3},{"title":"Method 4: A Quick Calculation Script","url":"#method-4-a-quick-calculation-script","depth":3},{"title":"Method 5: Activity Monitor","url":"#method-5-activity-monitor","depth":3},{"title":"How to Fix and Prevent the Bug","url":"#how-to-fix-and-prevent-the-bug","depth":2},{"title":"Immediate Fix: Restart Your Mac","url":"#immediate-fix-restart-your-mac","depth":3},{"title":"Prevention Strategy 1: Schedule a Monthly Restart","url":"#prevention-strategy-1-schedule-a-monthly-restart","depth":3},{"title":"Prevention Strategy 2: Automated Restart with pmset","url":"#prevention-strategy-2-automated-restart-with-pmset","depth":3},{"title":"Prevention Strategy 3: Automated Restart with launchd","url":"#prevention-strategy-3-automated-restart-with-launchd","depth":3},{"title":"Prevention Strategy 4: Uptime Monitoring Script","url":"#prevention-strategy-4-uptime-monitoring-script","depth":3},{"title":"Prevention Strategy 5: Using the shutdown Command Directly","url":"#prevention-strategy-5-using-the-shutdown-command-directly","depth":3},{"title":"Is a Patch Coming?","url":"#is-a-patch-coming","depth":2},{"title":"Current Status","url":"#current-status","depth":3},{"title":"Why Hasn't Apple Patched It Sooner?","url":"#why-hasnt-apple-patched-it-sooner","depth":3},{"title":"The Technical Deep Dive: XNU Kernel Integer Overflow","url":"#the-technical-deep-dive-xnu-kernel-integer-overflow","depth":2},{"title":"The Mechanics of the Overflow","url":"#the-mechanics-of-the-overflow","depth":3},{"title":"Why Wasn't This Caught?","url":"#why-wasnt-this-caught","depth":3},{"title":"The Correct Fix","url":"#the-correct-fix","depth":3},{"title":"What About Other Apple Platforms?","url":"#what-about-other-apple-platforms","depth":3},{"title":"Historical Context: This Isn't the First Time","url":"#historical-context-this-isnt-the-first-time","depth":2},{"title":"The Windows 49.7-Day Bug","url":"#the-windows-497-day-bug","depth":3},{"title":"The Irony","url":"#the-irony","depth":3},{"title":"Other Notable Timer Overflow Bugs in Computing History","url":"#other-notable-timer-overflow-bugs-in-computing-history","depth":3},{"title":"Troubleshooting: Signs Your Mac Has Hit the Bug","url":"#troubleshooting-signs-your-mac-has-hit-the-bug","depth":2},{"title":"Primary Symptoms","url":"#primary-symptoms","depth":3},{"title":"How to Distinguish from Other Network Problems","url":"#how-to-distinguish-from-other-network-problems","depth":3},{"title":"Network Diagnostic Commands","url":"#network-diagnostic-commands","depth":3},{"title":"What to Do When You Confirm the Bug","url":"#what-to-do-when-you-confirm-the-bug","depth":3},{"title":"FAQ","url":"#faq","depth":2},{"title":"Is my Mac affected by the 49-day TCP bug?","url":"#is-my-mac-affected-by-the-49-day-tcp-bug","depth":3},{"title":"How often should I reboot my Mac to avoid the bug?","url":"#how-often-should-i-reboot-my-mac-to-avoid-the-bug","depth":3},{"title":"Will Apple fix this bug?","url":"#will-apple-fix-this-bug","depth":3},{"title":"Does the bug affect both Apple Silicon and Intel Macs?","url":"#does-the-bug-affect-both-apple-silicon-and-intel-macs","depth":3},{"title":"Can I check my Mac's uptime remotely?","url":"#can-i-check-my-macs-uptime-remotely","depth":3},{"title":"Conclusion","url":"#conclusion","depth":2},{"title":"Related Resources","url":"#related-resources","depth":3}],"estimatedTime":27}