From: ludo@gnu.org (Ludovic Courtès)
To: Carlo Zancanaro <carlo@zancanaro.id.au>
Cc: 30948@debbugs.gnu.org
Subject: [bug#30948] [PATCH core-updates] guix: Reap finished child processes in build containers.
Date: Fri, 30 Mar 2018 17:17:29 +0200 [thread overview]
Message-ID: <874lkxoanq.fsf@gnu.org> (raw)
In-Reply-To: <87o9j5x1d4.fsf@zancanaro.id.au> (Carlo Zancanaro's message of "Fri, 30 Mar 2018 22:17:06 +1100")
Hello,
Carlo Zancanaro <carlo@zancanaro.id.au> skribis:
> On Fri, Mar 30 2018, Ludovic Courtès wrote:
>>> From what I can understand it's one of pid 1's responsiblities to
>>> reap child processes, so I would expect this to be set up for every
>>> builder, before the builder is run.
>>
>> True, but for derivations it’s also “optional” because eventually
>> guix-daemon terminates all its child processes.
>
> As long as the build process doesn't rely on behaviour that, strictly
> speaking, it should be allowed to rely on. It's not an issue of
> resource leaking, it's an issue of correctness.
Right.
>>> Given it's not specific to the gnu-build-system, I don't think it
>>> really fits there.
>>
>> Yes, but note that it would be inherited by all the build systems.
>
> Except for trivial-build-system, which is probably fine. I still don't
> think it fits in a specific build system, given it's a behaviour that
> transcends the specific action happening within the container.
>
> Putting it in gnu-build-system will solve the problem in all realistic
> cases, so that's probably fine. It's still subtly incorrect, but will
> only be a problem if something using the trivial build system relies
> on pid 1 to reap a process, or if we make a new build system not
> deriving from gnu-build-system (which seems unlikely, but not
> impossible).
I agree, every Guile process running as PID 1 should reap processes.
My view is just that this mechanism belongs in “user code”, not in the
low-level mechanisms such as ‘build-expression->derivation’ and
‘gexp->derivation’. It’s a matter of separation of concerns.
Of course we don’t want to duplicate that code every time, but the way
we should factorize it, IMO, is by putting it in a “normal” module that
people will use.
Putting it in gnu-build-system is an admittedly hacky but easy way to
have it widely shared.
Thanks,
Ludo’.
next prev parent reply other threads:[~2018-03-30 15:18 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-26 11:16 [bug#30948] [PATCH core-updates] guix: Reap finished child processes in build containers Carlo Zancanaro
2018-03-26 23:39 ` Carlo Zancanaro
2018-03-29 20:07 ` Ludovic Courtès
2018-03-29 21:15 ` Carlo Zancanaro
2018-03-30 8:16 ` Ludovic Courtès
2018-03-30 11:17 ` Carlo Zancanaro
2018-03-30 15:17 ` Ludovic Courtès [this message]
2022-11-24 16:40 ` Maxim Cournoyer
2022-11-24 16:44 ` bug#30948: " Maxim Cournoyer
2022-11-26 15:11 ` Ludovic Courtès
2022-11-27 3:00 ` Maxim Cournoyer
2022-11-28 15:04 ` Ludovic Courtès
2022-11-28 20:10 ` Maxim Cournoyer
2022-11-29 2:07 ` Maxim Cournoyer
2023-12-17 20:23 ` bug#30948: [PATCH core-updates] build-system/gnu: Turn PID 1 into an “init”-style process by default Ludovic Courtès
2023-12-17 21:46 ` Maxim Cournoyer
2023-12-18 17:46 ` bug#30948: [PATCH core-updates] guix: Reap finished child processes in build containers Ludovic Courtès
2023-12-30 3:36 ` Maxim Cournoyer
2023-12-19 22:56 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874lkxoanq.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=30948@debbugs.gnu.org \
--cc=carlo@zancanaro.id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.