Sunday, March 18, 2007

Unsanity.org: Shock and Awe: How Installing Apple's Updates can Render Your Mac Unbootable and How You Can Prevent it:

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.

2:39 AM