[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#733915: marked as done (ITP: s6 -- a small suite of programs for UNIX, designed to allow process supervision)



Your message dated Fri, 07 Sep 2018 11:00:17 +0000
with message-id <E1fyEUr-000FKn-6K@fasolo.debian.org>
and subject line Bug#733915: fixed in s6 2.7.2.0-1
has caused the Debian Bug report #733915,
regarding ITP: s6 -- a small suite of programs for UNIX, designed to allow process supervision
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
733915: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733915
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: wnpp
Severity: wishlist

* Package name    : s6
  Version         : 1.1.1
  Upstream Author : ska <ska@skarnet.org>
* URL             : http://skarnet.org/software/s6/
* License         : ISC
  Programming Lang: C
  Description     : s6 - a small suite of programs for UNIX, designed to allow process supervision

s6 is a small suite of programs for UNIX, designed to allow process
supervision (a.k.a service supervision), in the line of daemontools and
runit. 

 Why another supervision suite ?

Supervision suites are becoming quite common. Today, we already have:

    Good (?) old System V init, which can be made to supervise services
if you perform /etc/inittab voodoo. BSD init can also be used the same
way with the /etc/ttys file, but for some reason, nobody among BSD
developers is using /etc/ttys to this purpose, so I won't consider BSD
init here.
    daemontools, the pioneer
    daemontools-encore, Bruce Guenter's upgrade to daemontools
    runit, Gerrit Pape's suite, well-integrated with Debian
    perp, Wayne Marshall's take on supervision
    and even Upstart, Ubuntu's init system, which performs real
supervision. Fedora's systemd and MacOSX's launchd are very similar in
spirit to Upstart, so the same comments apply to them.

Why is s6 needed ? What does it do differently ? Here are the criteria I
used.


Supervision suites should not wake up unless notified.

    System V init fails the test: it wakes up every 5 seconds, for the
reason that /dev/initctl might have changed. m(
    daemontools fails the test: it wakes up every 5 seconds to check for
new services.
    daemontools-encore does the same.
    the current version of runit fails the test: it wakes up every 14
seconds. But this is a workaround for a bug in some Linux kernels; there
is no design flaw in runit that prevents it from passing the test.
    perp works.
    Upstart works.
    s6 works. By default, s6-svscan wakes up every 5 seconds, to emulate
svscan behaviour; but it can be told not to do so. (s6-svscan -t0)


Supervision suites should provide a program that can run as process 1.

    System V init and Upstart are process 1, so no problem here.
    daemontools was not designed to take over init, although it can be
made to work with enough hacking skills. Same thing with
daemontools-encore.
    runit provides an init functionality, but the mechanism is separate
from the supervision itself; the runit process, not the runsvdir
process, runs as process 1. This lengthens the supervision chain.
    perp was not designed to run as process 1. It probably could be made
to work too without too much trouble.
    s6-svscan was designed from the start to be run as process 1,
although it does not have to.


Supervision suites should be bug-free, lightweight and easy to
understand.

    daemontools, daemontools-encore, runit and perp all qualify. All of
this is excellent quality code, unsurprisingly.
    This is where System V init and Upstart fail, hard. SysVinit is too
big for what it (poorly) does. Upstart is clever, but it's waaaaaay too
complex. Come on people... using ptrace to watch your children fork()?
Linking process 1 against libdbus? This is insanity. Process 1 should be
absolutely stable, it should be guaranteed to never crash, so the whole
of its source code should be under control. At Upstart's level of
complexity, those goals are outright impossible to achieve, so the
Upstart approach is flawed by design.
    Of course, systemd and launchd suffer from the same problem. Guys,
I'm glad you eventually realized that supervision was a good thing, and
that it had to be rooted in process 1, but that does not mean that all
the supervision logic has to go into process 1. No, really.
    s6, which has been designed with embedded environments in mind,
tries harder than anyone to pass this. It tries so hard that s6-svscan
and s6-supervise, the two long-running programs that make the
supervision chain, do not even allocate heap memory, and their main
program source files are less than 500 lines long.


Supervision suites should provide a basis for high-level service
management.

    Neither System V init, daemontools, runit or perp provides any hooks
to wait for a service to go up or down. runit provides a waiting
mechanism, but it's based on polling, and the ./check script has to be
manually written for every service.
    daemontools-encore qualifies: the notify script can be used for
inter-service communication. But it's just a hook: all the real
notification work has to be done by the notify script itself, no
notification framework is provided.
    Upstart already is a service management tool. But, again, it fails
the test of simplicity: it does in process 1 what can and should be done
outside of process 1. Process supervision is not the same as service
management, and Upstart confuses the two. So do systemd and launchd.
    s6 comes with libftrig, an event notification library, and
command-line tools based on this library, thus providing a simple API
for future service management tools to build upon.


Artistic considerations

    s6-svscan and s6-supervise are entirely asynchronous. Even during
trouble (full process table, for instance), they'll remain reactive and
instantly respond to commands they may receive. s6-supervise has even
been implemented as a full deterministic finite automaton, to ensure it
always does the right thing under any circumstance. Other supervision
suites do not achieve that for now.
    daemontools' svscan maintains an open pipe between a daemon and its
logger, so even if the daemon, the logger, and both supervise processes
die, the pipe is still the same so no logs are lost, ever, unless svscan
itself dies.
    runit has only one supervisor, runsv, for both a daemon and its
logger. The pipe is maintained by runsv. If the runsv process dies, the
pipe disappears and logs are lost. So, runit does not offer as strong a
guarantee as daemontools.
    perp has only one process, perpd, acting both as a "daemon and
logger supervisor" (like runsv) and as a "service directory scanner"
(like runsvdir). It maintains the pipes between the daemons and their
respective loggers. If perpd dies, everything is lost. Since perpd
cannot be run as process 1, this is a possible SPOF for a perp
installation; however, perpd is well-written and has virtually no risk
of dying, especially compared to process 1 behemoths like Upstart,
systemd and launchd.
    Besides, the runsv model, which has to handle both a daemon and its
logger, is more complex than the supervise model (which only has to
handle a daemon). Consequently, the runsvdir model is simpler than the
svscan model, but there is only one svscan instance when there are
several runsvs and supervises. The perpd model is obviously the most
complex; while very understandable, perpd is unarguably harder to
maintain than the other two.
    So, to achieve maximum simplicity and code reuse, and minimal memory
footprint, s6's design is close to daemontools' one. And when s6-svscan
is run as process 1, pipes between daemons and loggers are never lost.


Conclusion

All in all, I believe that s6 offers the best overall implementation of
a supervision suite as it should be designed. At worst, it's just
another take on daemontools with a reliable base library and a few nifty
features. 

ska - http://skarnet.org/software/s6/why.html

--- End Message ---
--- Begin Message ---
Source: s6
Source-Version: 2.7.2.0-1

We believe that the bug you reported is fixed in the latest version of
s6, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 733915@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Shengjing Zhu <zhsj@debian.org> (supplier of updated s6 package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Fri, 07 Sep 2018 02:05:20 +0800
Source: s6
Binary: libs6-2.7 libs6-dev s6 s6-doc
Architecture: source amd64 all
Version: 2.7.2.0-1
Distribution: unstable
Urgency: medium
Maintainer: Shengjing Zhu <zhsj@debian.org>
Changed-By: Shengjing Zhu <zhsj@debian.org>
Description:
 libs6-2.7  - small and secure supervision software suite (shared library)
 libs6-dev  - small and secure supervision software suite (development files)
 s6         - small and secure supervision software suite
 s6-doc     - small and secure supervision software suite (documentation)
Closes: 733915
Changes:
 s6 (2.7.2.0-1) unstable; urgency=medium
 .
   * Initial release. (Closes: #733915)
Checksums-Sha1:
 6e18ca29c4a0e79a55b899d56f4ca67396dc2bf6 1634 s6_2.7.2.0-1.dsc
 8b5df3caea69b563337d95d1eebf904b0e31e448 201430 s6_2.7.2.0.orig.tar.gz
 41ae35f0040caaef400f7f7193779587b9785082 3552 s6_2.7.2.0-1.debian.tar.xz
 94c021383810d0959e2e2288c08f91e4d4f6e6d9 70872 libs6-2.7-dbgsym_2.7.2.0-1_amd64.deb
 68e809ce495dcbba7a857a2c1b9087509451943d 17148 libs6-2.7_2.7.2.0-1_amd64.deb
 9a58d90431fa95b67d58ee2da8e42cf5a8791dd1 21328 libs6-dev_2.7.2.0-1_amd64.deb
 05c9fb00cb59c1e50d9735b5f0c3a2fd86142f8d 342160 s6-dbgsym_2.7.2.0-1_amd64.deb
 2400aa9f2fff0d3247facd93c135657cce09d4f7 92880 s6-doc_2.7.2.0-1_all.deb
 49dcec7a194992f249113e49d7d6a226b324f6e1 6606 s6_2.7.2.0-1_amd64.buildinfo
 3a367a25e88791e5e0736ae3f10145db64a092a8 104660 s6_2.7.2.0-1_amd64.deb
Checksums-Sha256:
 3271fdcf21a800286a4af03eb89ffe34ee89bf4054a24aee72cf3dbe2b8123e5 1634 s6_2.7.2.0-1.dsc
 0fbfa6446c99af67485112fd5ef362d4948c90f427e01652a61a08bead127f07 201430 s6_2.7.2.0.orig.tar.gz
 e9bc2979e8357981d62439b66e30783b212202f0952dfbb361b2a2cac93c12b8 3552 s6_2.7.2.0-1.debian.tar.xz
 cd846fb505900d57ca3a2978404668cedb2b03f59c4f8aaab87c36c7ae80cd04 70872 libs6-2.7-dbgsym_2.7.2.0-1_amd64.deb
 30e3cfc458e242f67332829389251e9c57b6553f9daecce423b94ff280a7ffd2 17148 libs6-2.7_2.7.2.0-1_amd64.deb
 a0ea54db8b920ff588881f03f9555da1ba78220a116bf8ea9cf9253973eb4ece 21328 libs6-dev_2.7.2.0-1_amd64.deb
 8effca36465440bd5748036a1b086a02633ccdbfe4515f33cf5305154a3a457a 342160 s6-dbgsym_2.7.2.0-1_amd64.deb
 ad1b66cdbcc9fb7931267ec226dac78abe514868d15640d04da23253007307fb 92880 s6-doc_2.7.2.0-1_all.deb
 4be39afd887125142d354db5a3a496ba4618d7a180a4e2950c1aa95486c91a40 6606 s6_2.7.2.0-1_amd64.buildinfo
 ad58bc33eb71be7aac80a1b5424de15cc77aff3482aad17e0391623387a3781a 104660 s6_2.7.2.0-1_amd64.deb
Files:
 69ccee91e53b273e12149c22c8158ed2 1634 admin optional s6_2.7.2.0-1.dsc
 4b1ad2cfbd79e340ace491b3bb103f66 201430 admin optional s6_2.7.2.0.orig.tar.gz
 8a76a0a6b4a32e1ef4c9885cb6b07b49 3552 admin optional s6_2.7.2.0-1.debian.tar.xz
 b6e0099b64b1861b94fc33edb4a61a9d 70872 debug optional libs6-2.7-dbgsym_2.7.2.0-1_amd64.deb
 6f03974f6f365171ac579a04fa5ccdd1 17148 libs optional libs6-2.7_2.7.2.0-1_amd64.deb
 e0516b312f155d673938b47a1262c124 21328 libdevel optional libs6-dev_2.7.2.0-1_amd64.deb
 933286e237685215cec04c1839e67fee 342160 debug optional s6-dbgsym_2.7.2.0-1_amd64.deb
 c9988f935bc87db4097960712cba5083 92880 doc optional s6-doc_2.7.2.0-1_all.deb
 bb7180ae619cfd72fa0fd90f35e8142b 6606 admin optional s6_2.7.2.0-1_amd64.buildinfo
 3f1e0593707131ce5a71f012be2332a3 104660 admin optional s6_2.7.2.0-1_amd64.deb

-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE85F2DZP0aJKsSKyHONAPABi+PjUFAluRbhcACgkQONAPABi+
PjVmTggAiudghYs7KBUvp5/AMNzRcas/qhtkXnTZJgoqDtlaTYxgSNNFwLrXVEhG
ewVjY31t+pTTE1hHS5v5GIpykZHBuyNSBQC/CJ4e+ROfwM0mBvL9FLW6lDt1Bnrt
qqSPuH9pWtvNjm1Tk1jDXtrlwkzPKnyXROE9DnnmRHkDZVM+zkDB0q7qu5kRQuhb
qcd473M4sfTQaefGsOQSxKy/PW2UhutUr1b+0QOSc4dGf72zS7uzbtS4tS/SI/Rl
XSfMQrVJtDMbWhKBmhDE37pLBL65vblVHG729S5mkI0fwFNkRPZMGgQVtPkcIOjv
N1RZa4+AOFmitYCTwYrn4aTIfujN7Q==
=rkVD
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: