Lost Morning

Bleah. Another morning lost to a misbehaving PowerMac G5. Yesterday I decided to move from the partition that was giving me trouble to the other disk. (Luckily I have two.) However the migration assistant froze with “22 minutes left” for several hours. Apparently some large Warcraft files were giving it trouble. I eventually forced the migration assistant to quit, but that left me with a corrupted and unbootable second drive. The Mac was not smart enough to notice this and boot from the first drive instead. It just kept kernel panicking in the boot process. I had to boot from the Tiger DVD manually, erase the disk, and reinstall the OS.

Memo to software developers everywhere: test your programs with multi-gigabyte files and make sure they still work. These are more common than you think, and include movies, archives, disk images, games, databases, e-mail inboxes, and a lot more. Lately I’ve noticed a lot of programs getting hung up on gigabyte+ files. In 2007, pretty much all software should handle files up to about a terabyte without blinking, and software with high robustness requirements such as operating system utilities, backup software, disk recovery utilities, and anything that runs a nuclear power plant should probably be good to a petabyte or more, just for safety’s sake.

One other detail: I’ve done a lot of Tiger reinstalls lately and for all Apple’s vaunted ease of use (still much better than Linux installs certainly) it could easily cut at least three steps from the install process. I’m referring, of course, to the places where it asks you for lots of personal information, asks to spam you, and tries to sell you .Mac. Even if Apple insists on this for new users, couldn’t they at least notice that my Mac already has several installed partitions and not ask me for this for the umpteenth time? Should I really have to turn off my router when installing to keep my Mac from spying on me and reporting that information back to Big Brother Steve?

I think I’m going to have to spend a little time in the park just to recover from all this stress before getting back to work. One silver lining: my wife is happy. During all the dead time waiting for the OS to install and restoring from backups, I cleaned the living room.

6 Responses to “Lost Morning”

  1. John Cowan Says:

    The obvious problem is that a file larger than 2^32 bytes can’t be randomly accessed, only sequentially, unless you use special 64-bit system calls. Not many programs do.

  2. Elliotte Rusty Harold Says:

    We need to stop using 32-bit ints in filesystem APIs. Nothing less than a 64-bit long is reasonable. java.io.RandomAccessFile did this over ten years ago in JDK 1.0. Have native APIs really not caught up yet?

  3. bob Says:

    I don’t know which platforms John Cowan is referring to, but 64-bit seek addresses are hardly modern or unusual. They’ve have been supported on many platforms for quite a long time.

    On Mac OS, this was standard as soon as files could be larger than 4 GB, which was roughly the time of Mac OS 9 and HFS+.

    Mac OS X has always had 64-bit seek addresses, even if the file-system itself only supports smaller files, e.g. original HFS only supports files with length under 4 GB.

    Various Unices far older than Mac OS X have long had 64-bit seek addresses, too, even on 32-bit machines.

    BTW, it may be that the cause of the hang was a defective block on the HD that just happened to be in the large WoW file. A very large file is simply a larger target for When Blocks Go Bad.

    You’re right about the Mac being too stupid to not boot from the corrupted HD, though. That’s dumb. Hold down OPTION and it’ll come up in the firmware boot-drive selector. At least I think it’s OPTION. I can’t reboot right now to try it.

    And I just break out of the OS-install user registration crap. Cmd-Q it and it’ll confirm before departing. I don’t think I’ve EVER finished that part of the process, for ANY of the Macs I’ve owned.

  4. Elliotte Rusty Harold Says:

    If the problem is indeed a bad block on the hard drive, that still shouldn’t hang the process. The read or write should throw an exception that can be responded to in the code. Possibly the read/write should even time out after a certain amount of time.

    On a higher level, when there is a problem with one file, the remainder of files should continue to copy. Apple has a really bad habit of serializing this, so that when one file fails, the entire operation is blocked, at least until the user explicitly tells it to continue or cancel. If I start copying 500,000 files and go away to watch a movie, I don’t want to return to find a dialog telling me file #3 can’t be copied, and asking if I want to continue or cancel.

    Of course, this time I didn’t even get that far. It just hung. :-(

  5. Mokka mit Schlag » FireWire Killed the Mac Says:

    […] I’m about 99% certain that the various problems I’ve been having on my main desktop Mac lately can all be traced to a misbehaving LaCie d2 external hard drive. (I leave 1% open for the possibility it’s the FireWire cable or controller, but I really don’t think so.) […]

  6. Zeff Silver Says:

    I have had 2 of these Power Mac G5s and have sent them back as they keep locking up i was using tiger OPS. The good news is i have a new mac and its working great, Thanks for a great blog wish i had read this earlier.
    Thanks for your help.
    Zeff

Leave a Reply