frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

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

https://photon.codes/blog/we-found-a-ticking-time-bomb-in-macos-tcp-networking
94•RyanZhuuuu•1h ago

Comments

loloquwowndueo•1h ago
lol reminds me of the windows 95 crash bug after 49.7 days. Have we learned nothing. https://pipiscrew.github.io/posts/why-window/
ok123456•1h ago
Quite literally "the new old thing."
aranelsurion•1h ago
I was just trying to remember where did I last see this magic number of days.
loloquwowndueo•1h ago
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.
flomo•52m ago
OS/2 had a similar bug, and people used that as a server, so I'm sure it bit some people.
StilesCrisis•6m ago
And throws in a Pac-man 8-bit level counter overflow just to remind us that AI cannot be trusted!
larodi•1h ago
49-7=42 it is all clear
auspiv•1h ago
probably same thing for boeing 787 jets - https://www.theregister.com/2020/04/02/boeing_787_power_cycl...

says 51 days, which would be an interesting number of (milli)seconds

otherme123•30m ago
It could be an overflow but related with the frequency at which the register was increasing, rather than the max value of te register. E.g. +1 this uint16 (65535) once every 500,000 cycles on this 32 Mhz chip, that previously was a 1 Mhz chip and never had a problem.
znpy•43m ago
that's why the 49.7 days sounded familiar!
beanjuiceII•1h ago
i'm on sequoia M1 laptop with uptime 16:38 up 228 days, 21:03, 1 user, load averages: 6.14 5.93 5.64

guess i'm marked safe!

otterley•1h ago
Sounds like it affects every open TCP connection, not just OpenClaw. (It's pretty rare for a TCP connection to live that long, though.)
josephcsible•1h ago
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.
CamperBob2•1h ago
Sure they do. They need to live until torn down.

They almost never do live that long, for whatever reason, but they should.

josephcsible•1h ago
I meant that having a connection live that long isn't necessary to trigger this bug. I know that for some workloads, it can be important for connections to live that long.
throw0101d•1h ago
> 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.

spogbiper•54m ago
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
driftcoder•52m ago
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.
Aloisius•52m ago
$ 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.

throw0101d•50m ago

    % netstat -an | grep -c TIME_WAIT | wc -l
       1
Aloisius•32m ago
You want to drop the wc -l.

Mac `grep -c` counts lines that match, so it always prints 1 line, so piping to wc -l will always return 1.

Or just open up and do netstat -an |grep TCP_WAIT and just watch it. If any don't disappear after a few minutes, then you're seeing the issue.

0x457•49m ago
You can run `sysctl kern.boottime` to get when it was booted and do the math from there.

I also can't reproduce. I want to say I have encountered this issue at least once, yesterday I before rebooted my uptime was 60 days.

But it's not instant, it just never releases connections. So you can have uptime of 3 years and not run out of connections or run out shortly after hitting that issue.

gpvos•1h ago
Obviously, OpenClaw is now more important than anything else.
mememememememo•1h ago
For OpenClaw this bug is a security feature
throw03172019•1h ago
I only have 11 days left until my machine crashes and I lose all of my tabs.
dvh•1h ago
Exactly like arduino
gghootch•1h ago
What does this have to do with OpenClaw exactly?
daveorzach•1h ago
If you want to see exactly when your machine will hit this, I threw together a fish shell function that calculates the precise timestamp, mostly vibe coded.

calc_tcp_overflow_time.fish: https://gist.github.com/daveorzach/64538f82a89fa24e5d134557c...

monitor_tcp_time_wait.fish: https://gist.github.com/daveorzach/0964a7a67c08c50043ff707cf...

WesolyKubeczek•1h ago
In case of OpenClaw, this is a feature.
4fterd4rk•1h ago
When some Russians do a prompt injection and OpenClaw is threatening to send your NSFW pics to Grandma unless you give it some Bitcoin all you have to do is drag out the negotiations for 49 days!
MatMercer•1h ago
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.
QuantumNomad_•59m ago
I’m still at where when I connect external hard drive or SSD via USB, use it and then eject it, I shut down the MacBook Pro completely before I unplug the USB cable. Just in case.

The longest uptime I have had on any of my recent laptops is probably around 90 days but that’s because that laptop was sitting in my garage with wall power connected (probably bad for the battery) and some external storage connected and I’d remote into that machine over WireGuard now and then. When I did reboot that machine it was only out of habit that I accidentally clicked on reboot via a remote graphical session.

Most of the time my remote use of the laptop in the garage would be ssh sessions, but occasionally I’d use Remote Desktop. Right after I clicked reboot in the Remote Desktop session I realized what mistake I had just done - I have WireGuard set up to start after login. So after the reboot, I was temporarily unable to get back in. As I was in another country I couldn’t just walk over to the garage. But I do have family that could, so I instructed one of them over the phone on how to log in for me so that WireGuard would automatically start back up. You’d think this would happen only once, but I probably had to send family to the garage on my behalf maybe three or four times after me having made the same mistake again.

For the laptops that I actually carry around and plug and unplug things to etc, normal amount of time between reboots for me is somewhere between every 1 and 3 days. Cold boot is plenty fast anyway, so shutting it down after a day of work or when ejecting an external HDD or SSD doesn’t really cost me any noticeable amount of time.

Delk•35m ago
> I’m still at where when I connect external hard drive or SSD via USB, use it and then eject it, I shut down the MacBook Pro completely before I unplug the cable. Just in case.

That sounds... a bit paranoid? At least on Linux (Gnome), if I click to "safely remove drive" it actually powers off the drive and stops external mechanical drives from spinning. No useful syncing is going to happen anyway once a hard drive no longer spins. A modern OS should definitely be reliable enough that it can be trusted to properly unmount a drive.

> For the laptops that I actually carry around and plug and unplug things to etc, normal amount of time between reboots for me is somewhere between every 1 and 3 days. Cold boot is plenty fast anyway, so shutting it down after a day of work or when ejecting an external HDD or SSD doesn’t really cost me any noticeable amount of time.

I personally don't reboot my laptop that often, but it's not because of a boot taking too much time. It's because I like to keep state: open applications, open files, terminal emulator sessions, windows on particular virtual desktops, etc.

exe34•51m ago
$ 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.

jasonjayr•44m ago
> 17:27:20 up 1112 days, 10:36, 50 users, load average: 0.20, 0.19, 0.18

I thought I had a record going here with my Dell laptop, but I guess you win. After a certain point, I just decided to see how long I can make it go.

Philpax•1h ago
Ctrl+F "OpenClaw". No results. Que?
cute_boi•1h ago
too much words and text for simple thing..... probably written by openclaw
jijji•1h ago
I thought Alan Cox fixed all the TCP IP bugs in the early 1990s lol
toast0•3m ago
Did Alan Cox work on tcp? I thought he was working on memory and stuff.

That's what the wiki says anyway: [1], and a publication with his name is about huge pages [2]

[1] https://wiki.freebsd.org/AlanCox

[2] https://www.usenix.org/legacy/events/osdi02/tech/full_papers...

awithrow•1h ago
A ticking time bomb? What an overly dramatic way to talk about a bug that requires a reboot. Its not even a hard crash.
mcculley•1h ago
> It will not be caught in development testing — who runs a test for 50 days?

You don't have to run the system for 50 days. You can simulate the environment and tick the clock faster. Many high reliability systems are tested this way.

sho_hn•59m ago
Heck, many video games are tested this way.
hombre_fatal•35m ago
It uses a hardware clock, one that pauses during sleep. There is no tick.

If you wanted to see how time impacts the program, you'd prob change fns like calculate_tcp_clock to take uptime as an argument so that you could sanity check it.

tjohns•58m ago
Does anybody else find these AI-authored blog posts difficult to read? Something about the writing style and structure just feels unnatural, it's hard put my finger on it.

At the very least, the writing takes way too long to get to a point.

gowld•23m ago
AI does a good job of condensing the blog post to 2 paragraphs -- Mac refuses to let the tcp_now clock rollover when it exceeds the max value in its data type.
justinfrankel•57m ago
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?

justinfrankel•45m ago
ah reading their analysis, there are errors that explain this. Particularly this:

  tcp_now   = 4,294,960,000  (frozen at pre-overflow value)
  timer     = 4,294,960,000 + 30,000 = 4,294,990,000
              (exceeds uint32 max → wraps to a small number)
timer wraps to a small number, they say

  TSTMP_GEQ(4294960000, 4294990000)
they forgot to wrap it there, it should be TSTMP_GEQ(4294960000, small_number)

  = (int)(4294960000 - 4294990000)
  = (int)(-30000)
  = -30000 >= 0 ?  → false!
wrong!

There may be a short time period where this bug occurs, and if you get enough TCP connections to TIME_WAIT in that period, they could stick around, maybe. But I think the original post is completely overreacting and was probably written by a LLM, lol.

comex•45m ago
The bug was introduced only last year in macOS 26:

https://github.com/apple-oss-distributions/xnu/blame/f6217f8...

Aloisius•26m ago
Interesting. The article mentions complaints on the forums running Catalina, so that must be something else.

Edit: Actually looking at the older code, it looks like it may have the same problem on intel macs since timeval.tv_sec is a long and there's a comparison that doesn't handle it wrapping.

groby_b•16m ago
The article is written using AI, so unless you verified the complaints, the safe default assumption is that they don't exist.
Aloisius•2m ago
It definitely exists and it was someone on an Intel Mac which looks like it would have run into the same problem with the older code.

https://discussions.apple.com/thread/250867747

js2•13m ago
As someone who also operates fleets of Macs, for years now, there is no possible way this bug predates macOS 26. If the bug description is correct, it must be a new one.
plorkyeran•17m ago
> Apple Community #250867747: macOS Catalina — "New TCP connections can not establish." New connections enter SYN_SENT then immediately close. Existing connections unaffected. Only a reboot fixes it.

This is a weird thing to cite if it's a macOS 26 bug. I quite regularly go over 50 days of uptime without issues so it makes sense for it to be a new bug, and maybe they had different bugs in the past with similar symptoms.

EdNutting•53m ago
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.

delusional•50m ago
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.

RyanZhuuuu•49m ago
yes we have reported to Apple and they have filed it in their internal system.
supliminal•31m ago
Windows 98 SE reporting in.
apatheticonion•27m ago
Ignoring the AI article contents.

God I wish Apple offered first party support for Linux on Mac computers.

poppafuze•10m ago
https://news.ycombinator.com/item?id=41939318
fortran77•6m ago
Nobody keeps their Macs running for more than 49.7 days? We have Windows Servers here (with long-term TCP/IP connections) that are only rebooted every 6 months to apply patches.

Show HN: MemberLane – Paid Communities on Telegram, Discord, and WhatsApp

https://www.memberlane.app
1•grene98•1m ago•0 comments

Reddit is the #1 most cited source across every major AI search platform

https://virtualuncle.com/answer-engine-optimization-aeo-guide-2026/
3•svrbvr•4m ago•0 comments

Kalshi wins appeal against New Jersey in Third Circuit

https://www.dopaminemarkets.com/p/prediction-markets-vs-states-the
1•astorplace•5m ago•0 comments

Show HN: A bespoke magazine for the kid in your life

https://www.juiceboxjournal.com/
1•easymode•8m ago•0 comments

Show HN: Clickly – tool for designers and engineers to build mobile apps

https://clickly.app
1•roskoalexey•13m ago•0 comments

Show HN: Next Moca – control plane for AI agents (pre-seed @ $10M)

https://www.nextmoca.com
1•swanandrao•13m ago•0 comments

Matrix-Kernel-Root

https://github.com/M2KR4R/matrix-kernel-root
1•M2KR4R•14m ago•0 comments

Um método informático para crianças feito com amor

https://www.amazon.com.br/dp/B0DN62YNJF
3•Hanoverdoes•16m ago•1 comments

Anthropic, OpenAI and Google sharing Intel to block Chinese distillation

https://www.bloomberg.com/news/articles/2026-04-06/openai-anthropic-google-unite-to-combat-model-...
2•nikcub•16m ago•0 comments

Building a DIY OpenClaw

https://ben.page/claude-mac
1•j03b•17m ago•0 comments

Bernie Sanders: "AI Is a Threat to Everything the American People Hold Dear"

https://www.wsj.com/opinion/ai-is-a-threat-to-everything-the-american-people-hold-dear-a3286459
3•fortran77•18m ago•3 comments

Real-time tracker for NASA's Artemis II Moon mission

https://artemis.fyi/
1•jsk2600•19m ago•0 comments

GitHub Copilot CLI combines model families for a second opinion

https://github.blog/ai-and-ml/github-copilot/github-copilot-cli-combines-model-families-for-a-sec...
1•salkahfi•20m ago•0 comments

Show HN: CacheZero – Karpathy's LLM wiki idea as one NPM install

1•swarajbachu•23m ago•0 comments

Anthropic expands partnership w Google and Broadcom for multiple GW of compute

https://www.anthropic.com/news/google-broadcom-partnership-compute
1•l1n•24m ago•0 comments

Optimizing Time, Cost, and Generalization in Distributed Large-Batch Training

https://arxiv.org/abs/2603.18112
1•PaulHoule•25m ago•0 comments

PrismML – Announcing 1-bit Bonsai: The First Commercially Viable 1-bit LLMs

https://prismml.com/news/bonsai-8b
1•janandonly•26m ago•0 comments

Zed: A sans for the needs of the 21st century

https://www.typotheque.com/blog/zed-a-sans-for-the-needs-of-21century
1•kaitak•26m ago•0 comments

Show HN: Hippo, biologically inspired memory for AI agents

https://github.com/kitfunso/hippo-memory
5•kitfunso•26m ago•1 comments

An In-Depth Study of Filter-Agnostic Vector Search on PostgreSQL

https://arxiv.org/abs/2603.23710
1•tanelpoder•27m ago•0 comments

Ormah: A living memory layer for your agents. Local. Private. Portable

https://www.ormah.me/
1•r_spade•30m ago•0 comments

Why Are People Injecting Themselves with Peptides?

https://www.newyorker.com/magazine/2026/04/13/why-are-people-injecting-themselves-with-peptides
1•bookofjoe•30m ago•1 comments

Show HN: Luminus, real-time European and UK electricity grid data via MCP

https://github.com/kitfunso/luminus
1•kitfunso•30m ago•0 comments

The Aesthetics of the Japanese Lunchbox by Kenji Ekuan (Book)

https://mitpress.mit.edu/9780262550352/the-aesthetics-of-the-japanese-lunchbox/
1•xbar•38m ago•1 comments

Bitcoin developers are mostly not concerned about quantum risk

https://murmurationstwo.substack.com/p/bitcoin-developers-are-mostly-not
1•greyface-•38m ago•0 comments

Follow-up from Anthropic on usage limits

https://old.reddit.com/r/ClaudeAI/comments/1sat07y/followup_on_usage_limits/
1•Austin_Conlon•39m ago•0 comments

Ask HN: How do you handle marketing as a solo technical founder?

4•lazarkap•39m ago•1 comments

Show HN: Bypass Instagram/TikTok in-app browsers that silently kill conversions

https://nullmark.tech/
1•melvinmorina•39m ago•0 comments

As an autistic person, Claude is the friend I always wanted but never had

https://old.reddit.com/r/ClaudeAI/comments/1sdq4eu/as_an_autistic_person_claude_is_the_friend_i/
5•mjtk•42m ago•1 comments

NYC Families Need over $125,000 in Income to Live in Any Borough

https://www.bloomberg.com/news/articles/2026-04-06/nyc-families-need-over-125-000-in-income-to-li...
15•boh•42m ago•7 comments