Re: Core dump of crashing service program

From: Laurent Bercot <ska-skaware_at_skarnet.org>
Date: Tue, 09 Aug 2022 16:09:24 +0000

>I converted all my arch boxes to artix a while ago, and I opted for s6
>after reading the "why another supervision suite" page. All is peachy and I
>never used a display manager (starting my graphical window manager from the
>console) until I decided to start using ly, which has no s6 support. Yes,
>my system uses s6-linux-init and I am using s6-rc as a service manager.

  Okay, cool.
  Well, your post makes me realize there is something missing in s6-l-i:
it handles the environment of the supervision tree, as in environment
variables, but not the other parts of a process's state, such as
resource limits. Sorry about that! It has actually never come up before.

  With s6-l-i, since the supervision tree is started very early, and
s6-svscan is pid 1, all the services are started with the default
resource limits set by the kernel. So if the default for the core
size is 0, no supervised service will be able to create a core. (This
is generally a good thing, but it should ideally be configurable.)

  In order to change this default, you need to modify stage 1. This
is dangerous, so pay attention to typos.
  After running s6-linux-init-maker and installing the result, edit
your /etc/s6-linux-init/current/bin/init file. Normally this file
is an execline script consisting of just one call to s6-linux-init
with some options.
  Add the following line *before* the s6-linux-init line:
   s6-softlimit -c= --

  (You can use the full path to s6-softlimit, but if it's /usr/bin or
/bin
it should not matter.)
  Then reboot.

  After that, if your services still cannot create coredumps, then it
means the kernel sets the hard limit at 0, and that will be more
difficult to work around. (Might be time to give an option back to
s6-softlimit so it can modify hard limits as well...)

--
  Laurent
Received on Tue Aug 09 2022 - 18:09:24 CEST

This archive was generated by hypermail 2.4.0 : Tue Aug 09 2022 - 18:09:53 CEST