unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Janneke Nieuwenhuizen <janneke@gnu.org>
To: "Ludovic Courtès" <ludovic.courtes@inria.fr>
Cc: 73181@debbugs.gnu.org
Subject: bug#73181: guix-daemon fails when invoking ‘guix authenticate’ on the Hurd
Date: Tue, 10 Dec 2024 13:47:49 +0100	[thread overview]
Message-ID: <8734iv3dsa.fsf@gnu.org> (raw)
In-Reply-To: <87plm0j700.fsf@inria.fr> ("Ludovic Courtès"'s message of "Tue, 10 Dec 2024 09:07:43 +0100")

[-- Attachment #1: Type: text/plain, Size: 1681 bytes --]

Ludovic Courtès writes:

Hey Ludo,
>
> Janneke Nieuwenhuizen <janneke@gnu.org> skribis:
>
>> So, the problem is that our patch doesrn't disable the warnings after all.
>> The guile-launcher has
>>
>> guile-launcher.c:
>>
>> #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.  */
>>   std::cerr << "silencing libgc warnings" << std::endl;
>>   GC_set_warn_proc (no_warnings);
>> #endif
>>   ..
>>   scm_boot_guile (argc, argv, inner_main, 0);
>>
>>
>> and then guile's gc.c just undoes that
>
> D’oh!  Good catch!

Yeah :-/

> You’ll hate me for suggesting that :-)

You know better than that :)

> but what if in ‘guile-launcher.c’
> we moved the ‘GC_set_warn_proc’ call to ‘inner_main’?  I believe in that
> case it would have the desired effect, right?

Ah, I cannot believe I missed that -- I read "inner_main" and thought it
would call guile's inner main.

> That would avoid patching Guile wholesale.
>
> Anyhow, kudos for the tricky and probably lengthy debugging session!

Yeah, so I'm proposing the attached patch -- tested and works for me --
well, apart from having to set overload-threshold.  I asked on #hurd and
hopefully one of Damien's patch series

<https://lists.gnu.org/archive/html/bug-hurd/2024-12/msg00100.html>
<https://lists.gnu.org/archive/html/bug-hurd/2024-12/msg00114.html>

will take care of that; I'll try that some time soon.

Greetings,
Janneke


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-guile-Silence-GC-warnings-on-the-Hurd-part-II.patch --]
[-- Type: text/x-patch, Size: 2236 bytes --]

From 832ef198f7e423e0fdff7fe7c5558ff13d1f20c1 Mon Sep 17 00:00:00 2001
Message-ID: <832ef198f7e423e0fdff7fe7c5558ff13d1f20c1.1733834506.git.janneke@gnu.org>
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 10 Dec 2024 10:16:05 +0100
Subject: [PATCH] guile: Silence GC warnings on the Hurd, part II.

This is a follow-up to commit
    b0416b8503e38746717a2d1167f9d1410634981e
    guile: Silence GC warnings on the Hurd.

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

* gnu/packages/aux-files/guile-launcher.c: (main)[__GNU__]: Move code to
silence warnings to...
(inner_main)[__GNU__]: ...here.

Change-Id: I408201f7f4072c9a33837e6020ac63270b33702e
---
 gnu/packages/aux-files/guile-launcher.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/aux-files/guile-launcher.c b/gnu/packages/aux-files/guile-launcher.c
index bc7fa21b63..c205477f64 100644
--- a/gnu/packages/aux-files/guile-launcher.c
+++ b/gnu/packages/aux-files/guile-launcher.c
@@ -43,6 +43,14 @@ static const char *load_path, *load_compiled_path;
 static void
 inner_main (void *unused, int argc, char **argv)
 {
+#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
+
   if (load_path != NULL)
     {
       setenv ("GUILE_LOAD_PATH", load_path, 1);
@@ -82,14 +90,6 @@ main (int argc, char **argv)
        which is always preferable over the C locale.  */
     setlocale (LC_ALL, "en_US.utf8");
 
-#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 = getenv ("GUILE_LOAD_PATH");
   load_path = str != NULL ? strdup (str) : NULL;

base-commit: 93e1586116f39a30ba1fcb67bd839a43533dfaf4
-- 
2.46.0


[-- Attachment #3: Type: text/plain, Size: 166 bytes --]



-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com

  reply	other threads:[~2024-12-10 12:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-11 15:40 bug#73181: guix-daemon fails when invoking ‘guix authenticate’ on the Hurd Ludovic Courtès
2024-09-11 17:08 ` Ludovic Courtès
2024-10-31 19:14   ` janneke
2024-11-04  8:21     ` Ludovic Courtès
2024-11-05 11:26       ` janneke
2024-11-05 14:03         ` Ludovic Courtès
2024-11-05 15:41           ` janneke
2024-11-10 11:54             ` Ludovic Courtès
2024-11-10 12:01               ` janneke
2024-11-18  8:41           ` janneke
2024-12-06 18:49           ` Janneke Nieuwenhuizen
2024-12-10  8:07             ` Ludovic Courtès
2024-12-10 12:47               ` Janneke Nieuwenhuizen [this message]
2024-12-10 13:53                 ` Ludovic Courtès
2024-12-10 14:02                   ` Janneke Nieuwenhuizen
2024-12-10 17:00                   ` Janneke Nieuwenhuizen

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8734iv3dsa.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=73181@debbugs.gnu.org \
    --cc=ludovic.courtes@inria.fr \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).