Network system crashes after 49 days without reboot

Network system crashes after 49 days without reboot

Apple laptops like the MacBook Neo, MacBook Air and other models with macOS They could suffer a critical problem after long periods without rebooting. These computers have been found to lose the ability to establish new network connections after exactly 49 days, 17 hours, 2 minutes and 47 seconds of continuous use. A failure that directly affects the macOS TCP/IP stackleaving the system practically incommunicado.

This behavior is not random, but is related to a kernel-level bug in XNUApple’s core, which causes a progressive collapse of connections. Although the system continues to function apparently normally, applications that depend on the internet begin to fail, creating a situation that is difficult to diagnose for many users.

A bug in the macOS kernel causes the network to collapse

The origin of the problem is in an internal variable called tcp_nowused by macOS to measure time in milliseconds within the TCP system. This counter is limited to 32 bitwhich implies that after reaching its maximum value (4,294 million), it returns to zero. However, instead of rebooting properly, the system becomes “stuck” at that point.

This failure causes the TCP system’s internal clock to stop advancing, preventing connections closed in state. TIME_WAIT are disposed of correctly. As a result, these connections accumulate without limit, taking up system resources and, most importantly, exhausting the available ports for new connections.

Connection logging and port exhaustion

When the system stops cleaning these connections, a chain effect occurs. The connections in TIME_WAIT remain indefinitely, causing ephemeral ports—usually 16,000 available— become saturated as the hours go by. From that moment on, the system can no longer open new TCP connections.

This results in application errors, long wait times, and services that stop working. Interestingly, some functions such as ping (ICMP) They are still operational, which further complicates the detection of the problem, since the equipment appears to still be connected to the network.

A classic overflow bug reminiscent of Windows 95

This error belongs to a well-known category in computing: errors due to 32-bit integer overflow. Similar cases have been seen in the past, such as the famous ruling of Windows 95 after 49.7 daysor even the year 2038 problem on Unix systems.

In this case, the bug occurs because the macOS kernel does not correctly manage the reset of the counter, which breaks the internal logic responsible for expiring connections. A small detail in the code that ends up causing a critical failure after weeks of continuous operation.

Restart, the only solution… for now

Currently, the only effective solution is restart your computerwhich resets the counter and returns the system to normal. However, the issue will reappear after another 49.7 days of continuous use, making it an especially problematic bug for professional environments.

This bug is especially relevant in systems that remain active for long periods, such as servers, development equipment, workstations or business infrastructure. In these cases, it is recommended to schedule periodic reboots to avoid system crashes.

Apple could fix it with deeper changes

Although there are possible solutions, such as the use of 64 bit variables To prevent overflow, this would require major kernel changes, additional testing, and full system validation. Therefore, an immediate solution in the form of a simple patch is not expected.

Meanwhile, some developers are already working on possible workarounds, such as kernel hot patcheswhich could avoid the need to reboot the system. We will have to wait for future macOS updates to see how Apple addresses this problem.