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

From: Tomas Volf <[email-masked]>
Date: Sun, 16 Feb 2025 22:43:13 +0100

Simon Josefsson via Bug reports for GNU Guix <[email-masked]> 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.

--8<---------------cut here---------------start------------->8---
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-
--8<---------------cut here---------------end--------------->8---

> and how to fix it?

Do not call (environ) when multiple threads are running, but I assume
that is not actually helpful advice. :)

>
> 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
>

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.