[OpenAFS-devel] Re: pthreading the bosserver

Benjamin Kaduk kaduk@MIT.EDU
Mon, 30 Sep 2013 14:44:22 -0400 (EDT)


On Fri, 27 Sep 2013, Benjamin Kaduk wrote:

> On Wed, 4 Sep 2013, Benjamin Kaduk wrote:
>
>> Once I have squahsed, reviewed and tested things, I plan to push it to 
>> gerrit for general review.
>
> I reused the 'pthread-bos' label; it's changesets 10284-10294.

It took a few iterations to appeas the AIX and suse builders (sorry for 
all the extra mail, Chas, and thanks again).

The main undecided question seems to be how to handle the signal mask for 
processes created by the procmgmt library.  We have two proposals in 
gerrit to improve the situation, http://gerrit.openafs.org/#change,10126 
and http://gerrit.openafs.org/#change,8749 .  The issue is that 
fork()+exec() inherits the signal mask for the new process from the thread 
which called fork, and we want the bosserver worker threads to not be 
handling signals.  Unblocking a few signals around calls to spawnprocve() 
is slightly racy, and we can do better -- 10126 is basically saying "the 
Unix semantics are silly, unblock all signals in the child process and let 
it set its own mask if it wants", and 8749 is giving the caller control 
over the signal mask of the child process.

I think either one is workable, and it really boils down to a design 
decision for the procmgmt library about what its interface should be. 
(The original authors seem to have not considered this design decision.) 
The code in 8749 is more flexible, and 10126 is closer to "create the 
child in a pristene environment".

Does anyone have an opinion in favor of one method or the other?

-Ben