Re: s6-supervise behaviour

From: Eric Vidal <eric_at_obarun.org>
Date: Mon, 9 May 2016 09:59:14 +0400

> On 05/05/2016 13:19, Eric Vidal wrote:
> > So i have a questions about s6-supervise behaviour. Well, i have 2
> > tty running, i logged on X from tty1. I kill the s6-supervise pid for
> > tty2. Well, as expected, tty2 restarts. I do the same thing for tty1,
> > obviously the X crash :), but tty1 never restarts. Can you explain
> > the flow for s6-supervise when a crash occurs ?
>
> I have no idea why tty1 never restarts. It should. If it doesn't, then
> either something is preventing the old process from properly dying, or
> something is preventing the new process from starting. Check your logs
> (the catch-all logger, if you set one up, or /dev/console, depending on
> how you run s6-svscan).
>
> It all depends on how you start X, too. My wild guess is that when you
> kill the supervised process under tty1, you kill your startx, and your
> user session, but the X server remains and has tty1 allocated, so it
> prevents your getty from grabbing tty1 again.

ok, i will try to make a race condition to know what happens



> - or you need a "clean shutdown" procedure, and need to do a few things
> before tearing down the supervision tree. For instance, if you're using
> s6-rc, you'd want to bring down your services first and kill the supervision
> tree later, because s6-rc invocations require the supervision tree to be
> operational.

yes, this is my case

> In that case, you don't call s6-svscanctl -6 /run/service directly; instead,
> you send a SIGINT to your s6-svscan process (which may, or may not, be
> process 1). s6-svscan will then run the /run/service/.s6-svscan/SIGINT
> script. That script will call /etc/rc.tini first, and *then* call
> s6-svscanctl -6 /run/service. The point is that anything you need to do
> *before* the supervision tree is dismantled, you write down in /etc/rc.tini.
> (Typically, if you're using s6-rc, /etc/rc.tini can simply perform
> "s6-rc -da change", which brings down all the services.)

thank for the explanation

-- 
Eric Vidal <eric_at_obarun.org>
Received on Mon May 09 2016 - 05:59:14 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC