supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Gerrit Pape <pape@smarden.org>
Subject: Re: runsvdir killed
Date: Sun, 7 Nov 2004 13:54:44 +0000	[thread overview]
Message-ID: <20041107135325.13303.qmail@fee8ec3a5e23da.315fe32.mid.smarden.org> (raw)
In-Reply-To: <20041106184216.GB4568@home.power>

On Sat, Nov 06, 2004 at 08:42:16PM +0200, Alex Efros wrote:
> Sometimes when I check `ps axf` I see no runsvdir process, and all `runsv`
> processes has no parent (or their parent is process N1: runit-init).
> 
> I think I know what happens - kernel has killed runsvdir because of 'out of
> memory' error (a lot of complex perl scripts earn all memory). Of course,
> kernel has killed not only runsvdir, but also it try to kill that perl
> scripts, mysql, etc. But this isn't a problem - perl scripts will be
> restarted by cron, mysql will be restarted by runsv, etc... but who will
> restart runsv if runsvdir is killed and runsv reparented (I not sure is this
> a correct english term) by runit-init?

The runit program running as process 1 monitors the stage 2 which by
default is the runsvdir process.  If runsvdir, and so /etc/runit/2,
crashes or exits 111, runit restarts /etc/runit/2.  If it exits 0, runit
enters stage 3 and runs /etc/runit/3; see the runit(8) man page.  Either
of them should happen on your system if /etc/runit/2 is terminated.

> So, the question is: how to restore killed runsvdir without reboot?  And the
> second question: I suppose killing runsvdir mean exiting stage2 and entering
> stage3 for reboot/halt... is this correct? And if this correct why this may
> not happens in my case?

You can send the runsvdir process a HUP signal to have stage 2
restarted, but this should almost never be needed.

> P.S. Yeah, I know, perl scripts eating all memory and kernel starting
> killing processes isn't correct behaviour for server. But for now I've no
> idea why this happens, so I can't fix it. On that server I got kernel
> oops/panic every 12-72 hours, and I've not found any information about these
[...]
This sounds really broken.

Regards, Gerrit.


  reply	other threads:[~2004-11-07 13:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-06 18:42 Alex Efros
2004-11-07 13:54 ` Gerrit Pape [this message]
2004-11-07 19:40   ` Alex Efros

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=20041107135325.13303.qmail@fee8ec3a5e23da.315fe32.mid.smarden.org \
    --to=pape@smarden.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).