From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <bug-guix-bounces+larch=yhetil.org@gnu.org>
Received: from mp0.migadu.com ([2001:41d0:403:58f0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by ms13.migadu.com with LMTPS
	id 0LoIEiEBKmcRxQAAqHPOHw:P1
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 05 Nov 2024 11:27:29 +0000
Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	by mp0.migadu.com with LMTPS
	id 0LoIEiEBKmcRxQAAqHPOHw
	(envelope-from <bug-guix-bounces+larch=yhetil.org@gnu.org>)
	for <larch@yhetil.org>; Tue, 05 Nov 2024 12:27:29 +0100
X-Envelope-To: larch@yhetil.org
Authentication-Results: aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=nWFDV46O;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gx1G4t0V;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org;
	s=key1; t=1730806049;
	h=from:from:sender:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:resent-cc:resent-from:resent-sender:
	 resent-message-id:in-reply-to:in-reply-to:references:references:
	 list-id:list-help:list-unsubscribe:list-subscribe:list-post:
	 dkim-signature; bh=lZcpeLn6/+1Wr5/YzYuRkg5RQjCh5kAd5WriXoMgMec=;
	b=pNcC2JNubl1lcS23RgOpsdnb5KfwC7X3Pb65OlK+BtdfsOrEaP62DvIr5n2eL9X6PNnVRc
	/IslMj1NClmhx0XWZQZIji0wG9GMhTivzmlF3GJdIJCa6Ab4Uw/kcGgV8JlGDsGH/RYi8R
	OOE44bEGQhYJsPrlx7JJAaz62NP8xL3PCBn6FGgYm5em/g6jeqE3v8nn05DAX2tMOQP+Sj
	YsIgZcpFQX8IZ1kX8RsrdzB86tGc1eyWOEtInX5pLXaAPn/wJM+uJlvGl5vtuiRib677VR
	i9vcitPKxjl2KBPVXaVnasYssgbABydfDwfOeMkd/erLqx03ljJZBGzEiMY2+g==
ARC-Authentication-Results: i=1;
	aspmx1.migadu.com;
	dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=nWFDV46O;
	dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=gx1G4t0V;
	spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org";
	dmarc=pass (policy=none) header.from=gnu.org
ARC-Seal: i=1; s=key1; d=yhetil.org; t=1730806049; a=rsa-sha256; cv=none;
	b=beIHejwaylcETMYHeMfNG7d7h248mjI3oP1LcZU1HbA20BIiE6m4bt5XRFsWZw0QmbbMIr
	BeRr1VZUF1RHG+dfdo75znTyGUCZbm7Dm6s7EVTb4wX9OXL4+FxPMM7UcWOKgx1CCl6FIu
	DirTbHFbIlBcGNoCb2P2mxN/UsU9fWsDSc2fgJY3H9immel8rtsI7kqx0k4PEVbXYVGttL
	OlfMBzeTkx/zhF33JytXw3k5KD8a9oejI5XN4Pyd2GTqgoKxw1e+y6tz99lRpkigSVsm+L
	vjMTOvD5yLYI4E7Kp3/tUm4XLkTj8kR5QNCnEQDiS2colYpARU0ioC5T45Ldig==
Received: from lists.gnu.org (lists.gnu.org [209.51.188.17])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by aspmx1.migadu.com (Postfix) with ESMTPS id 9045F812AE
	for <larch@yhetil.org>; Tue, 05 Nov 2024 12:27:28 +0100 (CET)
Received: from localhost ([::1] helo=lists1p.gnu.org)
	by lists.gnu.org with esmtp (Exim 4.90_1)
	(envelope-from <bug-guix-bounces@gnu.org>)
	id 1t8HiB-0006u3-KD; Tue, 05 Nov 2024 06:27:03 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1t8HiA-0006tp-3T
 for bug-guix@gnu.org; Tue, 05 Nov 2024 06:27:02 -0500
Received: from debbugs.gnu.org ([2001:470:142:5::43])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>)
 id 1t8Hi9-0007zh-QH
 for bug-guix@gnu.org; Tue, 05 Nov 2024 06:27:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=debbugs.gnu.org; s=debbugs-gnu-org; 
 h=MIME-Version:Date:References:In-Reply-To:From:To:Subject;
 bh=lZcpeLn6/+1Wr5/YzYuRkg5RQjCh5kAd5WriXoMgMec=; 
 b=nWFDV46Ozo7nkeNBmfQNXsSiUJiavAB+tBcPKce73K2dMsPcVceNaP14V2GuD00800JEI7LOSCEPIG9iTUuEmI8AVP2XKqM7HiPTOv23U3mw8OBLXDlreEyOxVMLk/aHmTaqf9al2odbRXDTZzeKCbIt/yFj+4p+mBuiz2S7kGRJ4c0u05EzB+iEgZ+RjtYBllURaYjoohx+p9Hj20IZ943JFO6LzEbhDHJcMQiBovgjjwl+GzDRXscto8ey4gzYp111SWpBQBMSJ/NJNDFleO72c21vWmr623QILD6MFWYZhDx81VsfEIvawbbSLuOs4bmOv4bWsVYY87TufqYNeQ==;
Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2)
 (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1t8Hi9-0003vL-L7
 for bug-guix@gnu.org; Tue, 05 Nov 2024 06:27:01 -0500
X-Loop: help-debbugs@gnu.org
Subject: bug#73181: guix-daemon fails when invoking =?UTF-8?Q?=E2=80=98guix_?=
 =?UTF-8?Q?authenticate=E2=80=99?= on the Hurd
Resent-From: <janneke@gnu.org>
Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
Resent-CC: bug-guix@gnu.org
Resent-Date: Tue, 05 Nov 2024 11:27:01 +0000
Resent-Message-ID: <handler.73181.B73181.173080601515074@debbugs.gnu.org>
Resent-Sender: help-debbugs@gnu.org
X-GNU-PR-Message: followup 73181
X-GNU-PR-Package: guix
X-GNU-PR-Keywords: 
To: Ludovic =?UTF-8?Q?Court=C3=A8s?= <ludovic.courtes@inria.fr>
Cc: 73181@debbugs.gnu.org
Received: via spool by 73181-submit@debbugs.gnu.org id=B73181.173080601515074
 (code B ref 73181); Tue, 05 Nov 2024 11:27:01 +0000
Received: (at 73181) by debbugs.gnu.org; 5 Nov 2024 11:26:55 +0000
Received: from localhost ([127.0.0.1]:43626 helo=debbugs.gnu.org)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
 id 1t8Hi3-0003v4-2v
 for submit@debbugs.gnu.org; Tue, 05 Nov 2024 06:26:55 -0500
Received: from eggs.gnu.org ([209.51.188.92]:47996)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@gnu.org>) id 1t8Hi0-0003uw-86
 for 73181@debbugs.gnu.org; Tue, 05 Nov 2024 06:26:53 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <janneke@gnu.org>)
 id 1t8Hht-0007yk-7q; Tue, 05 Nov 2024 06:26:45 -0500
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To:
 From; bh=lZcpeLn6/+1Wr5/YzYuRkg5RQjCh5kAd5WriXoMgMec=; b=gx1G4t0V4p1op7KxZh9W
 pcG7jfCSYqaneVIzlBtYbdymE/dPk4zsAVPKjJ1oSxKggT9qDm0BN61Ge+jrMIr16ZMv+73bqTGcd
 FpnK8APzS5P12wwFV18XDjHAwhkAvHS7LYrl5k3GieRuCDuOfRsSQZyHw08K6F3xcTYP/wybuN67t
 3X9Wt77ekLUuDdhg2m6dEjnEaJVC0/E4fvP1wDQaOrBehnDquXaxFgG79BdOONumNLkjTKUuMqmde
 cPFOwVIlV6FaE8mDwGw9I4+IhCVfs49e3qFN84lnkd1/6rm+BvY/ZtFvPKXka7U3IoEU+rB3C90HO
 IOXmPopRPwy67A==;
From: <janneke@gnu.org>
In-Reply-To: <874j4n5s02.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s
 message of "Mon, 04 Nov 2024 09:21:17 +0100")
Organization: AvatarAcademy.nl
References: <87o74u5hcy.fsf@inria.fr> <87a5ge5d94.fsf@gnu.org>
 <87h68snkzk.fsf@gnu.org> <874j4n5s02.fsf@inria.fr>
X-Url: http://AvatarAcademy.nl
Date: Tue, 05 Nov 2024 12:26:37 +0100
Message-ID: <87ed3phqfm.fsf@gnu.org>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-BeenThere: debbugs-submit@debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
X-BeenThere: bug-guix@gnu.org
List-Id: Bug reports for GNU Guix <bug-guix.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/bug-guix>
List-Post: <mailto:bug-guix@gnu.org>
List-Help: <mailto:bug-guix-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/bug-guix>,
 <mailto:bug-guix-request@gnu.org?subject=subscribe>
Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org
Sender: bug-guix-bounces+larch=yhetil.org@gnu.org
X-Migadu-Country: US
X-Migadu-Flow: FLOW_IN
X-Migadu-Scanner: mx11.migadu.com
X-Migadu-Spam-Score: -0.04
X-Spam-Score: -0.04
X-Migadu-Queue-Id: 9045F812AE
X-TUID: KNtExwb1Xs0u

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Ludovic Court=C3=A8s writes:

Hello,

> <janneke@gnu.org> skribis:
>
>> Ludovic Court=C3=A8s writes:

[..]

>>> I see several possible things to do:
>>>
>>>   1. Disable GC warnings altogether in Guix by setting =E2=80=98GC_warn=
_proc=E2=80=99.
>>>
>>>   2. Make sure guix-daemon discards stderr from agents such as =E2=80=
=98guix
>>>      authenticate=E2=80=99.
>>>
>>>   3. Figure out why those =E2=80=9CRepeated allocation=E2=80=9D message=
s are so frequent
>>>      on i586-gnu and Do Something About It=E2=84=A2.

[..]

> Yeah, let=E2=80=99s start with (1), maybe with the patch below (untested)?
>
> (2) and (3) would be nice, but it goes with increasing difficulty.

So...find two patches attached.  A tested version of (untested) which
was very helpful but did not compile.  I should have tested with #if 1,
and use #:tests? #f with guix right away... ;)

Anyway, using this patch 0001 it seems that suppressing the warnings
works, I no longer get

--8<---------------cut here---------------start------------->8---
"GC Warning: Repeated allocation of very large block (appr. size 112 KiB):\=
n\tMay lead to memory leak and poor performance\n"
--8<---------------cut here---------------end--------------->8---

but still get

--8<---------------cut here---------------start------------->8---
unexpected build daemon error: stoi
--8<---------------cut here---------------end--------------->8---

and the copy (and offload) still fails.  Then I tried resetting LC_ALL

>> How about
>>
>>    0. Unsetting LC_ALL on the Hurd
>>
>> would that work?
>
> I=E2=80=99m not sure, but if it does, it=E2=80=99s only =E2=80=9Cby chanc=
e=E2=80=9D.

(option 0.) anyway in a followup patch.  Adding this patch 0003 (patch
0002 was just the guix package update), also the "stoi" warning is gone,
and offloading works.

So it seems that we have a workaround that "works by chance", WDYT?

Greetings,
Janneke


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=0001-guile-Silence-GC-warnings-on-the-Hurd.patch
Content-Transfer-Encoding: quoted-printable

>From 3d399e51104171ad328bea66ebdc1d6b0ac99685 Mon Sep 17 00:00:00 2001
Message-ID: <3d399e51104171ad328bea66ebdc1d6b0ac99685.1730803153.git.jannek=
e@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 4 Nov 2024 14:54:55 +0100
Subject: [PATCH 1/3] guile: Silence GC warnings on the Hurd.
MIME-Version: 1.0
Content-Type: text/plain; charset=3DUTF-8
Content-Transfer-Encoding: 8bit
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=3DUTF-8

This should work around <https://issues.guix.gnu.org/73181>, resurrecting
offloading to the Hurd.

* gnu/packages/aux-files/guile-launcher.c (no_warnings)[__GNU__]: New
function.
(main)[__GNU__]: Use it to silence libgc warnings.

Co-authored-by: Ludovic Court=C3=A8s <ludo@gnu.org>.
Change-Id: I8f30732d192ce46144da4a1a081813a104a5f376
---
 gnu/packages/aux-files/guile-launcher.c | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-fil=
es/guile-launcher.c
index ad0094bff5..bc7fa21b63 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -1,7 +1,8 @@
 /* GNU Guix --- Functional package management for GNU
    Copyright 1996-1997,2000-2001,2006,2008,2011,2013,2018,2020,2021
       Free Software Foundation, Inc.
-   Copyright (C) 2020 Ludovic Court=C3=A8s <ludo@gnu.org>
+   Copyright (C) 2020, 2024 Ludovic Court=C3=A8s <ludo@gnu.org>
+   Copyright (C) 2024 Janneke Nieuwenhuizen <janneke@gnu.org>
=20
    This file is part of GNU Guix.
=20
@@ -28,6 +29,14 @@
 #include <locale.h>
 #include <libguile.h>
=20
+#if defined __GNU__
+#include <gc.h>
+static void
+no_warnings (char *message, GC_word arg)
+{
+}
+#endif
+
 /* Saved values of GUILE_LOAD_PATH and GUILE_LOAD_COMPILED_PATH.  */
 static const char *load_path, *load_compiled_path;
=20
@@ -73,6 +82,14 @@ main (int argc, char **argv)
        which is always preferable over the C locale.  */
     setlocale (LC_ALL, "en_US.utf8");
=20
+#if defined __GNU__
+  /* XXX: On 32-bit GNU/Hurd (i586-gnu), libgc emits "Repeated allocation"
+     warnings that are annoying and interfere with communications between
+     'guix-daemon' and 'guix authenticate':
+     <https://issues.guix.gnu.org/73181>.  Silence them.  */
+  GC_set_warn_proc (no_warnings);
+#endif
+
   const char *str;
   str =3D getenv ("GUILE_LOAD_PATH");
   load_path =3D str !=3D NULL ? strdup (str) : NULL;

base-commit: 20c7b8dd04e421a139a02438cf1ddfdfe544a446
--=20
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade=
my.com


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: inline;
 filename=0003-squash-guile-Silence-GC-warnings-on-the-Hurd.patch
Content-Transfer-Encoding: quoted-printable

>From b62d59cf5cc9f968bedd8126f587bc8e14f7964c Mon Sep 17 00:00:00 2001
Message-ID: <b62d59cf5cc9f968bedd8126f587bc8e14f7964c.1730803153.git.jannek=
e@gnu.org>
In-Reply-To: <3d399e51104171ad328bea66ebdc1d6b0ac99685.1730803153.git.janne=
ke@gnu.org>
References: <3d399e51104171ad328bea66ebdc1d6b0ac99685.1730803153.git.jannek=
e@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Mon, 4 Nov 2024 17:38:46 +0100
Subject: [PATCH 3/3] squash! guile: Silence GC warnings on the Hurd.
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=3DUTF-8

Change-Id: Ia720221ed285d3e56938cfa37989d2c7c07b00e3
---
 gnu/packages/aux-files/guile-launcher.c | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-fil=
es/guile-launcher.c
index bc7fa21b63..ee6da76cc4 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -75,19 +75,22 @@ inner_main (void *unused, int argc, char **argv)
 int
 main (int argc, char **argv)
 {
-  /* Try to install the current locale; remain silent if it fails.  */
-  if (setlocale (LC_ALL, "") =3D=3D NULL)
-    /* The 'guix pull'-provided 'guix' includes at least en_US.utf8 so use
-       that.  That gives us UTF-8 support for 'scm_to_locale_string', etc.,
-       which is always preferable over the C locale.  */
-    setlocale (LC_ALL, "en_US.utf8");
-
 #if defined __GNU__
+  /* Try to install the C locale; remain silent if it fails.  */
+  setlocale (LC_ALL, "C");
+
   /* XXX: On 32-bit GNU/Hurd (i586-gnu), libgc emits "Repeated allocation"
      warnings that are annoying and interfere with communications between
      'guix-daemon' and 'guix authenticate':
      <https://issues.guix.gnu.org/73181>.  Silence them.  */
   GC_set_warn_proc (no_warnings);
+#else
+  /* Try to install the current locale; remain silent if it fails.  */
+  if (setlocale (LC_ALL, "") =3D=3D NULL)
+    /* The 'guix pull'-provided 'guix' includes at least en_US.utf8 so use
+       that.  That gives us UTF-8 support for 'scm_to_locale_string', etc.,
+       which is always preferable over the C locale.  */
+    setlocale (LC_ALL, "en_US.utf8");
 #endif
=20
   const char *str;
--=20
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade=
my.com


--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable


--=20
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade=
my.com

--=-=-=--