Re: s6 hangs at shutdown

From: Laurent Bercot <>
Date: Thu, 12 Nov 2015 18:37:00 +0100

On 12/11/2015 16:45, Alex Suykov wrote:
> s6-svc: fatal: unable to control /run/service/s6-svscan-log: supervisor not listening
> (...)
> By this point ps shows pid 1 as
> foreground s6-rc -ad change foreground s6-echo Performing reboot. s6-reboot

  Indeed: it's a mistake to run "s6-rc -ad change" in /etc/rc.shutdown,
because by that point s6-svscan is not running anymore. s6-rc needs an
operational supervision tree.

  "s6-rc -ad change" should be run before switching to stage 3.
Éric, can you please change this? The latest version of s6-linux-init
produces a set of scripts that work, with an additional /etc/rc.tini
to perform that kind of "stage 2 shutdown".

  In the meantime, Alex, to reboot your machine:
  - edit the "foreground { s6-rc -ad change }" line out of /etc/rc.shutdown
  - run "s6-rc -da change && s6-svscanctl -i /run/service"

  It will work in most cases. It may not work if you are running
unsupervised processes keeping resources open on mounted
filesystems; in that case, kill those processes and try again.
(Solving this issue automatically is a hard problem, and needs
some ugly tweaks (asymmetry of up and down scripts for mounting
filesystems) that Éric and I can work out.

Received on Thu Nov 12 2015 - 17:37:00 UTC

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