Increasingly, critical flight functionality is implemented in software, but traditional (integrated) vehicle health management (IVHM) has primarily addressed hardware faults. All fielded software has residual errors, and the marginal costs to remove errors grow as the target residual error rate decreases. Our innovation is the development of tools, architectural concepts and software development methodologies to extend IVHM systems to detect, isolate and recover from software errors, as a cost effective way to increase the reliability and robustness of flight software. Software fault detection, isolation and recovery (SFDIR) fixes or contains the impact of faults and reduces the possibility of catastrophic loss. Each phase ? detection, isolation, and recovery ? raises new research challenges. This work addresses automated diagnostics of mission-critical avionics and middleware or software toolkits to lower the cost of developing online health monitoring applications. Our technical objectives are to detect, by code instrumentation, when the software state violates explicated safety constraints; using model-based reasoning and program analysis techniques, to trace from symptom to error source; and to recover from errors in a safe way preserving or replacing as much functionality as possible, and in all cases "to do no harm". This technology may also be applied to monitor potential security threats.