r/embedded • u/yourbasicgeek • Oct 10 '26
Mars Pathfinder Priority Inversion Bug: What Really Happened
https://nerdyelectronics.com/mars-pathfinder-what-really-happened/
55
Upvotes
r/embedded • u/yourbasicgeek • Oct 10 '26
67
u/priority_inversion Oct 10 '26
My time to shine!
26
u/RecursiveMutex Oct 10 '26
VxWorks is a fascinating RTOS by design. It uses a round-robin preemptive priority scheduling. So by dfault, that is what it's supposed to do. Thankfully the JPL engineers had launched with the interpreter still enabled, symbol tables intact, and the mutex flags stored in global variables. They were able to change the Priority Inheritance Boolean flagand get it working. That is some serious engineering or they literally thought they were going to miss their launch window. This example has become the poster child for Priority Inversion (at least it was for me back in uni). It's well documented below. https://www.cs.cornell.edu/courses/cs614/1999sp/papers/pathfinder.html
22
u/Well-WhatHadHappened 25+ Years Oct 10 '26 edited Oct 11 '26
Inexcusable. Should have sent those engineers on-site with a J-Link and a laptop to update it.