Or: how a system's uptime can trigger a buffer overflow.
Let's do some quick math.
The maximum value a 32bit integer can hold:
2^31 ‐ 1 = 2.147.483.647.
The amount of seconds in 248 days, keeping time to one hundredth of a second accuracy:
248 days x 24 hours x 60 minutes x 60 seconds x 100 = 2.142.720.000.
Those are remarkably close, aren't they? In fact, as soon as day 248 reaches somewhere around 14:00h, the value exceeds the maximum value a 32bit integer can hold.
Boeing learned this with its 787s.
We have been advised by Boeing of an issue identified during laboratory testing.
The software counter internal to the generator control units (GCUs) will overflow after 248 days of continuous power, causing that GCU to go into failsafe mode.
If the four main GCUs (associated with the engine mounted generators) were powered up at the same time, after 248 days of continuous power, all four GCUs will go into failsafe mode at the same time, resulting in a loss of all AC electrical power regardless of flight phase.
Federal Aviation Administration
This issue reminded me of a problem some Dell EqualLogic storage arrays experienced as well.
While running firmware version 7.0.x, unexpected controller failovers may have occurred at 248 consecutive days of uptime.
Dell EQL firmware v7.0.9
Storing the system uptime in a 32bit integer? Not the best idea, so it seems.