GNU bug report logs -
#55441
Use of 'primitive-fork' in (guix inferior) leads to hangs in 'cuirass evaluate'
Previous Next
Full log
Message #22 received at 55441 <at> debbugs.gnu.org (full text, mbox):
Hi Ludo and Mathieu!
Ludovic Courtès <ludo <at> gnu.org> writes:
> Hi!
>
> Mathieu Othacehe <othacehe <at> 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
This bug report was last modified 2 years and 121 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.