supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: prj@po.cwru.edu (Paul Jarc)
To: "Daniel Clark" <dclark@pobox.com>
Cc: supervision@list.skarnet.org
Subject: Re: How to kill runsv, no matter what?
Date: Fri, 23 Feb 2007 12:59:28 -0500	[thread overview]
Message-ID: <m31wkgdaaw.fsf@multivac.cwru.edu> (raw)
In-Reply-To: <5422d5e60702230946w2a69034exa0848c8c5163a7ad@mail.gmail.com> (Daniel Clark's message of "Fri, 23 Feb 2007 12:46:42 -0500")

"Daniel Clark" <dclark@pobox.com> wrote:
> the original daemontools seems to work with services with this "bug"

Yes, but only because it makes no attempt to ensure that log data is
written before the logger is shut down.

> and both daemontools and (I think) runit have a suite of tools to
> hack around issues with services that aren't designed to work with
> the supervision model of service control (e.g. the thing that forces
> processes to stay in the foreground).

That's true, but those are just the easy workarounds, and they're
imperfect.  (E.g., they don't relay signals.)  Reliably handling log
data and simultaneously working around services that leave stray child
processes is a hard problem, and the easiest solution known so far is
to fix each individual service.

> Actually, perhaps that would be the best way to deal with this - some
> small binary that can be used instead of exec in "run" scripts that
> has the property of killing all of its child processes when it dies -
> would something like that be feasible?

That could work for some cases (but, like pgrphack et al., it would be
sandwiched between exec and the real service, not used in place of
exec).  It would have to initially put itself in its own process
group, relay SIGTERM to every process in that process group, and relay
other signals to its immediate child.  But this won't help if the
service or its children put themselves in their own process group.
Also, SIGKILL and SIGSTOP can't be relayed, so you lose functionality
there too.  So fixing the service still remains an attractive option.


paul


  reply	other threads:[~2007-02-23 17:59 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 20:14 Daniel Clark
2007-02-21 21:04 ` Daniel Clark
2007-02-23  3:51   ` Daniel Clark
2007-02-23 12:02     ` Laurent Bercot
2007-02-23 14:05     ` Gerrit Pape
2007-02-23 14:24       ` Alex Efros
2007-02-23 17:40         ` Daniel Clark
2007-02-23 17:32       ` Daniel Clark
2007-02-23 17:39         ` Paul Jarc
2007-02-23 17:46           ` Daniel Clark
2007-02-23 17:59             ` Paul Jarc [this message]
2007-02-23 18:25               ` Daniel Clark
2007-02-23 18:32                 ` Paul Jarc
2007-02-28 23:24                   ` Daniel Clark

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=m31wkgdaaw.fsf@multivac.cwru.edu \
    --to=prj@po.cwru.edu \
    --cc=dclark@pobox.com \
    --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).