Posted: Sat Feb 02, 2008 5:08 pm Post subject: data race bug caused power failure
Data race bug caused power blackout
On August 14 2003 there was a great power black out in North America. As many as 50 million people lost electrical power in a region stretching from Michigan through Canada to New York City. It took three days to restore service to some customers.
There were several factors that contributed to the blackout, but the official report highlights the failure of the alarm monitoring software written in C++ by GE Energy. The software failure wrongly led operators to believe that all was well, and precluded them from rebalancing the power load before the blackout cascaded out of control.
Because the consequences of the software failure were so severe, the bug was analyzed exhaustively. The root cause was finally identified by artificially introducing delays in the code of the software. There were two threads of control that wrote to a common data structure, and through a coding error, they could both update it at the same time. It was a classic race condition, and eventually the program "lost the race", leaving the structure in an inconsistent state. That in turn caused the alarm event handler to go on in an infinite loop, instead of raising the alarm. The biggest power failure in the history of the United States and Canada was caused by a data race bug in some threaded C++ code. Java is equally vulnerable to this kind of bug. It is a lesson for programmers writing multithreaded softwares and a lesson in Programming in general and perhaps to deflate their big ego inflated having been into the business for so long in their career. There is no room for complacency in the business and the solution can not be found in any programming book readily available. This situation and many like this shove a stopping cork in the big blabbering mouth of those who have an attitude and air of “know all” there is to know about programming and building software. Moral is to think and think deep and think right.
i have found this in one of P.V.D. Linden's book. With Slight Modification added at the end
Keep your thinking engine running.
Neo
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum