technology

Macs freeze after 49 days of continuous use, researchers discover

Apple users who leave their Macs running for extended periods of time have been silently affected by a bug that causes the system to malfunction after a specific threshold.

Macos

Macos's 49-day time limit causes network connectivity issues

Researchers at Photon, a company that uses Macs to monitor iMessage services, have discovered that when a Mac reaches exactly 49 days, 17 hours, 2 minutes and 47 seconds of continuous operation, it begins to experience network connectivity problems. Despite appearing to function normally and respond to ongoing connections, the system is unable to create new connections or handle many incoming requests.

The only solution, Photon found, is to restart the affected Macs. However, this is a significant issue for servers and monitoring equipment that rely on continuous operation without interruption.

Photon's investigation revealed that the problem stems from an internal macOS network counter called tcp_now, which tracks the system's uptime from the TCP/IP layer's perspective. This counter is stored in a 32-bit unsigned integer, which has a maximum value of 4,294,967,295 in milliseconds, equivalent to approximately 49 days and 17 hours of operation.

When the counter reaches its limit and resets to zero, Apple's XNU kernel fails to properly handle the rollover, instead keeping the value at its maximum and preventing the system from closing connections and allocating new network resources. This ultimately causes the network to become congested and unresponsive.

Interestingly, this issue is not unique to macOS; Windows 98 also suffered from a similar bug due to a similar 32-bit integer overflow in its TCP/IP stack.

For now, the only solution is to restart affected Macs before they reach the 49-day threshold. Apple is aware of the issue and working on a fix, while Photon is collaborating with the company to ensure a timely and optimal solution.