Live data from Hacker News

A macOS bug that causes TCP networking to stop working after 49.7 days

photon.codes

31–40 of 120 posts

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#32
have multiple macOS machines with 600-1000+ day uptimes, which do TCP connections every minute or so at a minimum, they are still expiring their TIME_WAIT connections as normal.

these kernel versions:

Darwin Kernel Version 20.6.0: Thu Jul 6 22:12:47 PDT 2023; root:xnu-7195.141.49.702.12~1/RELEASE_ARM64_T8101 arm64

Darwin Kernel Version 17.7.0: Wed Apr 24 21:17:24 PDT 2019; root:xnu-4570.71.45~1/RELEASE_X86_64 x86_64

so... wonder what that's about?

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#33

Earlier quoted context omitted.

Individual TCP connections don't need to live that long. Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections.

> Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections. Current `uptime` on my work MacBook (macOS 15.7.4): 17:14 up 50 days, 22 mins, 16 users, load averages: 2.06 1.95 1.94 Am I supposed to be having issues with TCP connections right now? (I'm not.) My personal iMac is at 279 days of uptime.

I'm just going from the bug description in the article, but it seems that depending on your network activity, the exact time you will actually notice an impact could vary quite a bit

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#34
I got tired of the AI writing before finding out if they even attempted to contact Apple about this issue? Does anyone know?

Also, massively over-dramatised. Yes, a bug worth finding and knowing about, but it’s not a time bomb - very few users are likely to be affected by this.

Knowing the nature of OS kernels, I’m guessing even just putting a Mac laptop to sleep would be enough to avoid this issue as it would reset the TCP stack - which may be why some people are reporting much longer uptimes without hitting this problem, since (iirc) uptime doesn’t reset on Macs just for a sleep? Only for a full reboot?

Anyway, all in all, yeah hopefully Apple fix this but it’s not something anyone needs to panic about.

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#35

Earlier quoted context omitted.

Individual TCP connections don't need to live that long. Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections.

> Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections. Current `uptime` on my work MacBook (macOS 15.7.4): 17:14 up 50 days, 22 mins, 16 users, load averages: 2.06 1.95 1.94 Am I supposed to be having issues with TCP connections right now? (I'm not.) My personal iMac is at 279 days of uptime.

if it's in keepalive or retransmission timers, desktop use would mask it completely. browsers reconnect on failure, short-lived requests don't care about keepalives. you'd only notice in things that rely on the OS detecting a dead peer — persistent db connections, ssh tunnels, long-running streams.

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#36

Earlier quoted context omitted.

I was just trying to remember where did I last see this magic number of days.

The article does mention a few instances found over the years, including the windows one. That’s the one I remember though because we used to joke it was not a big deal - the only way for a windows 95 computer to reach 49 days of uptime is if it’s literally not doing anything or being used in any way. Windows 95 would crash if you looked at it funny.

OS/2 had a similar bug, and people used that as a server, so I'm sure it bit some people.

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#37

Earlier quoted context omitted.

Individual TCP connections don't need to live that long. Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections.

> Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections. Current `uptime` on my work MacBook (macOS 15.7.4): 17:14 up 50 days, 22 mins, 16 users, load averages: 2.06 1.95 1.94 Am I supposed to be having issues with TCP connections right now? (I'm not.) My personal iMac is at 279 days of uptime.

According to the post:

$ netstat -an | grep -c TIME_WAIT

If the count it returns keeps growing, you're seeing a slow leak. At some point, new connections will start failing. How soon depends entirely on how quickly your machine closes new connections.

Since a lot of client traffic involves the server closing connections instead, I imagine it could take a while.

It's unclear if it'll leak whenever your mac closes or only when it fails to get a (FIN, ACK) back from the peer so the TCP_WAIT garbage collector runs. If it's the latter, then it could take substantially longer, depending on connection quality.

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#38

This made me remember some folks that are "I never reboot my MacOS and it's fine!". Yeah probably it is but I'll never trust any computer without periodic reboots lol.

$ uptime

22:22:45 up 3748 days 21:20, 2 users, load average: 1.42, 1.36, 1.02

It's very funny, I think it's because my laptop battery died and when I replaced it, it had to update the time from 10 years ago? I'm not sure why, as the laptop is from mid-2012.

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#39

Earlier quoted context omitted.

> Once a macOS system reaches 49.7 days of uptime, this bug starts affecting all TCP connections. Current `uptime` on my work MacBook (macOS 15.7.4): 17:14 up 50 days, 22 mins, 16 users, load averages: 2.06 1.95 1.94 Am I supposed to be having issues with TCP connections right now? (I'm not.) My personal iMac is at 279 days of uptime.

According to the post: $ netstat -an | grep -c TIME_WAIT If the count it returns keeps growing, you're seeing a slow leak. At some point, new connections will start failing. How soon depends entirely on how quickly your machine closes new connections. Since a lot of client traffic involves the server closing connections instead, I imagine it could take a while. It's unclear if it'll leak whenever your mac closes or o…

    % netstat -an | grep -c TIME_WAIT | wc -l
       1

Re: A macOS bug that causes TCP networking to stop working after 49.7 days

#40

I got tired of the AI writing before finding out if they even attempted to contact Apple about this issue? Does anyone know? Also, massively over-dramatised. Yes, a bug worth finding and knowing about, but it’s not a time bomb - very few users are likely to be affected by this. Knowing the nature of OS kernels, I’m guessing even just putting a Mac laptop to sleep would be enough to avoid this issue as it would reset…

Apparently no. They'll be fixing it themselves? It really reads like Claude run amok on the blog.

> We are actively working on a fix that is better than rebooting — a targeted workaround that addresses the frozen tcp_now without requiring a full system restart. Until then, schedule your reboots before the clock runs out.

Post reply on HN