From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 55441@debbugs.gnu.org, Mathieu Othacehe <othacehe@gnu.org>
Subject: bug#55441: [cuirass] hang in "In progress..."; runs out of pgsql connections
Date: Mon, 16 May 2022 08:49:28 -0400 [thread overview]
Message-ID: <87h75pk5gn.fsf@gmail.com> (raw)
In-Reply-To: <87o7zxalhu.fsf@gnu.org> ("Ludovic Courtès"'s message of "Mon, 16 May 2022 11:13:17 +0200")
Hi Ludo and Mathieu!
Ludovic Courtès <ludo@gnu.org> writes:
> Hi!
>
> Mathieu Othacehe <othacehe@gnu.org> skribis:
>
>> I noticed this error: https://ci.guix.gnu.org/eval/320682/log/raw.
>>
>> The following lines can be caused by having a multi-threaded program:
>> (cuirass scripts evaluate) because of its par-for-each procedure, call
>> "primitive-fork" in open-bidirectional-pipe of (guix inferior).
>>
>> warning: call to primitive-fork while multiple threads are running;
>> further behavior unspecified. See "Processes" in the
>> manual, for more information.
>>
>> Not sure that it could cause the observed hang, Ludo what do you think?
>
> As you write, the warning comes from ‘open-bidirectional-pipe’, added in
> commit bd86bbd300474204878e927f6cd3f0defa1662a5. I noticed it back then
> but as far as I could see, it was harmless (but definitely suboptimal):
>
> https://issues.guix.gnu.org/48007#11
Thanks for investigating it!
I'm not yet very knowledgeable about POSIX threads and shortcomings, but
this looks like a dangerous trap to have lying around :-). Is there an
alternative implementation we could come up with that would avoid the
potential problem (and warnings) entirely?
Otherwise, if we are sure there are no practical problems in a
multi-threaded scenario, I think a comment explaining the reasoning in
the code (of why it's considered safe despite the warnings) and a test
exercising the behavior would be in order to ensure it continues working
as intended in the face of changes.
Thoughts?
Thanks again,
Maxim
next prev parent reply other threads:[~2022-05-16 12:56 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <87fslcaznn.fsf@gmail.com>
[not found] ` <87mtfj174l.fsf@gnu.org>
2022-05-16 3:49 ` bug#55441: [cuirass] hang in "In progress..."; runs out of pgsql connections Maxim Cournoyer
2022-05-16 7:32 ` Mathieu Othacehe
2022-05-16 9:13 ` Ludovic Courtès
2022-05-16 10:32 ` Ludovic Courtès
2022-05-16 12:19 ` Ludovic Courtès
2022-05-16 17:32 ` Maxim Cournoyer
2022-05-17 7:45 ` Ludovic Courtès
2022-05-18 7:44 ` Ludovic Courtès
2022-05-20 18:32 ` Ludovic Courtès
2022-05-24 21:02 ` Ludovic Courtès
2022-05-25 16:32 ` Ludovic Courtès
2022-05-25 18:21 ` Ludovic Courtès
2022-05-25 23:13 ` Christopher Baines
2022-05-26 9:44 ` Ludovic Courtès
2022-05-26 20:49 ` Josselin Poiret via Bug reports for GNU Guix
2022-05-26 20:50 ` bug#55441: [PATCH] guix: inferior: Make open-bidirectional-pipe use piped-process Josselin Poiret via Bug reports for GNU Guix
2022-05-26 21:02 ` Maxime Devos
2022-05-28 17:15 ` Ludovic Courtès
2022-05-26 20:50 ` bug#55441: [PATCH 1/2] Fix child spawning closing standard fds prematurely Josselin Poiret via Bug reports for GNU Guix
2022-05-26 20:55 ` Maxime Devos
2022-05-26 20:50 ` bug#55441: [PATCH 2/2] Improve thread safety of piped-process Josselin Poiret via Bug reports for GNU Guix
2022-05-26 20:58 ` bug#55441: [cuirass] hang in "In progress..."; runs out of pgsql connections Maxime Devos
2022-05-28 14:02 ` Josselin Poiret via Bug reports for GNU Guix
2023-01-26 14:39 ` Ludovic Courtès
2022-05-26 12:29 ` Ludovic Courtès
2022-05-16 12:49 ` Maxim Cournoyer [this message]
2022-05-17 12:52 ` 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=87h75pk5gn.fsf@gmail.com \
--to=maxim.cournoyer@gmail.com \
--cc=55441@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=othacehe@gnu.org \
/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.