Spirit's problem? Could be buffer overflow.
Reconstructing Spirit's hopeful road to recovery
"Right now, our most likely candidate for the issue has been narrowed down a little bit. It is really an issue with the file system in flash. Essentially, the amount of space required in RAM to manage all of the files we have in flash is apparently more than we initially anticipated.