From owner-freebsd-ports-bugs@freebsd.org Fri Mar 11 08:41:54 2016 Return-Path: Delivered-To: freebsd-ports-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11BF2ACA62B for ; Fri, 11 Mar 2016 08:41:54 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBCA565D for ; Fri, 11 Mar 2016 08:41:53 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u2B8fqIA053024 for ; Fri, 11 Mar 2016 08:41:53 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 207896] net-mgmt/zabbix2-server zabbix{2,22,24}-{agent,proxy,server) rc.d fixes for SysV IPC leak, restart race, custom PATH Date: Fri, 11 Mar 2016 08:41:52 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kbowling@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-ports-bugs@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc flagtypes.name attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2016 08:41:54 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D207896 Bug ID: 207896 Summary: net-mgmt/zabbix2-server zabbix{2,22,24}-{agent,proxy,server) rc.d fixes for SysV IPC leak, restart race, custom PATH Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: freebsd-ports-bugs@FreeBSD.org Reporter: kbowling@freebsd.org CC: pakhom@pakhom.spb.ru CC: pakhom@pakhom.spb.ru Flags: maintainer-feedback?(pakhom@pakhom.spb.ru) Created attachment 167991 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D167991&action= =3Dedit update rc.d scripts to SIGTERM only master PID We were losing many hundred zabbix agents out of many thousands when we wou= ld restart zabbix_agentd using the rc.d script in ports currently. I believe the root cause is that rc.subr by default checks against the comm= and name and was sending SIGTERM to the parent and all the child processes (we = run w/~32 children because if you run out with concurrent polls, the check will fail). The processes have a sighandler and may terminate uncleanly if the other process are all SIGTERMing. ipcs may show shared memory and/or a semaphore even though there are no processes running, and the agent cannot = be [re]started until those are manually cleared with ipcrm. The SIGTERM to all processes also seemed to cause restart to race occasionally, in that some of the child processes were still around while the new one was starting even if there was no IPC leak.. may be hard to trigger in practice unless you have = long running userparams(?). This patch also sets a default PATH and allows the user to override it in rc.conf. This is often necessary for userparams on the agent, or externals= on the proxy and server. I've only tested the agent rc.d changes, but assume the proxy and server fa= ce these same issues. I'm not very familiar with rc.subr so suggestions for improvement welcome. Interesting poll of other platforms I can easily check with respect to pidf= ile: Ubuntu 14.04 SysV init gets it right, Ubuntu 14.04 upstart job gets it wro= ng, CentOS 5 SysV init gets it wrong, and CentOS 7 systemd service gets it righ= t. --=20 You are receiving this mail because: You are the assignee for the bug.=