13 September
2006

When Video Kills Your Drive - Quicktime Waxes Track 0

and how Symmetric Computer Systems got the bomb ticking again

Alright! Yes, sometimes I do read slashdot when it's amusing, and the discussion of how you can create your own custom panic screen (or BSOD window) for OS/X via an API is amusing (my son Ben points this stuff out for me - he feels it's one of his sacred tasks). Joke panic screens have been around a long time, but the battle over "how much information to give people" has led to many not-so-amusing battles, especially when we were creating 386BSD releases and did the Apple approach as an option long before Apple switched to BSD and did the same thing we did. I like information and transparency, but not at the cost of frustrating and annoying lots of people...


But aside from this old debate, probably the funniest *real* programming error discussed (yes Apple, you did it again) was the Quicktime capture bug a video engineer discussed, where it merrily fills up the drive with video and then, when you've run out of space on the disk, overwrites allocated blocks. Yes, allocated blocks! And where did that leave our poor engineer? With no track 0. Even Apple couldn't put that one back together again - they had to give him a replacement drive, and that's a complete admission of defeat, because as everyone knows Apple is very cheap. (Disclaimer - I have worked in manufacturing, and we all are very cheap in this regard because hardware returns make a nasty entry on your income statement - show me a systems vendor that doesn't care about hardware returns, and I'll show you a vendor that won't please shareholders).


But the question begs - is there another way to recover from a track 0 loss on a disk drive? Well, we faced the same problem at Symmetric Computer Systems years ago, and we recovered that disk, albeit not the way you might think...


Back in the dark ages of workstations (circa 1985), before IDE and ATA, disk drives were blitheringly stupid. In our NS32000-based workstations, we used a Western Digital ST506 controller board using a WD1010 chipset. With this chipset and a very stupid drive, we could tell it to start at track 0, or track 1023 or any track in between. Obviously, we started at track 0, and didn't think much of this feature, until one day we had a very unusual situation occur.


One of our very good customers called us because one of their Symmetric 375 computers used for nuclear calculations (yes, they worked the Fortan compiler intensively, and we ended up developing one that they said was better than everybody else's to make them happy - we aimed to please) was always erasing track 0. None of the other systems, and in fact, no other Symmetric 375 computer we ever shipped experienced this problem. But these guys were right - it was losing track of track 0, and that was a big problem - for us and them.


Now maybe you see where I'm heading. We created a special bootstrap ROM that would respond to a track 0 failure by checking the next consecutive track and so on, replicated the contents of the disk, and then once it came
up it would fix itself by reformatting only that portion of the drive. Of course, this had other problems as well - you'd get occasional time skewing, but it got the customer going again.


Why was the drive on this particular computer reformatted all the time? We never were able to independently confirm this, but since this computer was used at one of the National Labs, we suspected it was getting some kind of voltage or magnetic or microwave spike and it just happened to be that the heads were stowed on the first track which contained track 0. No other customer ever experienced this problem, although we did have one customer who unintentionally reformatted their drive and then called us wanting us to recover the information - alas, a low-level reformat doesn't let us do much.


The moral of this story is simple: if you build things "smart" but don't remember the corner cases, you can paint yourself into a corner. That's what happened to the poor QT video engineer, and he paid the price. Good design, like good cooking and good accounting, is a matter of experience, a dash of subtlety, and a good sense of humor.

Posted by lynne : "When Video Kills Your Drive - Quicktime Waxes Track 0" at 10:49 | link to entry | Comments (0)
<< DSL Debacles and Competitor Cheats | Main | Fun Friday: DSL Debacles, Celebrity Linux, and Ubuntu >>
Comments
There are no comments.