Coverity Prays Curiosity Code Won’t Kill Another Mars Mission

Good quality software is essential for a successful Mars mission

Development testing company Coverity has revealed that it was working alongside scientists from NASA Jet Propulsion Laboratory (JPL), testing the quality of the two million lines of code written for the latest Mars exploration mission.

The company was responsible for making sure software that controls the flight and onboard functions of the Curiosity Rover was free of defects and glitches before it blasted off towards the red planet.

The final frontier

Development testing is an emerging discipline, designed to help find quality and security problems early in the development cycle, as the code is being written, when they are the easiest and least expensive to fix.

Coverity has over 1,100 customers using its development testing suite of products to automatically test source code for defects that could lead to product crashes, unexpected behaviour and security breaches. Now, it can add NASA to that list.

Curiosity is a car-sized land rover tasked with investigating whether Mars could have ever had environments that could support life. It weighs 900kg, carries a mobile scientific laboratory and is fuelled by 4.8kg of plutonium. The Rover successfully landed on Mars earlier this month.

Given the importance and cost of the $2.5 billion project, the software powering the rover must be reliable and free of defects. After all, a single failure could destroy mankind’s best chance of establishing a foothold on Mars.

The history of Mars exploration is full of troubles caused by bad software. In 1988, Soviet mission Phobos 1 suddenly lost power as a result of a software bug. The Mars Polar Lander crashed in 1999, apparently because of one bad line of software code. The same year, the Mars Climate Orbiter collided with the planet, due to mission software using wrong measurement units. Overall, more than half of Mars missions launched by the Soviet Union, US, Europe and Japan have ended in failure.

In successfully landing on Mars, Curiosity has already beaten the odds. From the inception of the NASA Mars Science Laboratory mission, static analysis has been used by JPL as a key part of the code review process to ensure the success of one of the most complex missions ever undertaken by NASA and the reliability of one of the most complex machines ever sent into space.

“The use of Coverity technology in mission-critical projects with zero tolerance for error is a testament to our unique ability to quickly detect unpredictable and traditionally hard to spot software defects,” said Jennifer Johnson, VP of marketing at Coverity. “We are honoured to have been able to contribute to this significant scientific achievement and help NASA unlock the secrets of potential life on Mars.”

Coverity is no stranger to ambitious projects. Last year, the company announced it had helped CERN hunt down 40,000 software errors in its ROOT system – the C++ framework that is used to store, analyse and visualise data about the Large Hadron Collider.

It is worth noting that Coverity wasn’t the only company testing the Curiosity Rover code. UK software metrics specialists Semmle, led by University of Oxford professor Oege de Moor, had to develop a special tool in its query language to hunt down the bugs in the Entry, Descent and Landing system of the Mars mission. Thanks to their work, the Rover was able to deploy its parachute and safely touch down, after traveling towards the planet at 13,000 miles per hour.

And here are some images of the 3D model of the Curiosity Rover, courtesy of NASA and JPL:

 

How well do you know open-source software? Take our quiz!