[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#54997] [PATCH 00/12] Add "least authority" program wrapper
From: |
Thiago Jung Bauermann |
Subject: |
[bug#54997] [PATCH 00/12] Add "least authority" program wrapper |
Date: |
Fri, 29 Apr 2022 00:43:59 -0300 |
Hi Ludo!
Ludovic Courtès <ludo@gnu.org> writes:
> Thiago Jung Bauermann <bauermann@kolabnow.com> skribis:
>> So to avoid an accumulation of zombie processes and other signal-related
>> problems, I suggest adding a “(init-program ,tini)” parameter to
>> ‘least-authority-wrapper’ and executing ‘program’ as a subprocess of
>> ‘tini’ or whatever was passed as the #:init-program (perhaps #f could
>> mean running ‘program’ directly as PID 1).
>
> Hmm yes. It’s not great that the choice is between ‘unshare’—efficient
> but the process lives in the parent PID namespace—and ‘clone’—but then
> you have to fork twice.
Yeah, the signals part of the Unix design isn't great.
> But yeah, you’re right. I’ll try what you suggest and send a v2.
Thank you for making these changes! I had a look at v2 and it looks
great.
>> I mention this because I'm currently dealing with a problem that has
>> exactly this root cause: I'm working on updating the public-inbox
>> package to the latest version, and the testsuite is failing because it
>> tests that lei's daemon process is correctly terminated. But that
>> doesn't work because “guix build” doesn't use a proper init program as
>> PID 1 and thus the daemon process goes to zombie state and the testsuite
>> thinks that it didn't go away. I'm hoping to send a patch to fix that
>> issue.
>
> Now that you mention it, this was discussed before:
>
> https://issues.guix.gnu.org/30948
>
> I think we should do something about it in gnu-build-system.scm.
Nice! Thank you for the link. The discussion there was very informative.
I'll try to implement your idea of adding a new build phase to install
the appropriate signal handlers. Probably even steal your child reaping
code from the v2 patches.
> Thanks for your feedback!
Thank you for taking it into account!
--
Thanks
Thiago
- [bug#54997] [PATCH 01/12] gexp: Add 'references-file'., (continued)
- [bug#54997] [PATCH 01/12] gexp: Add 'references-file'., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 02/12] file-systems: Avoid load-time warnings when attempting to load (guix store)., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 03/12] linux-container: 'call-with-container' relays SIGTERM and SIGINT., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 04/12] Add (guix least-authority)., Ludovic Courtès, 2022/04/17
- [bug#54997] [PATCH 04/12] Add (guix least-authority)., Maxime Devos, 2022/04/18
- [bug#54997] [PATCH 00/12] Add "least authority" program wrapper, Ludovic Courtès, 2022/04/19
- [bug#54997] [PATCH 04/12] Add (guix least-authority)., Thiago Jung Bauermann, 2022/04/22
- [bug#54997] [PATCH 00/12] Add "least authority" program wrapper, Ludovic Courtès, 2022/04/26
- [bug#54997] [PATCH 00/12] Add "least authority" program wrapper,
Thiago Jung Bauermann <=
- [bug#54997] [PATCH 00/12] Add "least authority" program wrapper, Ludovic Courtès, 2022/04/26
- [bug#54997] [PATCH v2 00/15] Add "least authority" program wrapper, Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 01/15] gexp: Add 'references-file'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 05/15] linux-container: Add #:child-is-pid1? parameter to 'call-with-container'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 03/15] linux-container: 'call-with-container' relays SIGTERM and SIGINT., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 04/15] linux-container: Ensure signal-handling asyncs get a chance to run., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 02/15] file-systems: Avoid load-time warnings when attempting to load (guix store)., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 12/15] services: wesnothd: Grant write access to /var/run/wesnothd., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 08/15] services: dicod: Use 'make-inetd-constructor'., Ludovic Courtès, 2022/04/27
- [bug#54997] [PATCH v2 06/15] Add (guix least-authority)., Ludovic Courtès, 2022/04/27