*BSD News Article 21263


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!headwall.Stanford.EDU!nntp.Stanford.EDU!leland.Stanford.EDU!yergeau
From: yergeau@leland.Stanford.EDU (Dan Yergeau)
Subject: Hard disk hangs with NetBSD-0.9 (was Re: Problems with installation of NetBSD 0.9...)
Message-ID: <1993Sep21.172957.29451@leland.Stanford.EDU>
Sender: news@leland.Stanford.EDU (Mr News)
Organization: DSG, Stanford University, CA 94305, USA
References: <27ldlm$j27@acsc.com> <AARON.93Sep21184413@downstage.comp.vuw.ac.nz>
Date: Tue, 21 Sep 93 17:29:57 GMT
Lines: 74

In article <AARON.93Sep21184413@downstage.comp.vuw.ac.nz>, Aaron.Roydhouse@comp.vuw.ac.nz (Aaron Roydhouse) writes:
|> ==> "Frank" == Frank Mayhar <fmayhar@acsc.com> writes:
|> 
|> Frank> I've been installing NetBSD 0.9 on my 486 system this weekend,
|> Frank> and have run into a showstopper. From time to time, I get a
|> Frank> "ISA strayintr 7" message, and the system goes straight off
|> Frank> into the weeds. It typically happens after booting, right
|> Frank> before fsck runs. (I also see a message indicating an
|> Frank> unexpected interrupt from wdc0 at this point, but I don't know
|> Frank> whether that is related.) If it happens during boot, the system
|> Frank> hangs at that point.

|> I have NetBSD 0.9 on a 486dx2/33 and two identical IDE drives sharing
|> the one controller. I began to experience just the behaviour you
|> describe after I added the second IDE drive. Specifically on normal
|> boot-up it checks the root file system then hangs; every time. If I do
|> a fast reboot, thus avoiding the file check, I can then run fsck
|> manually and have no problems. 

UGH! fsck should be run on unmounted partitions ('cept for /, which is
impossible) in single-user mode.  Assuming that NetBSD-0.9 uses
Julian's boot blocks, boot to single-user (i.e. -s) at the boot
prompt.  Then run fsck and continue the multi-user boot (hit ^D at the
single-user prompt).

|> Earlier I had one drive and no problem
|> on boot-up; well I got the "ISA strayintr 7" anyway but it didn't lead
|> to a hang. This isn't a show-stopper for me so long as I avoid the
|> "fsck -p" during bootup and run it myself afterwards.

The "ISA strayintr 7" is harmless and unrelated to the disk hang
problem.  You can eliminate this message by changing your kernel
config to

device		lpt0	at isa? port "IO_LPT1" tty irq 7 vector lptintr

and removing references to the lpa device.

Now, on to the real problem...

The README accompanying the original sources used as a base for the
NetBSD driver indicates that

> There's also another problem still bothering me: There's some sort of
> timing/reentrancy error still lurking in here, that was there in the
> original 0.1 wd driver as well.  The symptom is that, on *some*
> controllers, doing the initial wdopen() (which will then call the
> readdisklabel() function) for two or more disks at the same time (so
> that wdopen() gets called again while it's already being executed),
> the controller gets hung.  I'm still looking for this, meanwhile I
> specify in my config file that I have swap on all disks.  This causes
> the kernel to wdopen() the drives nicely in order -- and once it's
> been done for each disk, the problem will, of course, not occur.
> Without the "swap on ... and ... and ..." stuff, my wd1, wd2 and wd3
> would be opened simultaneously by "fsck -p" forks, which would
> nicely hang up everything...  I note a "sleep(10)" in fsck, but it
> obviously doesn't do that.

So, changing the appropriate config line to

config		"386bsd"	root on wd0 swap on wd0 and wd1
                                                        ^^^^^^^
may get around the problem.  I don't run NetBSD, but I do use a
variation of the barsoom/NetBSD driver.  This works for me.  Please
let the NetBSD people know if it works for you.

(Note: the sleep(10) in fsck is misplaced.  It does not keep fsck from
opening multiple disks simultaneously.  A properly placed sleep()
should also work around the wdopen problem.)

--
Dan Yergeau                         You are in a twisty little passage
yergeau@gloworm.Stanford.EDU        of standards, all conflicting.
#include <std.disclaimer>