Post-Mortem Lab

Ariane 5: two computers, one bug, 39 seconds

Europe’s new rocket carried two identical guidance computers for safety. One unprotected number conversion shut both down. Fly flight 501 yourself, then fix it three different ways.

Ref
EP-01
Date
Module
Post-Mortem Lab
Source
ep-01

▶ Watch · the episode

On 4 June 1996, Europe’s new Ariane 5 rocket lifted off on its first flight. On board were two identical guidance computers that tell the rocket which way it is pointing. One did the work; the other stood by, ready to take over if the first one broke.

36.7 seconds after the engines ignited, the backup computer met a number too big for the space it had to fit in, and shut itself down. A moment later the main computer met the same number and did the same. With no guidance left, the rocket steered itself off course, and at 39 seconds it broke apart.

This episode rebuilds that chain as code you can run. Everything below uses the same simulation the episode’s tests check.

Fly it

Press Launch with Ariane 5 selected. Watch three things: the line climbing towards the red limit, the two computers on the right, and the log underneath. Then switch to Ariane 4 and launch again: same software, a slower rocket.

Fig. 02 Flight 501 · the first 45 seconds
Launcher
Fixes
−3.0 safter ignition
Sideways-speed value (BH) vs the most 16 bits can hold
32,767
Main computer
Backup computer
Nose off course · breaks up past 20°
0°

    What happened, in order

    Every step comes from the official inquiry report.

    1. The software was borrowed. Ariane 5’s guidance computers and their software were practically the same as Ariane 4’s, which had flown successfully for years.
    2. Some of it should not have been running. One part of the software, the alignment routine, sets the computer up while the rocket is still on the ground. It is useless once the rocket flies. On Ariane 4 it kept running for about 40 seconds after lift-off, so a countdown that was put on hold could restart quickly. Ariane 5 didn’t need that, but the code was kept so both rockets used the same software.
    3. It squeezed a number into a box without checking it. This routine converted the sideways-speed value into a 16-bit integer. Engineers had found seven conversions like this that could overflow. Four got a check. Three, including this one, didn’t, to keep the computer under 80% busy. The report says the reasoning that the number could never get that big “turned out to be faulty”.
    4. Ariane 5 was faster. It builds up sideways speed five times faster than Ariane 4, so the value passed 32,767. The conversion raised an Operand Error.
    5. Both computers shut down. The rule for any error was: report it, save the details, stop the computer. That makes sense when a part breaks at random, because the backup takes over. But both computers ran the same software on the same numbers. The backup had already stopped, a fraction of a second earlier.
    6. The flight computer steered on nonsense. Instead of directions, the main guidance computer was now sending an error report. The flight computer read it as directions, saw a huge course error that wasn’t there, and swung the nozzles fully to one side. The nose swung past 20° and the rocket broke up.

    Fix it three ways

    Tick each fix in the demo and launch again. Any one of them is enough.

    Fix Where it comes from What changes
    Check the number before converting it The other four conversions already did The value stops at 32,767 instead of raising an error
    Switch off the unneeded code at lift-off The report’s first recommendation The routine never runs in flight, so the value is never computed
    On an error, keep guiding instead of shutting down The report’s third recommendation The error is handled and the computer keeps sending its best estimate

    The report’s second recommendation was to test the real equipment with the real flight path. That is what this episode’s test file does: it flies Ariane 5’s path through the guidance code, expects the failure, then checks each fix. Had a test like that run in 1996, the report says, “the failure mechanism would have been exposed”.

    What I simplified

    The real sideways-speed values are in the board’s restricted technical report, so this simulation models them from the time since lift-off. It’s calibrated to pass 32,767 at 36.7 seconds after ignition, with Ariane 4 building up five times more slowly, as the report says. The lift-off time and how fast the nose swings are tuned to match the report’s timings. The order of events, the shared fault and the fixes are as documented.

    §

    Further reading

    Primary sources first. Everything here is free to read or watch.