GNU bug report logs - #76343
shepherd 1.0.2 --help: warning: call to environ while multiple threads are running; further behavior unspecified.

Previous Next

Package: guix;

Reported by: Simon Josefsson <simon <at> josefsson.org>

Date: Sun, 16 Feb 2025 17:31:02 UTC

Severity: normal

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Simon Josefsson <simon <at> josefsson.org>
To: Tomas Volf <~@wolfsden.cz>
Cc: 76343 <at> debbugs.gnu.org,
 Simon Josefsson via Bug reports for GNU Guix <bug-guix <at> gnu.org>
Subject: Re: bug#76343: shepherd 1.0.2 --help: warning: call to environ
 while multiple threads are running; further behavior unspecified.
Date: Mon, 17 Feb 2025 00:33:14 +0100
[Message part 1 (text/plain, inline)]
Tomas Volf <~@wolfsden.cz> writes:

> Simon Josefsson via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
>
>> Hi
>>
>> It seems shepherd in Debian print the following on a simple --help:
>>
>> 132s warning: call to environ while multiple threads are running;
>> 132s          further behavior unspecified.
>>
>> I can't find the error message in guile-fibers or shepherd source code.
>> Any ideas where it comes from
>
> Guile itself, libguile/posix.c.
>
> libguile/posix.c
> 1724-  if (scm_ilength (scm_all_threads ()) != 1)
> 1725-    scm_display
> 1726-      (scm_from_latin1_string
> 1727:       ("warning: call to environ while multiple threads are running;\n"
> 1728-        "         further behavior unspecified.\n"),
> 1729-       scm_current_warning_port ());
> 1730-
>
>> and how to fix it?
>
> Do not call (environ) when multiple threads are running, but I assume
> that is not actually helpful advice. :)

Thank you for the pointer.  Interesting - why isn't this triggered on
Guix but only when building shepherd on a foreign distribution like
Debian?

Is the message really correct?  I thought guile-fibers and shepherd did
not use threads at all.

If it is possible to make --help and --version avoid launching new
threads, that would be nice to resolve this warning for at least the
simple use-case of doing --help and --version.

/Simon

>>
>> Version 1.0.0:
>> https://ci.debian.net/packages/s/shepherd/testing/amd64/57880388/
>>
>> Version 1.0.2:
>> https://salsa.debian.org/debian/shepherd/-/jobs/7101207#L718
>>
>> /Simon
>>
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 138 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.