Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

The Mars Pathfinder computer bug was a priority inversion in the VxWorks real-time operating system, not a failed processor or damaged spacecraft hardware. A low-priority meteorology task called ASI/MET held a mutex used by the system’s select() and pipe communication path. Medium-priority work repeatedly preempted ASI/MET, while the high-priority bc_dist bus-data task waited for the same mutex. The bus scheduler, bc_sched, detected that bc_dist had missed its hard deadline and reset the spacecraft computer.

Engineers reproduced the interaction in a laboratory in less than 18 hours, enabled priority inheritance for the affected VxWorks select semaphores, tested the change, and uploaded the corrected flight software through Pathfinder’s onboard patch process.

What actually failed

Pathfinder’s software used VxWorks, a real-time operating system in which tasks have assigned priorities and synchronize access to shared resources with semaphores. A mutual-exclusion semaphore, or mutex, allows only one task at a time to use a protected data structure or communication path.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The failure involved three classes of work:

  • ASI/MET: a relatively low-priority task that collected meteorological data and communicated through pipes.
  • Medium-priority tasks: other onboard activities that could run whenever they were ready.
  • bc_dist: a high-priority task that distributed collected bus data and had to complete within a strict schedule.

The protected resource was part of the pipe-based interprocess communication path used by the VxWorks select() service. ASI/MET entered that path and held the mutex protecting the select wait list. It was interrupted before releasing the lock. The interruption itself was ordinary real-time scheduling behavior; the problem was what happened next.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.

How the priority inversion unfolded

Pathfinder’s 1553 bus software repeated its main activity at 8 Hz. The scheduler arranged transactions for the next bus cycle, and the data-distribution task processed the results. The fault required a particular ordering of events:

  1. ASI/MET acquired the mutex. While waiting for meteorological messages with select(), ASI/MET entered the pipe communication code and locked the select wait-list data.
  2. A preemption left the lock held. Before ASI/MET could finish and release the mutex, the operating system suspended it.
  3. Medium-priority work took the processor. Those tasks were more eligible to run than ASI/MET, so they continued executing instead of allowing the lock-holder to finish.
  4. bc_dist needed the same mutex. When the high-priority bus-data task attempted to send updated ASI/MET information with pipeWrite(), it blocked behind the mutex still held by ASI/MET.
  5. The high-priority task could not run to completion. Although bc_dist had the highest nominal priority, it was waiting for a low-priority task that was itself being delayed by medium-priority work.
  6. bc_sched detected a missed cycle. When the scheduler woke for the next 8-Hz bus cycle, bc_dist had not completed its hard-deadline work. The scheduler treated that as an error and initiated a computer reset.

This is the classic definition of priority inversion: a high-priority task is indirectly held up by a low-priority task, while intermediate-priority work prevents the low-priority task from releasing the resource. The assigned priority order therefore becomes the opposite of the order needed for progress.

Why the bug looked like repeated computer resets

The reset was the system’s response to a missed real-time deadline, not the original defect. The scheduler could not safely assume that the bus-data cycle had completed, so it reinitialized the spacecraft hardware and software.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A reset ended the activities that were being commanded at that moment and deferred the remaining activities for that day until the next day. Glenn E. Reeves, who led Pathfinder’s flight-software work, reported that science and engineering data already collected were not lost as long as spacecraft power was maintained. It is therefore inaccurate to say that every reset erased all of Pathfinder’s science data.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Why priority inheritance fixed the blocking chain

The original semaphore behavior allowed ASI/MET to remain at its low priority while a higher-priority task waited. VxWorks supports priority inheritance, a synchronization option that temporarily raises the priority of a task holding a mutex when a higher-priority task is blocked on that mutex.

With inheritance enabled, the sequence changes at the critical point. When bc_dist waits for the select mutex, the operating system boosts ASI/MET enough for it to finish its protected operation and release the lock. ASI/MET then returns to its normal priority, and bc_dist can acquire the resource and complete the bus transaction. Medium-priority tasks no longer keep the lock-holder from making the short, urgent section of code progress.

Semaphore configuration Lock-holder behavior Effect on bc_dist System consequence
Original VxWorks select semaphores without priority inheritance ASI/MET held the mutex at low priority and could be preempted by medium-priority work Blocked in pipeWrite() while waiting for the same mutex bc_sched observed a missed 8-Hz deadline and reset the computer
Patched select semaphores with priority inheritance enabled VxWorks raised the priority of the lock-holder while a higher-priority task waited ASI/MET could release the mutex, allowing bc_dist to proceed Testing found no adverse behavior in Pathfinder’s configuration, and the change was uploaded to the spacecraft

The change was made in the semaphore-creation options used by the VxWorks select service. Because that service was shared more broadly than one individual call site, the team considered possible side effects, consulted Wind River, and tested the modified configuration before flight software was patched.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

How engineers found the cause

Pathfinder’s flight software already contained a diagnostic trace facility intended for laboratory troubleshooting. It recorded activity in ring buffers. The scheduler was also designed to stop the trace and dump the log when it detected the specific bus-scheduling error.

Rank #3
Sale
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black | LED mouse pad with 14 lighting modes, covers keyboard & mouse, anti-slip rubber base, waterproof surface, USB powered
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

That instrumentation turned a transient timing failure into an observable sequence. The team repeatedly ran the relevant instrument and bus activities in a laboratory, then inspected the trace produced when the scheduler declared the missed deadline. Reeves wrote that the team reproduced the failure in less than 18 hours and that, once reproduced, “the priority inversion problem was obvious.” The trace showed ASI/MET holding the select-path mutex, medium-priority work running, and bc_dist waiting for the lock.

Reproduction mattered because a priority inversion can disappear when timing changes. A small change in task load, message arrival, or instrumentation can alter the ordering enough to make the reset vanish. Replaying the same combination of meteorological data collection, pipe traffic, and intermediate-priority load allowed engineers to test the proposed fix rather than relying on a theory.

How the corrected software reached Pathfinder

After enabling priority inheritance and checking the wider select-service behavior, the team applied the change through Pathfinder’s specialized onboard software-patch process. The patch modified validated differences in the software already stored on the spacecraft rather than replacing the entire flight program.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The sequence was therefore:

  1. Reproduce the reset-producing schedule in the laboratory.
  2. Use the ring-buffer trace to identify the mutex and the three-task blocking chain.
  3. Change the VxWorks select semaphore creation options to enable priority inheritance.
  4. Consult the operating-system supplier about the broader effect of that option.
  5. Run the modified system through testing and verify that the configuration showed no adverse behavior.
  6. Apply the validated software differences onboard through Pathfinder’s patch mechanism.

The correction addressed the synchronization policy that permitted the inversion. It did not require a hardware replacement or a redesign of the 1553 bus.

Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Why prelaunch testing did not catch it

The team had encountered indications of the problem before landing but could not reproduce them reliably. The required combination was unusually specific: ASI/MET had to be collecting data, the select and pipe path had to hold the mutex at the wrong instant, and enough medium-priority work had to run at precisely the same time to delay the lock-holder.

Prelaunch testing concentrated on expected high data rates and planned science activities. Once Pathfinder was operating on the Martian surface, data rates and science activity were greater than anticipated. Reeves described the failure as a case the team had not expected or tested, rather than a known, repeatable fault that was deliberately ignored. Entry and landing software received priority during development, and time ran out for some lower-priority test work.

This explains why ordinary functional tests passed. Each task could work correctly in isolation, and the communication path could work correctly under normal load. The defect appeared in the interaction among task priorities, mutex ownership, and a hard bus deadline. A test that did not create that exact scheduling pressure had little chance of exposing it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

What the incident teaches about real-time software

Priority numbers do not guarantee progress

Giving a task a high priority does not protect it from waiting on a lower-priority task. Any shared resource can create this dependency: a queue, device driver, event list, memory pool, or communication object. The resource’s locking policy must be designed together with the task priorities.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Short critical sections still need protection

ASI/MET did not need to hold the mutex for a long computation. The failure came from being preempted during a short protected operation. In a hard real-time system, even a brief lock can become operationally significant if the waiting task has a strict deadline.

Diagnostics should survive the failure

Pathfinder’s ring-buffer trace and automatic dump on scheduler error were crucial. Without those records, the reset could have appeared to be an unexplained intermittent crash. Logging the owner of a lock, the task waiting for it, and the scheduler state can make timing failures diagnosable after the fact.

Commercial components require configuration knowledge

VxWorks supplied the synchronization mechanism, but the mission team still had to understand how its semaphore options behaved in Pathfinder’s task mix. Reeves summarized that lesson in the line: “A good lesson when you fly COTS stuff – make sure you know how it works.” Commercial off-the-shelf software can be dependable while still requiring mission-specific testing of defaults, interactions, and edge cases.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Did the bug end the mission?

The resets threatened scheduled operations, but the software patch restored reliable operation. NASA and JPL reported on November 4, 1997 that the lander had operated nearly three times its 30-day design lifetime, while the Sojourner rover had operated 12 times its seven-day design lifetime. Those figures describe the eventual mission performance, not the severity or frequency of the priority-inversion failure.

Reeves later summarized the broader engineering lesson by writing, “We did not expect nor test the ‘better than we could have ever imagined’ case.” Pathfinder’s unexpectedly busy surface operations created the load combination that prelaunch tests had not exercised; the trace, laboratory reproduction, and priority-inheritance patch turned that surprise into a fix.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.