From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id QIFkOfHO4WbrzQAAe85BDQ:P1 (envelope-from ) for ; Wed, 11 Sep 2024 17:10:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id QIFkOfHO4WbrzQAAe85BDQ (envelope-from ) for ; Wed, 11 Sep 2024 19:10:10 +0200 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=jKSPAm8G; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=pTZZb4yn; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1726074609; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=LiN+LriIUgF+Q4ysF+PEnMVq3XcunoHdtFv+VO39Lpg=; b=mzRETJdgobf7FSGGB6Dk7hhgxpmHgexY+39o6vZwycQsQUBQzBjZYNyElnUnutzK2wcukq c9eNY3tOWVJay3IUzBN8TX539Dt9L20+S5vWh7Ir5gIbGB+g7Du9KYxKglNFuMl7PSO49w dizWi33gEExP3MDdoLZ9e7wJXt/lT4l4PYoFtcDBACI2/poHCXR0a5zd3DzwLnyEmkKyAU hkDupkhPqfPfWwfCQxCEfk1Zu3rbPdHhUuPjQeUIuG16L5hV6y/Et2Mq07Xv/TZE5jGvnq eGholJdpI1bDaOxp6A7mehbKCz5Lld/dH3EF6I+BobCDbLOSe8wULo47NRjWSg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=jKSPAm8G; dkim=fail ("headers rsa verify failed") header.d=inria.fr header.s=dc header.b=pTZZb4yn; 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=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=inria.fr (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1726074609; a=rsa-sha256; cv=none; b=BsvVZfzdSucXw2zJaZ+MfB2DNuB9+LWglsZh8qWk7b0rOUqEzHH9Nk2rK1YdqJn6uOfe4e Q5/YchZKVprqptD7iFth8b/gVK+ePi/BxX6FLO+7fhNr15fJisdg/bjv+JFsnilyFEqGjO 5661E/RDP/2q3Bem7zxMzZnVaJfIZQtykyEPd18L/hudwD7DYYsFd96g5VqA8T2M19LXmt JyzAfCzjRaiIFxAJB0vqyjl8y9TD/8FSxBrRmXtJ6TPJtTTLsZE5c1N4Fmg082VST05dL+ dtqkPnsSKKeNfUB2rshFsvH46+tI0Ow8XrNjmtm8roETWGVbqVA9vlAJ+x7tTA== 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 792CF71557 for ; Wed, 11 Sep 2024 19:10:09 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1soQqs-0001n0-LO; Wed, 11 Sep 2024 13:09:59 -0400 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 ) id 1soQqq-0001fF-GC for bug-guix@gnu.org; Wed, 11 Sep 2024 13:09:56 -0400 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 ) id 1soQqq-0006lu-6V for bug-guix@gnu.org; Wed, 11 Sep 2024 13:09:56 -0400 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=LiN+LriIUgF+Q4ysF+PEnMVq3XcunoHdtFv+VO39Lpg=; b=jKSPAm8GDwtqQ4VYViUOSjm+c0hX9Gb+Hz2NRkHsusWFLR38crcv0pKr8YySdcl8cIo5XX4EVxdNqP8pGRO9nkP2pnBhTVE6LQ1qUJR3mY1KmHheFoT1n9gcBRhSoH/Y+LBdCb4irH1i29et7jgG8oE5Sc+XqbJWZAnfVXWLbHjyPa1XtUkrYKSe9J3SpZMHaDwBQAJRfIgrSsJeq1crgGclwqc5JZvmuBTquk9rkNZvqOTscr6DngkhLkumRHiwPMivYfNulX0pmS3IRInZ2hby/Zc8AeQA+Y4OylySFcJasWSR5u+Fm6f7Y8FVRL5RXCjA1+vA7Cegfhm0i+c73A==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1soQqv-0005cS-SF for bug-guix@gnu.org; Wed, 11 Sep 2024 13:10:01 -0400 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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 11 Sep 2024 17:10:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73181 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 73181@debbugs.gnu.org Received: via spool by 73181-submit@debbugs.gnu.org id=B73181.172607455321515 (code B ref 73181); Wed, 11 Sep 2024 17:10:01 +0000 Received: (at 73181) by debbugs.gnu.org; 11 Sep 2024 17:09:13 +0000 Received: from localhost ([127.0.0.1]:39522 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soQq9-0005av-3e for submit@debbugs.gnu.org; Wed, 11 Sep 2024 13:09:13 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:51273) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1soQq4-0005ac-BI for 73181@debbugs.gnu.org; Wed, 11 Sep 2024 13:09:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=inria.fr; s=dc; h=from:to:subject:in-reply-to:references:date:message-id: mime-version:content-transfer-encoding; bh=LiN+LriIUgF+Q4ysF+PEnMVq3XcunoHdtFv+VO39Lpg=; b=pTZZb4ynP7Tt8J7xZgySrSEyHjG9RK82Er0m+siolgItGG7+cGN3CYC9 +2KgmU2AVwr+n90iByzW9yex7T1GTM9zOeMP+tiIlj8pFBlpsm0hqD3SF dLCtxBvq/+B90FR5MjIWGProBDS8THImIAtXshA6Z6Iyri3NWfM8KMLHJ 8=; X-IronPort-AV: E=Sophos;i="6.10,220,1719871200"; d="scan'208";a="182665090" Received: from 91-160-117-201.subs.proxad.net (HELO ribbon) ([91.160.117.201]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Sep 2024 19:08:55 +0200 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87o74u5hcy.fsf@inria.fr> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Wed, 11 Sep 2024 17:40:13 +0200") References: <87o74u5hcy.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Wed, 11 Sep 2024 19:08:55 +0200 Message-ID: <87a5ge5d94.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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-Spam-Score: -5.72 X-Migadu-Queue-Id: 792CF71557 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.72 X-TUID: zpWx1blrP1xu Ludovic Court=C3=A8s skribis: > Inside the childhurd, we get: > > root@childhurd ~# tail -1 /var/log/guix-daemon.log=20 > 2024-09-09 21:09:03 unexpected build daemon error: stoi > > Last time we got that error was in commit > 21deb89e287b5821975544118bf137562a91d4e1: guix-daemon was running with > incorrect locale data, and thus =E2=80=98std::stoi=E2=80=99 would throw (= =E2=80=98std::stoi=E2=80=99 in > guix-daemon is used for the communication with the =E2=80=98guix authenti= cate=E2=80=99 > process, see =E2=80=98readAuthenticateReply=E2=80=99). I wanted to =E2=80=98rpctrace=E2=80=99 to see what =E2=80=98guix authentica= te=E2=80=99 and =E2=80=98guix-daemon=E2=80=99 are telling each other. The problem is that =E2=80=98rpctrace=E2=80=99 is = kinda broken, or at least it wrecks havoc when trying to follow forks or something. But I found a trick that allowed me to trace just =E2=80=98guix authenticat= e=E2=80=99: --8<---------------cut here---------------start------------->8--- root@childhurd ~# cat intercept-guix.sh=20 #!/bin/sh /usr/bin/env > /tmp/env.log echo >> /tmp/env.log echo "$@" >> /tmp/env.log exec rpctrace -o /tmp/rpctrace.log -s 200 /gnu/store/cg64w7mv1v2r188rzcgksd= va9cvj8vir-guix-1.4.0-24.9a2ddcc/bin/guix "$@" root@childhurd ~# LC_ALL=3Dfr_FR.utf8 GUIX=3D$PWD/intercept-guix.sh /gnu/s= tore/cg64w7mv1v2r188rzcgksdva9cvj8vir-guix-1.4.0-24.9a2ddcc/bin/guix-daemon= --build-users-group guixbuild --max-silent-time 3600 --timeout 86400 --log= -compression gzip --discover=3Dno --disable-chroot --disable-deduplication --8<---------------cut here---------------end--------------->8--- (Here =E2=80=9CLC_ALL=3Dfr_FR.utf8=E2=80=9D allows me to reproduce the stoi= bug.) We get this: --8<---------------cut here---------------start------------->8--- root@childhurd ~# tail /tmp/rpctrace.log=20 5<--35(pid166)->dir_lookup ("gnu/store/9ghq6s4mq5sff9cwqrmn26ivycn3p8ql-g= uile-3.0.9/lib/guile/3.0/ccache/system/foreign-library.go" 4194305 0) =3D 0= 1 "" 67<--70(pid166) 67<--70(pid166)->io_seek_request (0 2) =3D 0 98141 67<--70(pid166)->io_map_request () =3D 0 69<--66(pid166) (null) task30(pid166)-> 2089 (0 98141 0 1 69<--66(pid166) 0 1 1 7 1) =3D 0 6145= 2288 task30(pid166)-> 3206 (pn{ 28}) =3D 0=20 task30(pid166)-> 3206 (pn{ 27}) =3D 0=20 task30(pid166)-> 2024 (61517824 18824 0 3) =3D 0=20 14<--31(pid166)->io_write_request ("GC Warning: Repeated allocation of ve= ry large block (appr. size 112 KiB):\n\tMay lead to memory leak and poor pe= rformance\n" -1) =3D 0 120 task30(pid166)-> 2012 (1 22) =3D 0 {0 25 195772416 15151104 0 0 0 0 1726072= 790 570000 0 0 0 0 0 0 0 0 1726072790 0 570000000 0} task30(pid166)-> 2012 (3 12) =3D 0 {0 30000 0 20000 0 0 30000000 0 0 0 2000= 0000 0} --8<---------------cut here---------------end--------------->8--- That warning comes from libgc and there=E2=80=99s no such warning when LC_A= LL is left unset, which is why it works in that case. The warning goes to stderr, but that=E2=80=99s what guix-daemon ends up rea= ding, hence the =E2=80=98stoi=E2=80=99 error. One can reproduce that by printing= something on (current-error-port) from =E2=80=98guix authenticate=E2=80=99 and running, = say, =E2=80=9Cmake check TESTS=3Dtests/store.scm=E2=80=9D: a bunch of tests fail. It=E2=80=99s not clear to me why libgc keeps printing that warning on i586-= gnu (I think it=E2=80=99s fine on i686-linux so there might be a portability is= sue), and it=E2=80=99s not clear either why changing the locale triggers the warn= ing (it might have to do with the so-called GC =E2=80=9Cblack lists=E2=80=9D, s= ince loading a locale effectively changes the address space layout somewhat). I see several possible things to do: 1. Disable GC warnings altogether in Guix by setting =E2=80=98GC_warn_pro= c=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 messages ar= e so frequent on i586-gnu and Do Something About It=E2=84=A2. Thoughts? Ludo=E2=80=99.