Priority inversion killed Mars Pathfinder. Starting a few days after the 1997 landing, the spacecraft's VxWorks operating system began triggering watchdog-initiated full system resets. The root cause: a low-priority meteorology task held a mutex that a high-priority data distribution task needed, while a medium-priority bus maintenance task blocked the low-priority task from ever releasing it. The high-priority task starved. The watchdog noticed. The system rebooted.

The fix was already in VxWorks: priority inheritance, a mechanism that temporarily elevates a low-priority task's scheduling weight when a higher-priority task is blocked waiting on its mutex. Engineers uploaded the configuration change from Earth and enabled it on the mutex in question. The resets stopped. What makes Bhageria's breakdown worth reading is not the solution but the failure mode leading up to launch: engineers observed this exact behavior during ground testing and dismissed it as a transient glitch.

That decision is the real story. A known, reproducible concurrency bug shipped to Mars because no one traced it to its cause. The technical details of the three-task interaction, the mutex timing window, and how VxWorks priority inheritance actually resolves the deadlock are all in the original post. Hackaday also ran their own analysis a decade ago, linked within, which covers complementary technical ground.

[READ ORIGINAL →]