supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Guillermo <gdiazhartusch@gmail.com>
To: Supervision <supervision@list.skarnet.org>
Cc: 916230-quiet@bugs.debian.org
Subject: Re: Log rotation issue with runit
Date: Sat, 29 Dec 2018 19:32:33 -0300	[thread overview]
Message-ID: <CADQ2Nw-rGwHPCtmhV8r_KXAGc69aA_rGKiwSwYVVtn0zKUJRoQ@mail.gmail.com> (raw)
In-Reply-To: <E1gdJQG-00047Z-01@eggs.gnu.org>

El sáb., 29 dic. 2018 a las 15:33, Dmitry Bogatov escribió:
>
> > > And this issue happens not only on crash, it happens after every
> > > termination of svlogd, due any signal. I would agree that SIGKILL is
> > > crash, but issue reproduces with SIGINT and SIGTERM.
> >
> > SIGTERM should make svlogd exit cleanly, are you sure? It does for me,
> > and when restarted, does not create any .u file (using Gentoo's runit,
> > which is upstream runit plus a minor patch to the makefile).
>
> Wierd. I tried again, and failed to reproduced issue with SIGTERM this
> time.

Good. This is the expected behaviour of SIGTERM.

> What do you mean, `supervision tree not not being teared down properly'?

First of all, I should have written "not being torn down properly" :P
With "properly" I mean with all runsv and runsvdir processes exiting
cleanly.  Either by sending runsvdir a SIGHUP signal, which makes it
take care of its runsv children, of by sending runsvdir a SIGTERM
signal and then making all runsv processes exit one by one with 'sv
exit' (or SIGTERM, which is equivalent). Each runsv will then close
the writing end of the logger's pipe before exiting, if there is one,
making the logger finalize the 'current' file, set its permissions to
0744, and exit as well (because it detects EOF in its stdin). So next
time svlogd is started, no .u file. I know this to work as described
on Gentoo.

If runit is the init system, process 1 sends a SIGTERM signal to the
runsvdir process that /etc/runit/2 replaces itself with during the
shutdown sequence, so it is the task of /etc/runit/3 to make
supervised processes exit, as well as their runsv supervisors.
Debian's runit-2.1.2-19 'stock' /etc/runit/3 file is this one, right?

* https://salsa.debian.org/runit-team/runit/raw/a45cb0000c4ec73e1e293d372147ad5ab3f1d2a9/debian/contrib/3

Here, the 'sv exit /etc/service/*' that follows 'sv force-stop
/etc/service/*' takes care of making the runsv processes exit. The bug
reporter's /etc/runit/3 is a modified one, so that's what I would look
next.

G.


  reply	other threads:[~2018-12-29 22:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-25 13:39 Dmitry Bogatov
2018-12-25 14:57 ` Alex Efros
2018-12-25 18:17 ` Guillermo
2018-12-25 18:30   ` Guillermo
2018-12-26  1:58   ` Alex Efros
2018-12-27  9:36     ` Dmitry Bogatov
2018-12-27 11:41       ` Laurent Bercot
2018-12-28  6:47         ` Jonathan de Boyne Pollard
2018-12-27 13:47       ` Steve Litt
2018-12-28  1:27         ` Guillermo
2018-12-27 23:39       ` Guillermo
2018-12-29 18:33         ` Dmitry Bogatov
2018-12-29 22:32           ` Guillermo [this message]
2018-12-28  6:57     ` Jonathan de Boyne Pollard
2018-12-26  5:05 ` Steve Litt
2018-12-27  9:36   ` Dmitry Bogatov
2018-12-27 13:07     ` Steve Litt
2018-12-29 18:33       ` Dmitry Bogatov
2018-12-30  1:20         ` Steve Litt
2018-12-30 10:04 ` Jonathan de Boyne Pollard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADQ2Nw-rGwHPCtmhV8r_KXAGc69aA_rGKiwSwYVVtn0zKUJRoQ@mail.gmail.com \
    --to=gdiazhartusch@gmail.com \
    --cc=916230-quiet@bugs.debian.org \
    --cc=supervision@list.skarnet.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).