jfw@mit-eddie.UUCP (John Woods) (05/27/85)
I have tracked down a bug in the 2.9bsd RL02/RL01 driver. The bug showed up as follows: if I redirected standard input to a program in /etc/rc, my root filesystem would be trashed 4 commands later (!!!!!). [Sounds like one of those bang your head against the wall bugs? It was!] For a while I suspected a problem in the overlay system (this is an 11/23), especially when I noticed that adding printf's would make the problem go away. (Could also have been a garden-variety stray pointer, too) However, I then found that if I zeroed out the first byte of one of those printfs, the bug came back: a timing bug. Further research and poking traced the locus of error to the rlstrategy() routine. At the beginning of that routine, the code senses whether or not the drive being accessed has been touched yet (critical detail: the trashing happens when I mount a second RL01), and if not, does a STATUS operation to get the drive type and head position. To make a long story (3 agonizing days...) short, it does so --> without checking that the controller is ready <--. If an operation is already underway, well, OOPS! My fix is simple: add "rlwait(rp)" just before the loop that issues the STATUS command in rlstrategy(). I don't know if anyone has found this already and announced it, but to save SOMEONE some grief someday, I am posting it now. So, those of you with RL0[12] drives, check your drivers -- the drive you save could be your own! -- John Woods, Charles River Data Systems decvax!frog!john, mit-eddie!jfw, JFW%mit-ccc@MIT-XX When your puppy goes off in another room, is it because of the explosive charge?