OpenAFS CVS Commit: openafs/src/viced by jaltman

cvs@GRAND.CENTRAL.ORG cvs@GRAND.CENTRAL.ORG
Mon, 23 Jan 2006 16:23:16 EST


Update of /cvs/openafs/src/viced
In directory GRAND.CENTRAL.ORG:/home/jaltman/openafs/cvs-1-3/src/viced

Modified Files:
	host.h 
Log Message:
DELTA viced-grow-h_maxSlots-20060123
AUTHOR cg2v@andrew.cmu.edu

and jhutz@cs.cmu.edu

The size of h_maxSlots as computed based upon the value of 
MAX_FILESERVER_THREAD is too small.   It is possible for h_lwpIndex
(in the pthread case) to have produce the same Slot value for multiple
threads.  In that case it is possible for the following to occur:

       X: h_Hold_r(host)
       X: H_UNLOCK
       ...
       E: H_LOCK
       E: Check h_Held_r(host); it is true, so don't hold
       E: H_UNLOCK
       X: H_LOCK
       X: h_Release_r(host)
       X: h_TossStuff_r(host)  [called by h_Release_r]
       X: H_UNLOCK
       E: CheckHost(host)

The end result would be a crash due to a reference to a null field 
in the host processed by CheckHost.

This patch is a bit of a hack in that it solves the problem by increasing
the number of slots for threads and does not determine the correct number
of threads the process should be allowed to produce.



--- DELTA config follows ---
viced-grow-h_maxSlots-20060123 openafs/src/viced/host.h 1.11 1.12