🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.bugs.2bsd
Article #230

Bug in 2.9BSD RL driver

#230
From: John Woods
Date: Mon, 27 May 1985 05:08
33 lines
2239 bytes
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?
Technical Details
Message-ID: <4349@mit-eddie.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!mit-eddie!jfw

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site mit-eddie.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!mhuxr!ihnp4!mit-eddie!jfw
From: jfw@mit-eddie.UUCP (John Woods)
Newsgroups: net.bugs.2bsd,net.unix-wizards
Subject: Bug in 2.9BSD RL driver
Message-ID: <4349@mit-eddie.UUCP>
Date: Mon, 27-May-85 01:08:14 EDT
Article-I.D.: mit-eddi.4349
Posted: Mon May 27 01:08:14 1985
Date-Received: Wed, 29-May-85 01:24:28 EDT
Distribution: net.bugs.2bsd,net.unix-wizards
Organization: MIT, Cambridge, MA
Lines: 33