On Sat, Aug 3, 2013 at 11:01 AM, Pawel Jakub Dawidek <p...@freebsd.org> wrote:
> On Sun, Aug 04, 2013 at 01:24:45AM +0900, Hiroki Sato wrote:
>> Pawel Jakub Dawidek <p...@freebsd.org> wrote
>>   in <201307032104.r63l4kee015...@svn.freebsd.org>:
>>
>> pj> Author: pjd
>> pj> Date: Wed Jul  3 21:04:20 2013
>> pj> New Revision: 252603
>> pj> URL: http://svnweb.freebsd.org/changeset/base/252603
>> pj>
>> pj> Log:
>> pj>   The whole sending functionality was implemented within signal handler,
>> pj>   which is very bad idea. Split sending and receiving in two processes,
>> pj>   which fixes this problem and will help to sandbox rwhod.
>> pj>
>> pj>   Submitted by:   Mariusz Zaborski <osho...@freebsd.org>
>> pj>   Sponsored by:   Google Summer of Code 2013
>> pj>   Reviewed by:    pjd
>> pj>   MFC after:      1 month
>>
>> (snip)
>>
>> pj>   if (!quiet_mode) {
>> pj> -         signal(SIGALRM, onalrm);
>> pj> -         onalrm(0);
>> pj> +         pid_child_receiver = pdfork(&fdp, 0);
>> pj> +         if (pid_child_receiver == 0) {
>> pj> +                 receiver_process();
>> pj> +         } else if (pid_child_receiver > 0) {
>> pj> +                 sender_process();
>> pj> +         } else if (pid_child_receiver == -1) {
>> pj> +                 syslog(LOG_ERR, "pdfork: %m");
>> pj> +                 exit(1);
>> pj> +         }
>>
>>  pdfork() is available only when options PROCDESC is defined and
>>  GENERIC does not have it.
>
> Ah, indeed. Thanks for letting me know. I think the proper fix here is
> to just add PROCDESC to GENERIC as it will be used more and more
> frequently.

When I hit this in the freebsd cluster a few weeks ago, something was
very wrong.

With a conventional kernel, rwhod wouldn't start up, or hung.

When adding PROCDESC things got worse.  rwhod would operate, but none
of the 9.x machines could see its broadcasts and ruptime reported the
10.x+procdesc+rwhod machines as "down".

My vague recollection was that the 10.x+procdesc+rwhod machines could
see each other but I am not sure.  I was in the process of ripping out
rwhod from the freebsd.org cluster by that point.
-- 
Peter Wemm - pe...@wemm.org; pe...@freebsd.org; pe...@yahoo-inc.com; KI6FJV
UTF-8: So you can \342\200\231 .. for when a ' just won't do
<brueffer> ZFS must be the bacon of file systems. "everything's better with ZFS"
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to