3 ms·
Segmentation faults are a bad example of a fault you don't want in a safety-critical system. A crash is okay, because you will usually have some sort of fall-b
by aidenn0 9y ago
Segmentation faults are a bad example of a fault you don't want in a safety-critical system. A crash is okay, because you will usually have some sort of fall-back (e.g. most power steering systems work unpowered). It's non-crashes that cause silent improper behavior that are bad.
Of course, a segmentation fault is usually a symptom of pointer misuse, which means your code is likely to also suffer from corruptions.
- AnimalMuppet 9y agoNot all systems work with the software down. Yes, power steering works with the power down, but that's for an engine failure, not for an electronics failure or software crash. But I believe that airplanes that use software to adjust the wing control surfaces move them to neutral positions on software failure. (I can't prove that, and I have no first-hand knowledge - just recall hearing it once, if I remember correctly). That means that, while the software's down, the wings won't break off, and it won't crash due to the control surfaces doing something bizarre, but you can't navigate the plane. That's still pretty bad.
- aidenn0 9y agoThere are hard realtime systems for which segfaults are a game over, but even for the airplane, there will be a watchdog triggered and the system reboots. This means your control surfaces are neutral for about a second. There are some situations in which that could be fatal, but it typically is not. If the system gets in a state where it is in a reboot loop, that is obviously bad, but those are more tractable to fix. In any event, I believe that FAA requires semi-formal analysis for software the failure of which would cause loss of life, but I might be wrong.
- nickpsecurity 9y agoHere's the regulations they usually go by: https://en.wikipedia.org/wiki/DO-178B https://en.wikipedia.org/wiki/DO-178B https://en.wikipedia.org/wiki/DO-178C https://en.wikipedia.org/wiki/DO-178C There's an ecosystem of products developed this way, products such as static analyzers to help develop them, and even companies assisting in any part of the lifecycle. Market shifted toward reusable components for things such as RTOS's and middleware. Examples include INTEGRITY-178B, LynxOS-178B, Alt's OpenGL + driver for Radeon, partitioning Ethernet/networking/filesystems, Esterel SCADE, SPARK Ada, and so on. Lots of good stuff came from this. On a tangent note, it's why I'm for software regulation where the useful subset of assurance methods that make those great become part of the requirements for commercial software. Defects will go down and predictability up across the board. Things will get more expensive with development slowing down a bit. That will probably be a good thing given Worse is Better effect market has been doing. I went into more detail on regulation prior results and some predicted ones here: https://www.schneier.com/blog/archives/2016/11/regulation_of_t.html#c6739118 https://www.schneier.com/blog/archives/2016/11/regulation_of...
- skykooler 9y agoCommercial aircraft have mechanical fallbacks for all controls, and emergency protocols for if some controls don't work (for example, using spoilers to turn if ailerons are inoperative). Many military jets have pure software control, as they are aerodynamically unstable and are unable to be flown safely by hand if the fly-by-wire system goes down; however, the procedure for a system failure in a military jet is usually "eject!", which is not feasible for passenger aircraft.
- WalterBright 9y agoThe Boeing 757 had 3 independent hydraulic systems, with 3 actuators per surface. Any two could overpower the 3rd. Any software in the loop was dual, written on different hardware using different algorithms, with a comparator that would physically disconnect both if they disagreed. The pilot could also physically disconnect them via circuit breakers. There were also various mechanisms to prevent the surfaces from going too far (cannot move full travel at 500 mph, it would rip the airplane apart). This is all very serious stuff, and was worked over by a lot of people imagining every perverse thing that could happen, and going through the list of things that had happened, to ensure it is safe. The track record of the 757 in service shows how effective this is: https://en.wikipedia.org/wiki/Category:Accidents_and_incidents_involving_the_Boeing_757 https://en.wikipedia.org/wiki/Category:Accidents_and_inciden... None of them resulted in recommendations for design changes.
- srcmap 9y agoThis remind me of debug a flight control problem with my son's model airplane. We did a foam board stretch build of Model Airplane couple years ago. https://www.flitetest.com/articles/ft-guinea-build https://www.flitetest.com/articles/ft-guinea-build After we flew a few times, we added a servo to the cargo bay to be open and drop small parachute from it. After than, my son kept complained that he would loss control for 1-2 seconds while the plane is in the air from time to time. After research on the net, eventually I figure out it was the addition servo. Each servo in that air plane use about 1 Amp of current depend on condition. The 5th servo actually drew enough current that causes the remote receiver to reboot while the plane is in flight. That was a fun bug to figure out. The RC receiver is actually very good design which can be reboot and be operational in ~1 seconds.
- WalterBright 9y ago> Segmentation faults are a bad example of a fault you don't want in a safety-critical system. A safety critical system, absolutely must be able to handle seg faults without compromising safety. Any system that requires that a seg fault will not occur is not a safe system.