From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Jaft <jaft.r@outlook.com>
Cc: Jaft via <help-guix@gnu.org>
Subject: Re: Help with DBus Tests Failing for Python Package
Date: Thu, 29 Dec 2022 09:56:29 -0500 [thread overview]
Message-ID: <87k02a45sy.fsf@gmail.com> (raw)
In-Reply-To: <BN8PR07MB70279243511287A1C721EDB699F39@BN8PR07MB7027.namprd07.prod.outlook.com> (Jaft's message of "Thu, 29 Dec 2022 09:32:34 +0000 (UTC)")
Hi,
Jaft <jaft.r@outlook.com> writes:
> On Tuesday, December 27, 2022 at 11:49:31 AM CST, Maxim Cournoyer <maxim.cournoyer@gmail.com> wrote:
>> I bet this is because of the expectation of python-dbus on the processes
>> being reaped by PID 1 instead of staying around as zombies, as currently
>> happens in the Guix build container (see:
>> https://issues.guix.gnu.org/30948).
>>
>> The current workaround currently used in Guix involves the use of tini
>> and of a forked process... it's not very pretty (see 'guix edit mutter'
>> for such an example).
>
> Thanks a ton for the pointer, Maxim.
>
> Unfortunately, I still seem to be getting the same result. At first, I tried a simple approach of ~(execlp "tini" "--" "python" "setup.py" "test")~; I think it wound up still requiring the =dbus= package, to run.
>
> That failing, I decided to try something closer to what =mutter= was doing with
[...]
>> (match (primitive-fork)
>> (0 ;child process
>> (set-child-subreaper!)
>> ;; XXX: Tini provides proper PID1-like signal handling that
>> ;; reaps zombie processes, necessary for the
>> ;; 'test_shutdown_subprocesses' test to pass.
>>
>> ;; TODO: Complete https://issues.guix.gnu.org/30948.
>> ;; (execlp "tini" "--" "python" "setup.py" "test")
>> (execlp "tini" "--"
>> "dbus-run-session" "--"
>> "xvfb-run" "-a" "-s" (getenv "XVFB_SERVER_ARGS")
>> "python" "setup.py" "test"))
>> (pid
>> (match (waitpid pid)
>> ((_ . status)
>> (unless (zero? status)
>> (error "`pytest' exited with status"
>> status))))))))))))
>
> I know some bits there are definitely not relevant; I figured I could clean it up, after, if things worked but I'm still getting the exact same errors.
>
> Just to make sure /I'm/ not doing something incorrectly, is this within what you meant? Or did I do anything that's obviously not correct, in this setup?
The important bits are the fork, the (set-child-subreaper!) in the
child process (forked) and the (execlp "tini" "--" your-test-commands).
If this doesn't improve things, the problem may be elsewhere.
--
Thanks,
Maxim
prev parent reply other threads:[~2022-12-29 14:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <871524398.4432753.1672114559997.ref@mail.yahoo.com>
2022-12-27 4:15 ` Help with DBus Tests Failing for Python Package Jaft
2022-12-27 8:46 ` Jaft
2022-12-27 11:08 ` Csepp
2022-12-27 17:49 ` Maxim Cournoyer
2022-12-29 9:32 ` Jaft
2022-12-29 14:56 ` Maxim Cournoyer [this message]
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
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k02a45sy.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=help-guix@gnu.org \
--cc=jaft.r@outlook.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).