V7 "proc on q" diagnostic message

Peter Gross pag at hao.UUCP
Tue Nov 20 05:49:06 AEST 1984


In V7 Unix (and perhaps others) there is a diagnostic printf "proc on q"
in the routine setrq() which puts its argument on the run queue.  The
message is the result of finding the given process already on the run
queue.  We were getting this message occasionally in early morning hours.
I changed the printf() to a panic() to get a better handle on what
was happening.  It turned out to be a program which does a double-
buffered copy of the root file system to a spare file system (uses the
program "dbuf" which was posted to USENET long ago).  This program forks
off 4 processes, 2 each for reading and writing, and does lots of signalling
back and forth.  The panic comes when one process sends another an EMT
signal to indicate that an I/O operation has completed.  The kernal traps
the kill() system call, calls psignal(), which in turn calls setrq().
setrq() finds that the proc is already on the runq (yet it's p_stat was
SSLEEP!).  Sounds like a race condition to me.  Our kernel is highly
hacked for performance (load-based scheduling, auto-nicing, forced swapping
of cpu-bound procs, etc.)  I am curious if anyone else has seen the
"proc on q" message, and what caused it.

--peter gross
hao!pag			UUCP
hao!pag at seismo.ARPA	ARPA



More information about the Comp.unix.wizards mailing list