From owner-svn-src-head@FreeBSD.ORG Sat Aug 3 18:23:38 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 25C87934 for ; Sat, 3 Aug 2013 18:23:38 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x22c.google.com (mail-vb0-x22c.google.com [IPv6:2607:f8b0:400c:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F6DD29D9 for ; Sat, 3 Aug 2013 18:23:37 +0000 (UTC) Received: by mail-vb0-f44.google.com with SMTP id e13so1698470vbg.3 for ; Sat, 03 Aug 2013 11:23:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=FZNR9TOzv359gOFvlBpmSGdlWTpKOHXQyvw4NxlixwY=; b=cvUL0/dkBPmlTJnCtMLuf5i1oOWWXUHnKx2j4YAuLDTjlUeGY/x/ggeqhnvT8O/bAd +Ps/J2/FK+BEaQl5gWpXSrDZmPhvt2u5a4Y8Kt38GSMwnJ0pB+zoMoMFM6tHM6d8voQ+ pCxr81e777yHEIPk+9ZvzP5uM+xpnwGe5Azsc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=FZNR9TOzv359gOFvlBpmSGdlWTpKOHXQyvw4NxlixwY=; b=SXsEGUzDzz+WfAx6fPzAJ7GfiMY91E8PeM67UKh0QhWwCkHus7oBVJF9xWDQhLQd0r 6evDZL3Wae0K4ihOlEweSHC45dCerjVE8/VxtTEtnUoOOKKx9c2kQyHmwaz5/Knv0pOm CmGe6J6IRQ0JS/AddGROzINv+fQP34yi0yLwFMAS9E3lhGWy5vybuTGdXqf1MCcLCegF w8U3ZZr4vM10YV8O78/RvNmz6VU1r4a/dB9aof9ByOIeje3L3sphPerx8yA9uwTlDEjz i03TvWGr04B68QjZh4xL8sJ2tyCHIMOZnAsdZsxpMXeYjERFQpdm5WrRZDl8NZ39Wi3a UTPg== MIME-Version: 1.0 X-Received: by 10.58.2.137 with SMTP id 9mr3836121veu.50.1375554216620; Sat, 03 Aug 2013 11:23:36 -0700 (PDT) Received: by 10.220.167.74 with HTTP; Sat, 3 Aug 2013 11:23:36 -0700 (PDT) In-Reply-To: <20130803180132.GA1403@garage.freebsd.pl> References: <201307032104.r63L4KEE015937@svn.freebsd.org> <20130804.012445.1330578101731029775.hrs@allbsd.org> <20130803180132.GA1403@garage.freebsd.pl> Date: Sat, 3 Aug 2013 11:23:36 -0700 Message-ID: Subject: Re: svn commit: r252603 - head/usr.sbin/rwhod From: Peter Wemm To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmY77z/ouuMJjjgfDuBIKjlDMDGU6sDMlR7Aw4N4G6g7J5SE6LTlaBZO0twKOMBhrD5tbd5 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, oshogbo@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Aug 2013 18:23:38 -0000 On Sat, Aug 3, 2013 at 11:01 AM, Pawel Jakub Dawidek wrote: > On Sun, Aug 04, 2013 at 01:24:45AM +0900, Hiroki Sato wrote: >> Pawel Jakub Dawidek wrote >> in <201307032104.r63L4KEE015937@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 >> 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 - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV UTF-8: So you can \342\200\231 .. for when a ' just won't do ZFS must be the bacon of file systems. "everything's better with ZFS"