How OS X Updates Can Make Your Mac Unbootable
March 18, 2007
The good folks at Unsanity have posted this fascinating little piece…
When you see the “Optimizing System Performance” phase of a software update, Mac OS X is really updating prebinding. Updating prebinding has a very, very nasty bug in it (look at _dyld_update_prebinding). If multiple processes are updating prebinding at the same time, then it is possible for a system file to be completely zero’d out. Basically, all data in the file is deleted and it is replaced with nothing. This bug is usually triggered when updating Mac OS X and every update to Mac OS X has the potential to render your system unbootable depending on if the “right” file is deleted or not. It’s triggered during the “Optimizing System Performance” phase of installing an update. This phase is actually just running update_prebinding. If you launch an application that links to libraries that are not yet prebound, there is a chance one of those files will be zero’d out as dyld automatically redoes the prebinding on that file.
I’ve been tracking this particular bug for about 18 months now. Most of the real “random” failures reported on various Mac OS X “troubleshooting” sites after a user has installed an Apple software update are actually manifestations of this bug. By real I mean not imagined problems or ones that have been there for a very long time but the user is just now noticing it and artificially connecting the cause to the recent update (it’s called Pareidolia). Yes, this nasty prebinding bug has been reported to Apple and yes, it is 100% reproducible if you want to reproduce it.
Every single time you install an update to Mac OS X whether it be an iTunes update, a QuickTime update, an update for daylight saving time, a security update, an Airport update, or an actual Mac OS X update, you can be hit by this bug. In order to prevent yourself from being smacked in the face by this bug, follow this simple rule: When “Optimize System Performance” appears during the update process do not touch your computer and definitely do not launch any applications. Just back away from your computer box as if it were a swarm of bees. Yes, it does mean that if you install the Mac OS X 10.4.9 update, you may get hit by the bug.
(There’s more, go read it all)
Interesting, and doubtless some very good advice…
My usual software update practice —
- Close everything I can find to close.
- Run Cocktail or Onyx through its periodic cleanup routine, including fixing permissions.
- Do a full clone backup
- Close any startup items that I can close
- Run Software Update
This will leave long periods where your machine isn’t doing anything worthwhile. Don’t be tempted to mess with it. Go find something else to amuse yourself instead. This now looks like even better advice than I’d already considered it to be.