From owner-svn-src-all@FreeBSD.ORG Sat Aug 3 18:23:37 2013 Return-Path: Delivered-To: svn-src-all@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 D90E092E for ; Sat, 3 Aug 2013 18:23:37 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x232.google.com (mail-vb0-x232.google.com [IPv6:2607:f8b0:400c:c02::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 940D629D5 for ; Sat, 3 Aug 2013 18:23:37 +0000 (UTC) Received: by mail-vb0-f50.google.com with SMTP id x14so1674972vbb.37 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=S22WAKZk3NYajaOoMs0qkisaQpe/D7PcHj78+CcmjX88ytVUaOVOvtYmc0AbrxGTRS BSBUVMCZpEJHf/UHlab3YEC/S6QzxVgmwctZdTERZXuS3Z96sa3DFK/aCbSIZI4ZnAkW VvB5rjrHWqAjfK8vHXXy2viJuDad9FgRuF9AuMRTjqsY7qbDSC3eM43YncmdUEE5M6W3 Jgfl5kgo5zYtSTI+Andd0Z8Bq8wY+BNMLT3luKm6wWpqIvS1P5tNZGC48Ea/Og0Bl9g4 ZgdEsHCtKXQbY2KgRXYpjwZ+US5WGINDcHYkx6OMP/yOPlv1X8H4d8+6ezMtpELJXFYR xZ6A== 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: ALoCoQmbYlUrd6I+69jKC962TwLtgpF77yhfgIm+mILnimcjL/enMpJXuzHp96zmDkP8C5j7J1D2 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Hiroki Sato , src-committers@freebsd.org, oshogbo@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" 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"