From: "Ludovic Courtès" <ludo@gnu.org>
To: Thiago Jung Bauermann <bauermann@kolabnow.com>
Cc: Maxim Cournoyer <maxim.cournoyer@gmail.com>,
Kyle Meyer <kyle@kyleam.com>, zimoun <zimon.toutoune@gmail.com>,
Arun Isaac <arunisaac@systemreboot.net>,
guix-devel@gnu.org
Subject: Re: Updating mumi on berlin
Date: Sun, 15 May 2022 22:59:36 +0200 [thread overview]
Message-ID: <878rr2cy13.fsf@gnu.org> (raw)
In-Reply-To: <877d6w96by.fsf@kolabnow.com> (Thiago Jung Bauermann's message of "Sat, 07 May 2022 22:00:46 -0300")
Hi,
Thiago Jung Bauermann <bauermann@kolabnow.com> skribis:
> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi,
>>
>> Maxim Cournoyer <maxim.cournoyer@gmail.com> skribis:
>>
>>> Yes, that would be the correct and general solution (I hope you get to
>>> fix it, else I may look into it in some time). Workarounds currently in
>>> use can be seen in our mutter package definition (it's a bit convoluted,
>>> having to fork a process in which we set the child reaping property and
>>> invoke the test suite via tini, acting as a fake PID 1).
>>
>> The Guile process running the build script (with the build phases) runs
>> as PID 1. So how about doing one of these:
>>
>> 1. Add a final phase that does (waitpid WAIT_ANY).
>>
>> 2. Add a SIGCHLD handler that calls ‘waitpid’.
>>
>> I suspect the former is enough.
>
> I don't think it is, unless I'm misunderstanding something. The
> testsuite expects the daemon to die within a few seconds of sending it
> the quit command (which it does several times over the course of a
> number of the tests), so having it reaped at the end of the build
> process won't help.
I see, makes sense.
> I tried the latter a couple of weeks ago and it didn't work either,
> though it's highly likely that I did something wrong in my Scheme code.
> I also didn't use the 1-second timer hack so perhaps that was it.
>
> I just tested this (adapted from the mutter package) and it worked:
>
> @@ -4137,6 +4142,26 @@ (define-public public-inbox
> ;; the builder.
> (substitute* "t/httpd-unix.t"
> (("^SKIP: \\{") "SKIP: { skip('Guix');"))))
> + (replace 'check
> + (lambda* (#:key target
> + (tests? (not target)) (test-flags '())
> + #:allow-other-keys)
> + (if tests?
> + (match (primitive-fork)
> + (0 ;child process
> + (set-child-subreaper!)
> + ;; Use tini so that signals are properly handled and
> + ;; doubly-forked processes get reaped; otherwise,
> + ;; lei-daemon is kept as a zombie and the testsuite
> + ;; fails thinking that it didn't quit as it should.
> + (apply execlp "tini" "--"
> + "make" "check" test-flags))
How does a basic SIGCHLD handler fare?
(sigaction SIGCHLD
(lambda _ (false-if-exception (waitpid WAIT_ANY WNOHANG))))
>> Eventually, we should do one of these in gnu-build-system.scm, as in:
>>
>> https://issues.guix.gnu.org/30948#2
>>
>> WDYT?
>
> I agree, possibly with the 1-second timer hack as well.
Heh, I hate that one, we need to find a better solution.
Thanks,
Ludo’.
next prev parent reply other threads:[~2022-05-15 20:59 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-22 5:38 Updating mumi on berlin Arun Isaac
2022-04-27 6:27 ` zimoun
2022-04-27 11:14 ` Arun Isaac
2022-05-02 10:33 ` zimoun
2022-05-03 17:33 ` Arun Isaac
2022-05-03 20:42 ` Thiago Jung Bauermann
2022-05-04 8:00 ` zimoun
2022-05-05 1:49 ` Kyle Meyer
2022-05-05 3:13 ` Thiago Jung Bauermann
2022-05-05 14:45 ` Maxim Cournoyer
2022-05-06 3:16 ` Thiago Jung Bauermann
2022-05-07 22:20 ` Ludovic Courtès
2022-05-08 1:00 ` Thiago Jung Bauermann
2022-05-15 20:59 ` Ludovic Courtès [this message]
2022-05-16 8:27 ` Maxime Devos
2022-06-04 22:36 ` Thiago Jung Bauermann
2022-05-05 8:37 ` zimoun
2022-05-06 2:24 ` public-inbox v1.7 update (was: Updating mumi on berlin) Kyle Meyer
2022-05-06 7:37 ` zimoun
2022-05-08 4:41 ` Kyle Meyer
2022-05-09 13:58 ` zimoun
2022-05-06 3:22 ` Updating mumi on berlin Thiago Jung Bauermann
2022-05-06 7:48 ` zimoun
2022-05-15 22:05 ` Thiago Jung Bauermann
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=878rr2cy13.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=arunisaac@systemreboot.net \
--cc=bauermann@kolabnow.com \
--cc=guix-devel@gnu.org \
--cc=kyle@kyleam.com \
--cc=maxim.cournoyer@gmail.com \
--cc=zimon.toutoune@gmail.com \
/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.