🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #4329

Re: Delete All Your Files

#4329
From: jo... Jon Brawn
Date: Mon, 10 Sep 1990 10:57
36 lines
2661 bytes
Not really related, but my favourite ``bug'':

A while back, a team of us were `porting' Unix (TM) to an i386 based machine.
This machine had an intelligent SCSI controller card (couple of megs of cache,
i186 processor, that sort of thing) that handled the winis, the floppies, and
the SCSI tape. Wonderful piece of engineering, accelerated throughput quite
nicely. The only bitter bit being the tape interface - you had to pass the
tape device a list of disk blocks, and a SCSI device number. You then passed
the device a ``GO'' command, and the card would then set its busy bit, start
up the tape, and copy blocks from the disk to the tape (or vice versa).
While it was doing this, you polled the tape unit to see when it had finished,
and then sent a ``STOP'' command. Between the GO and the STOP the hard disk
was SCSI reserved, so you couldn't access it and change the data.

Well, we wrote a wonderful backup program called Eccup (named after a reservoir
just north of Leeds, a place of great beauty, unlike the program). Eccup
walked filesystems, building block lists, and ran the tape backup. Unfortunately
it had this nasty habit of hanging. Sometimes. If you added just *one* printf
to the code, it would stop hanging. If you added another, it might hang again.

After a lot of messing around with debuggers and the such, a stroke of
inspiration hit me. I got an assembler dump of Eccup, and lo and behold, the
test for the tape having finished and the sending of the STOP command where
in different memory pages, so the test would complete, and the process would
ask for the next page to be faulted in, but the disk is reserved, so instead
of the SCSI controller giving an error (which would at least give some
indication of what was going on), it queued the request, waiting for the tape
STOP command.

We could have spent months chasing a bug like that...

Jon.
-- 
Here I speak neither for Specialix, nor myself. What you see is all you get.
Jon Brawn, jo...@specialix.co.uk  (or for you bangers: ..!mcsun!ukc!slxsys!jonb)
  ``Once upon a time, not so very long ago, in a place not so very far away''
Technical Details
Message-ID: <1990Sep10.105733.18404@specialix.co.uk>
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!ukc!slxsys!jonb
References: <DAVEG.90Sep1034307@near.cs.caltech.edu> <1990Sep2.080752.4385@nmt.edu>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!ukc!slxsys!jonb
From: jo...@specialix.co.uk (Jon Brawn)
Newsgroups: alt.folklore.computers
Subject: Re: Delete All Your Files
Message-ID: <1990Sep10.105733.18404@specialix.co.uk>
Date: 10 Sep 90 10:57:33 GMT
References: <DAVEG.90Sep1034307@near.cs.caltech.edu> <1990Sep2.080752.4385@nmt.edu>
Organization: Specialix International, London
Lines: 36
Posted: Mon Sep 10 11:57:33 1990
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit