Free Republic
Browse · Search
News/Activism
Topics · Post Article

Skip to comments.

The trouble with Rover is revealed
EE Times ^ | 2/20/04 | Ron Wilson

Posted on 02/21/2004 3:20:02 PM PST by LibWhacker

SAN MATEO, Calif. — When the Mars rover Spirit went dark on Jan.21 a Jet Propulsion Laboratory team undertook to reprogram the craft's computer only to find themselves introducing an unpredictable sequences of events. The trouble with the Mars rover Spirit started much earlier in the mission than the day the craft stopped communicating with ground controllers.

"It was recognized just after [the June 2003] launch that there were some serious shortcomings in the code that had been put into the launch load of software," said JPL data management engineer Roger Klemm. "The code was reworked, and a complete new memory image was uploaded to the spacecraft and installed on the rover shortly after launch."

That appeared to fix the problems that had been identified with the initial load. But what no one at JPL could have anticipated was that the new load also made possible a totally implausible sequence of events that would, many months later, silence Spirit.

The Spirit rover has a radiation-hardened R6000 CPU from Lockheed-Martin Federal Systems at the heart of the system. The processor accesses 120 Mbytes of RAM and 256 Mbytes of flash. Mounted in a 6U VME chassis, the processor board also has access to custom cards that interface to systems on the rover.

The operating system is Wind River Systems' Vx-Works version 5.3.1, used with its flash file system extension. In operation, the real-time OS and all other executable code are RAM-resident.

The flash memory stores executable images that are loaded into RAM at system boot. Separately, about 230 Mbytes are used to implement a flash file system that stores “data products,” or data files that are created by the rover's subsystems and held for transmission to Earth.

Among the data products are the images created by the rover's cameras.

“Part of my responsibility in the data management team is to keep track of the data files that are created, transmitted and deleted on the rover during the mission,” Klemm explained. “We recognized early in the planning process that the flash file system had a limited capacity for files. It is not just a limitation in the flash itself but also in the directory structure."

Klemm explained that as data is collected by Spirit, files are created and stored in the flash file system until a communications window opens — an opportunity to transmit the data either directly to Earth or to one of the two orbiters circling the Red Planet. Then the files are transmitted. They are still held in the flash system until retrieved and error-corrected on Earth. If data is missing, requests are sent for retransmission. If the data is intact, a command is sent to delete the received files.

"But there were also directories of files already placed into the file system in the launch load," Klemm said. "When we uploaded a new image to the rover, we recognized that those files would have to be deleted, because they were being replaced by a new set using different directories."

Accordingly, on Martian day 15 (or “sol 15”) of rover operation, a utility was uploaded to the rover to find and delete the old directories.

Murphy strikes on Mars

But the transmission that uploaded the utility was a partial failure: Only one of the utility program's two parts was received successfully. The second part was not received, and so in accordance with the communications protocol it was scheduled for retransmission on sol 19.

Thus was the fuse lit on a software hand grenade.

The data management team's calculations had not made any provision for leftover directories from a previous load still sitting in the flash file system.

As Murphy would have it, earlier, sol 19 Spirit attempted to allocate more files than the RAM-based directory structure could accommodate. That caused an exception, which caused the task that had attempted the allocation to be suspended. That in turn led to a reboot, which attempted to mount the flash file system. But the utility software was unable to allocate enough memory for the directory structure in RAM, causing it to terminate, and so on.

Spirit fell silent, alone on the emptiness of Mars, trying and trying to reboot. And its human handlers at JPL seemed at a loss to help, unable to diagnose a system they could not see.

Luckily, early in the process of proposing failure scenarios, someone remembered the earlier failure to upload the second piece of the utility. The scenario was modeled, and it was discovered that a VxWorks flag that causes a task to be suspended on a memory allocation failure was set in the existing image.

"The irony of it was that the operating system was doing exactly what we'd told it to do," Klemm lamented.Working on the theory that the rover was in fact listening and rebooting, the team commanded Spirit to reboot without mounting the flash file system.

The team then uploaded a script of low-level file manipulation commands that worked directly on the flash memory without mounting the volume or building the directory table in RAM. Using the low- level commands, about a thousand files and their directories — the leftovers from the initial launch load — were removed.

"At that point we mounted the flash file system and ran a checkdisk utility," Klemm said. To everyone's enormous relief, the mount was successful.

"As we had anticipated, there was some corruption from the event, so that was corrected," Klemm added. "In the process of going through the contents of the file system, we discovered a system log in which the problem was documented, step by step, right up to the allocation request that failed."

Klemm said that with the leftover directories and their files removed, the system is now functioning well. But just in case, the team is working on an exception-handler routine that will more gracefully recover from an allocation failure.

As a postscript, Klemm noted that the other day he heard a car commercial on the radio that made reference to the Mars rover, comparing, for example, the car's speed over the ground to Spirit's. In the process of touting the car's extended-warranty program, the ad noted that the Mars rover came with "interplanetary roadside assistance." "That phrase just stuck in my mind," Klemm said. " love it."


TOPICS: News/Current Events
KEYWORDS: directory; file; flash; jpl; mars; memory; nasa; rover; spirit; techindex
Navigation: use the links below to view more comments.
first previous 1-2021-4041-52 last
To: djf
hehe ... no kidding ... the big thrill for the Rover was when you won the game and the cards go bouncing all over the screen ... lol
41 posted on 02/21/2004 8:44:52 PM PST by Bobby777
[ Post Reply | Private Reply | To 40 | View Replies]

To: El Gran Salseron
While we are on the subject, would you happen to have a cheat for ms solitaire?

http://www.cheatchannel.com/files/windowssoe.htm

I found this on Google ... 3.x above

Draw One Card: Cheat mode (Windows 3.x): ---------------------------------------- Start a three card draw game. Hold [Ctrl] + [Alt] + [Shift] and click on the deck to only draw one card.

this also appears to work on my Windows 98 SR2 ... happy Solitaire!
42 posted on 02/21/2004 8:52:32 PM PST by Bobby777
[ Post Reply | Private Reply | To 17 | View Replies]

To: mosel-saar-ruwer
Your reply cites a good example of what I was talking about but in detail. Oftentimes the problem I have is user interface and output controls. These should be relatively easy to deal with but if communication breaks down so does the outcome. Overall, considering the complexity of most jobs, the SW guy does a good job and the systems work, but dealing with constant upgrades is a pain especially in commercial and industrial applications where operators must be made aware of changes and the documentation must be updated and controlled as well.
43 posted on 02/22/2004 6:48:45 AM PST by Final Authority
[ Post Reply | Private Reply | To 35 | View Replies]

To: LibWhacker; RadioAstronomer; Phil V.; bonesmccoy; blam; Howlin; *tech_index
Thanks for posting this.
44 posted on 02/23/2004 11:51:46 AM PST by Ernest_at_the_Beach (The terrorists and their supporters declared war on the United States - and war is what they got!!!!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: LibWhacker; onyx
As a postscript, Klemm noted that the other day he heard a car commercial on the radio that made reference to the Mars rover, comparing, for example, the car's speed over the ground to Spirit's. In the process of touting the car's extended-warranty program, the ad noted that the Mars rover came with "interplanetary roadside assistance." "That phrase just stuck in my mind," Klemm said. " love it."

LOL!

45 posted on 02/23/2004 11:56:21 AM PST by Ernest_at_the_Beach (The terrorists and their supporters declared war on the United States - and war is what they got!!!!)
[ Post Reply | Private Reply | To 1 | View Replies]

To: Ernest_at_the_Beach

LOL!
46 posted on 02/23/2004 12:56:26 PM PST by onyx (Your secrets are safe with me and all my friends.)
[ Post Reply | Private Reply | To 45 | View Replies]

To: Final Authority; KayEyeDoubleDee
Your reply cites a good example of what I was talking about but in detail. Oftentimes the problem I have is user interface and output controls. These should be relatively easy to deal with but if communication breaks down so does the outcome. Overall, considering the complexity of most jobs, the SW guy does a good job and the systems work, but dealing with constant upgrades is a pain especially in commercial and industrial applications where operators must be made aware of changes and the documentation must be updated and controlled as well.

You know what I think is possibly the most difficult task in writing a program? Especially if you don't know a priori [before starting the program] how long the program will run?

My Answer: Stopping the program. Getting a program up and running is pretty trivial [in and of itself], but stopping a running program is so difficult it's nigh unto impossible. If I were a team leader on a big software project, I'd design every system backwards: "OK, fellas, let's start our planning phase by asking ourselves: How will we go about shutting down this system?"

Figuring out how to start the system would be the very last step in the design phase.

47 posted on 02/23/2004 1:23:22 PM PST by mosel-saar-ruwer
[ Post Reply | Private Reply | To 43 | View Replies]

To: mosel-saar-ruwer
You know what I think is possibly the most difficult task in writing a program? Especially if you don't know a priori [before starting the program] how long the program will run?

I've never had this problem/insight/epiphany.

48 posted on 02/23/2004 6:06:44 PM PST by KayEyeDoubleDee (const tag& constTagPassedByReference)
[ Post Reply | Private Reply | To 47 | View Replies]

To: mosel-saar-ruwer
a running program is so difficult it's nigh unto impossible

Whoops. This is the part that I've never had trouble with...

49 posted on 02/23/2004 6:10:46 PM PST by KayEyeDoubleDee (const tag& constTagPassedByReference)
[ Post Reply | Private Reply | To 47 | View Replies]

To: KayEyeDoubleDee
a running program is so difficult it's nigh unto impossible

Whoops. This is the part that I've never had trouble with...

ARGGGHHHH

stopping a running program is so difficult it's nigh unto impossible

50 posted on 02/23/2004 11:39:25 PM PST by KayEyeDoubleDee (const tag& constTagPassedByReference)
[ Post Reply | Private Reply | To 49 | View Replies]

To: KayEyeDoubleDee
Whoops. This is the part that I've never had trouble with...

Suppose you've got n threads, each keeping tabs on mission critical pieces of data, and suppose each of the n threads can be in m possible states. That gives you n sets of mission critical data in n*m possible states. Suppose further that there might be inter-relationships among the n*m states: If thread i is in state u, then that effects the behavior of thread j, which is in state v.

Now suppose you decide to shut the whole thing down: You've got to send n "kill" signals to each of the threads, and the way each thread responds to the kill signal depends on some possibly fantastically complicated logic describing the state of the relationships between the n threads and their m possible states.

If you're not careful, it's real easy to construct a house of cards where putting thread zero to sleep causes the whole thing to go crazy, and much of your mission-critical data gets lost in the shuffle, or gets overwritten with garbage [or you turn off the patient's ventilator, or you shut down the nuclear power plant's cooling system, or you alter the ICBM's launch status from comatose to pre-launch countdown...].

51 posted on 02/24/2004 9:43:55 AM PST by mosel-saar-ruwer
[ Post Reply | Private Reply | To 49 | View Replies]

To: mosel-saar-ruwer
Like I said, I've never had this problem. Its possible that m threads have n states, each with different reactions to a shutdown event, but, in my experience, not very likely.
52 posted on 02/24/2004 12:20:05 PM PST by KayEyeDoubleDee (const tag& constTagPassedByReference)
[ Post Reply | Private Reply | To 51 | View Replies]


Navigation: use the links below to view more comments.
first previous 1-2021-4041-52 last

Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.

Free Republic
Browse · Search
News/Activism
Topics · Post Article

FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson