2
头图

Hi everyone, I'm Kasong.

A senior programmer once said:

A career that has not experienced p0 level bug

The above famous quote is made up by me. However, as a programmer, bug 'm certainly not surprised by 06184b3595cd81.

How much damage did your bug cause to the company? In this article, we look at a bug that caused a loss of 870 million dollars.

The whole accident

On June 4, 1996, the first Ariane 5 rocket was launched off the coast of French Guiana.

The launch cost 370 million dollars, the rocket carries a communication satellite worth 500 million dollars, and the total investment is 870 million dollars.

37 seconds after takeoff, the rocket turned 90 degrees in the wrong direction, the booster tore in the air, and the spacecraft was swallowed by a huge liquid hydrogen fireball.

火箭爆炸

At the moment of the explosion, the engineer even reported in French: "All settings are normal, and the orbit is normal."

The dignified engineer in the master control room and the commotion behind the crowd indicated that this happened too suddenly.

This catastrophic accident triggered a public investigation, and due to the damage of the satellites carried by the rocket, scientific research on the operation of the Earth’s magnetosphere was postponed for nearly 4 years.

Ariane 5 accident is widely regarded as one of the most expensive bug history.

在附近海滩目睹火箭解体的居民

Cause of the accident

The cause of this accident was caused by a floating point overflow of .

Ariane rockets for application contains a determining rocket upwards or downwards variables, referred horizontal deviation , hereinafter abbreviated as BH .

In the design Ariane 5 previous generation rocket Ariane 4 , the engineer analyzes the BH the boundary conditions, to determine which is never more than a 16-bit integer representation range (-32768 to 32767), this variable is defined as 16-bit integer Type.

But by Ariane 5 , due to the improvement of rocket performance, in most applications, BH is defined as 64-bit floating point number, and some parts are still used due to negligence
Ariane 4 of 16-bit integer.

When these two parts of code are used in combination, it will try to assign a 64-bit floating point number to
16-bit integer.

In the first few seconds of the rocket's ascent, the rocket acceleration is very low, so the conversion between these two values is successful.

Desperately, as the rocket acceleration gets higher and higher, when the value exceeds the 16-bit integers, overflow occurs.

Under normal circumstances, the rocket engine nozzle receives flight control information. But after the overflow occurred, it received a diagnostic bit pattern (indicating that the overflow occurred), which caused the nozzle to make a wrong behavior, and finally a tragedy happened...

postscript

In the end, the European Space Agency formed a team to find clues from the rocket wreckage scattered about 12 square kilometers and recovered the data at the time of the accident.

The accident can be said to be impressive. What impressed you bug , welcome to discuss in the comment section.

Welcome to join the human high-quality front-end framework research group , lead the flight


卡颂
3.1k 声望16.7k 粉丝