From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8OanMF525F8cSAAA0tVLHw (envelope-from ) for ; Thu, 24 Dec 2020 11:07:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id sAqgLF525F8eMgAAB5/wlQ (envelope-from ) for ; Thu, 24 Dec 2020 11:07:10 +0000 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 33869940276 for ; Thu, 24 Dec 2020 11:07:10 +0000 (UTC) Received: from localhost ([::1]:47910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ksOSa-0006Jl-VM for larch@yhetil.org; Thu, 24 Dec 2020 06:07:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:57374) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ksOSU-0006Jc-TZ for guix-patches@gnu.org; Thu, 24 Dec 2020 06:07:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:43288) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ksOSU-0008Em-M7 for guix-patches@gnu.org; Thu, 24 Dec 2020 06:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ksOSU-0000Ov-GP for guix-patches@gnu.org; Thu, 24 Dec 2020 06:07:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45323] [PATCH] substitute: Reuse connections for '--query'. Resent-From: Christopher Baines Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 24 Dec 2020 11:07:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45323 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 45323-submit@debbugs.gnu.org id=B45323.16088080101523 (code B ref 45323); Thu, 24 Dec 2020 11:07:02 +0000 Received: (at 45323) by debbugs.gnu.org; 24 Dec 2020 11:06:50 +0000 Received: from localhost ([127.0.0.1]:54834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ksOSI-0000OU-0a for submit@debbugs.gnu.org; Thu, 24 Dec 2020 06:06:50 -0500 Received: from mira.cbaines.net ([212.71.252.8]:52674) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ksOSD-0000OJ-AU for 45323@debbugs.gnu.org; Thu, 24 Dec 2020 06:06:48 -0500 Received: from localhost (188.29.98.108.threembb.co.uk [188.29.98.108]) by mira.cbaines.net (Postfix) with ESMTPSA id 5618127BC05; Thu, 24 Dec 2020 11:06:44 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 706c6008; Thu, 24 Dec 2020 11:06:42 +0000 (UTC) References: <20201219144952.2725-1-ludo@gnu.org> <87o8ikwoih.fsf@gnu.org> User-agent: mu4e 1.4.13; emacs 27.1 From: Christopher Baines In-reply-to: <87o8ikwoih.fsf@gnu.org> Date: Thu, 24 Dec 2020 11:06:39 +0000 Message-ID: <871rffbgzk.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45323@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 33869940276 X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: pzb/cGtUj+gL --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludovic Court=C3=A8s writes: > Ludovic Court=C3=A8s skribis: > >> This significantly speeds up things like substituting the closure of a >> .drv. This is a followup to 5ff521452b9ec2aae9ed8e4bb7bdc250a581f203. >> >> * guix/scripts/substitute.scm (http-multiple-get): Add #:open-connection >> and #:keep-alive? and honor them. >> (open-connection-for-uri/maybe): Use 'open-connection-for-uri/cached' >> instead of 'guix:open-connection-for-uri'. Call 'http-multiple-get' >> within 'call-with-cached-connection'. >> (open-connection-for-uri/cached): Add #:timeout and #:verify-certificate? >> and honor them. >> (call-with-cached-connection): Add 'open-connection' parameter and >> honor it. >> --- >> guix/scripts/substitute.scm | 97 ++++++++++++++++++++++--------------- >> 1 file changed, 59 insertions(+), 38 deletions(-) > > Pushed as be5a75ebb5988b87b2392e2113f6590f353dd6cd! > > You can check the effect by running =E2=80=98guix build XYZ.drv=E2=80=99,= where XYZ.drv > is not available locally yet. Hey, I did do some testing of this, and didn't spot any issues, but I think it might be causing some issues when things go wrong. The Guix Build Coordinator uses code from this script, and I'm sometimes seeing exceptions like [1] when running with these changes. This is when calling lookup-narinfos. 1: #<&compound-exception components: (#<&error> #<&irritants irritants: (# write_to_session_record_port)> #<&exception-with-kind-and-args kin= d: gnutls-error args: (# write_to_session_record_port)>)>, When this happens, things seem to get stuck and retrying calling lookup-narinfos leads to the same exception. I'm guessing this might be happening because the broken connection is being cached and reused. Any ideas? Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKlBAEBCgCPFiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl/kdj9fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcRHG1haWxAY2Jh aW5lcy5uZXQACgkQXiijOwuE9XfkoxAArD6tfSwRpQ3GBdRNImgsseI1/kfjKZPb qaJr7BHyrkS/uqbbx3nwp5mN5NfvyI13Jqx/mHy1mblm79n22d61p7YFXP+eLxEZ utNiwdOLh8/xvNfo+YPPnap69IksGxQBm03e8XOi7tqyhMeWrkxuxwHLHBnDitXt JTZdk88xOsaMHT0QjBExMh7/JSq3wgrEENaP+BGuiBjDI+Fg4fmRKGRO2HKKV1H2 Y+Cb5ElSoHgyx2M1yEpWLlXTdo/3NAoPJi8/Iv2MtT2Rqi81M0ZmB6dN9D3C0BoT rSHav6RnIfXOBBNoKepf5fyFu3aTWfTtUJy3pL2WB08pOBv9hLWcALajZWYGazIZ XmoRbvxr73sBZFpl7JovyXVovAeX09memFz5Loxb++wSZfcoWvonGStx734drkNN C4Qd9P4cApxTzj1pyU03eLXqdvBHi7Wx3/YyZv1rad4NLeZwIOYYc1UVgcQfQ11b LP20LqDD3O+UkTgf50Q7Fi+fw+kL1U8Ifp4H6D9PRW9IK1mU14gtbLpbDOv+FPK2 M/fJ6DtN4y7LJWBVjAwbaAjCOKRBfR5KxnuxrKoFEOFnWickKxByCB8RxoouPi11 nJTbaoqeamrWG5x3IKvGKCb1nGjaGfajRJVfoCi1ExYIms+4AIbgGvLGVaIgNlSX coR0FNCOt7I= =D5uU -----END PGP SIGNATURE----- --=-=-=--