Comment by anentropic
6 years ago
It does make you wonder what other bugs the software has though? Presumably it's not intentionally designed so that it needs rebooting periodically...
6 years ago
It does make you wonder what other bugs the software has though? Presumably it's not intentionally designed so that it needs rebooting periodically...
> It does make you wonder what other bugs the software has though? Presumably it's not intentionally designed so that it needs rebooting periodically...
Not necessarily. If the computer will never actually need to run for 51 days continuously, it may be a reasonable trade-off to require the reboot instead of writing (potentially buggy) code to handle a scenario that can be easily prevented from happening.
It reminds me of this story:
https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...:
> I was once working with a customer who was producing on-board software for a missile. In my analysis of the code, I pointed out that they had a number of problems with storage leaks. Imagine my surprise when the customers chief software engineer said "Of course it leaks". He went on to point out that they had calculated the amount of memory the application would leak in the total possible flight time for the missile and then doubled that number. They added this much additional memory to the hardware to "support" the leaks. Since the missile will explode when it hits its target or at the end of its flight, the ultimate in garbage collection is performed without programmer intervention.
If it were working as designed (and properly documented), it does not seem likely that the FAA would find it necessary to issue an Airworthiness Directive.
It's like Facebook engineering, their PHP infrastructure is leaking like hell. (I worked on it)
But it's not an issue, because servers are constantly redeployed for each code deploy.
It's been ages since I last saw a PHP script leak anything as it's state should (!) be reset completely, at least on Apache, with every new request.
How did they manage to create leaks? Or was it bugs in their custom PHP interpreter?
1 reply →
To me the implication was not that you should write more potentially buggy code to prevent the need to reboot every 50 days... but rather than you should fix the bug that caused it to need rebooting every 50 days
Not necessarily - memory management depends on the application. There are situations where it is better to just grow memory usage than garbage collect. Since airplanes require very routine maintenance anyway, this maybe be safer.
Lots of things are designed with periodic restarts in mind. From memory, one of the JVM garbage collectors is designed with daily restarts in mind. This is done to avoid having to deal with the expense of memory fragmentation.