Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Mar 2016 08:41:52 +0000
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
Message-ID:  <bug-207896-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-207896-13>