Subject: kernel hang experiment
To: None <port-vax@netbsd.org>
From: Chuck McManis <cmcmanis@mcmanis.com>
List: port-vax
Date: 05/03/1999 23:55:14
Hi everyone,

I'm looking at why my uVAX II (KA630 CPU) hangs on occasion. One of the
areas I'm currently looking at is some code where the same process is
swapped out and then trys to swap back in. I've seen some conditions where
the system is waiting for a page to free up (either in the vfs_bioxxx code
or in the uvm code) and as an experiment I tried keeping another process
around that would always be there to swap. The effect was to mitigate the
hang. If you'd like to help test this, this is what you can do:
	If your system hangs building the kernel, start two sessions
	(telnet in twice) or run one on the console and one from a
	telnet session.

	On one session use a simple loop:
		while (1)
		swapctl -s
		sleep 5
		end

	On the other session build your kernel.

If it hangs send me the output from the last swapctl printout. Also your
CPU type and whether or not you were running diskless.

If it doesn't hang when you do this but does hang when you don't that would
be good to know as well.

Other bits of useful information, if you compile DDB into the kernel you
can get to it at the console by typing Esc-D (escape followed by "D"). This
isn't documented in the ddb man page but it is in the source.

If it gets stuck and you have ddb compiled in, break into ddb and type:
db>ps /w
If its like my system it will probably be stuck with processes in biowait
or, occasionally, flt_noram5. 

--Chuck