Restarting ocserv doesn't clean up all workers
Nikos Mavrogiannopoulos
nmav at gnutls.org
Thu Sep 25 01:29:30 PDT 2014
On Wed, 2014-09-24 at 17:35 +0200, Niels Peen wrote:
> > On 24 Sep 2014, at 16:44, Nikos Mavrogiannopoulos <n.mavrogiannopoulos at gmail.com> wrote:
> >
> > Could you provide the log output of such cases? Unless killed with
> > SIGKILL ocserv shouldn't have left children hanging.
>
> I use the TERM signal to kill the main ocserv process (using the pid file).
>
> Prior to restart:
>
> root 15305 0.0 0.3 53432 6484 ? Ss 05:24 0:02 /usr/local/sbin/ocserv -c /etc/ocserv/ocserv.conf
> root 15306 0.0 0.1 48704 2144 ? S 05:24 0:00 /usr/local/sbin/ocserv -c /etc/ocserv/ocserv.conf
> nobody 27889 0.0 0.0 48748 1592 ? S 21:40 0:03 /usr/local/sbin/ocserv -c /etc/ocserv/ocserv.conf
>
> After restart:
>
> [ ok ] Restarting ocserv: ocserv.
> nobody 27889 0.0 0.0 48748 1592 ? S 21:40 0:03 /usr/local/sbin/ocserv -c /etc/ocserv/ocserv.conf
> root 29495 0.0 0.0 48696 1372 ? Ss 23:25 0:00 /usr/local/sbin/ocserv -c /etc/ocserv/ocserv.conf
> root 29497 0.0 0.0 48704 1404 ? S 23:25 0:00 /usr/local/sbin/ocserv -c /etc/ocserv/ocserv.conf
There is a ps flag that prints the process name rather than argv so it
would be more clear what type of ocserv process is that.
> 27889 should’ve been killed but wasn’t. To kill it manually at this point I need to use SIGKILL - TERM won’t work.
> The log doesn’t show the shutdown, only the (re)start:
It is printed on debug level. I've modified it now to print it on info
level, but you should see something like:
"main: termination request received; waiting for children to die"
Seeing it again there may be an issue in the way waitpid() is handled.
That should fix it:
http://git.infradead.org/ocserv.git/commitdiff/accdb24050a1de06c0408c9d783aa0575e35e831
regards,
Nikos
More information about the openconnect-devel
mailing list