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 AAiNC8puT2C4fAAA0tVLHw (envelope-from ) for ; Mon, 15 Mar 2021 14:27:22 +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 2FlTB8puT2C7TwAAB5/wlQ (envelope-from ) for ; Mon, 15 Mar 2021 14:27:22 +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 5F6B625BB8 for ; Mon, 15 Mar 2021 15:27:21 +0100 (CET) Received: from localhost ([::1]:46110 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lLoBk-0000kc-8a for larch@yhetil.org; Mon, 15 Mar 2021 10:27:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54920) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLoBT-0000jU-6d for bug-guix@gnu.org; Mon, 15 Mar 2021 10:27:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53001) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lLoBS-0005vn-Md for bug-guix@gnu.org; Mon, 15 Mar 2021 10:27:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lLoBS-0002bj-JW; Mon, 15 Mar 2021 10:27:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#47157: =?UTF-8?Q?=E2=80=9CBad?= Read-Header-Line header: =?UTF-8?Q?#=E2=80=9D?= while substituting Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: mail@cbaines.net, bug-guix@gnu.org Resent-Date: Mon, 15 Mar 2021 14:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 47157 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 47157@debbugs.gnu.org X-Debbugs-Original-To: X-Debbugs-Original-Xcc: Christopher Baines Received: via spool by submit@debbugs.gnu.org id=B.161581841510006 (code B ref -1); Mon, 15 Mar 2021 14:27:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Mar 2021 14:26:55 +0000 Received: from localhost ([127.0.0.1]:36313 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLoBL-0002bK-5r for submit@debbugs.gnu.org; Mon, 15 Mar 2021 10:26:55 -0400 Received: from lists.gnu.org ([209.51.188.17]:47450) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lLoBJ-0002b7-0t for submit@debbugs.gnu.org; Mon, 15 Mar 2021 10:26:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54890) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLoBI-0000cE-Pn for bug-guix@gnu.org; Mon, 15 Mar 2021 10:26:52 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:23639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lLoBE-0005m1-DO for bug-guix@gnu.org; Mon, 15 Mar 2021 10:26:52 -0400 X-IronPort-AV: E=Sophos;i="5.81,249,1610406000"; d="scan'208";a="498019878" 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/DHE-RSA-AES256-GCM-SHA384; 15 Mar 2021 15:26:43 +0100 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 25 =?UTF-8?Q?Vent=C3=B4se?= an 229 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Mon, 15 Mar 2021 15:26:42 +0100 Message-ID: <87eeggh4rh.fsf@inria.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=192.134.164.83; envelope-from=ludovic.courtes@inria.fr; helo=mail2-relais-roc.national.inria.fr X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615818441; 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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ti4ECzW6ultmPWfcc+RBzs3jtXbMjI0UlJ/Keu53ZFI=; b=ogbaLtNvNk6E4b4QUIG48ooQpOqrAxFiyCe0BdyHIvEWO2hXYnFWYpxxC5hTJrMiNzoXwL KNHNtbS2ySg89mJuWczKZG9O9GCru3dh6fO+g5KgNwAAyiyNNkEbPoavpSKkFv2pDoLKLB fUADoGeQ3Zm0SP1y9GKiSUZyJScOkrVvghoRiRHCkjeCH9Izd2dT5R0+F6HupYG0hY58Ni O0rAANAkRuw17YSGaJKWE+pR738Ktv7AzSpOBe297IvzMvs1EjMAOAx83rHnZyYcDCiMyK 9mcWmnJjb41nxqWu6ORg02BTy2FU0CK9Oqj1d/QBzu2ZbV7K78/zdciFO9PIzA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615818441; a=rsa-sha256; cv=none; b=nHIpsfvCpNZbyNna9DhZ7xrsKRMETbbl8tXJ0yON+whFlknKShmqgLEhYwEkNkK4hgHhe4 IDGRvTtt7VkxXO4LG5xdGeewvmve7sBOdgORhPrEKQm/3JToBfvK3usDMvofzbI7vd/MLN /pAayv8/+TUI9q6iV8GapTfAfZRp5KfspdVKg5KJpysJBBf7TbZnfb3EQ4yhC1NX/Igyem QfqO8BGYr/68YklWRxtmIE/VmXnD+gXl/f4OTywMohqZE3tsH+ddGcS66iGd157tiNSotn K//mLuXhSBI8vS1efZcoNKxNXeFyJS+j193j0qK6T3z0q8AT9OP/a2mmdalmsg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.90 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: 5F6B625BB8 X-Spam-Score: -0.90 X-Migadu-Scanner: scn0.migadu.com X-TUID: EQ2+f0jXVMTL As reported by a few people on IRC, =E2=80=98guix substitute=E2=80=99 somet= imes fails in a way that I just experienced (from 8154beffd8c121e953a7c4cd75c3eebfcc073a9a): --8<---------------cut here---------------start------------->8--- downloading from https://ci.guix.gnu.org/nar/gzip/0bji0q5n59595xaqkqrp2gv52= lbz55xz-libpng-1.6.37 . libpng-1.6.37 275KiB 11.0MiB/s 00:00 [###= ###############] 100.0% downloading from https://ci.guix.gnu.org/nar/lzip/h3a5ygxxh4gakhnl53mq7z9b4= 3l8z05g-python-minimal. python-minimal-wrapper-3.8.2 351B 293KiB/s 00:00 [###= ###############] 100.0% downloading from https://ci.guix.gnu.org/nar/lzip/h8j09yb5d8dh3jffvpzawxsli= g9bwhdr-freetype-2.10.. freetype-2.10.4 600KiB 3.0MiB/s 00:00 [###= ###############] 100.0% building /gnu/store/2wfzazqz9g5xizi4vq4pv75nkh1m24bp-perl-5.30.2.drv... Backtrace: In guix/ui.scm: 2164:12 19 (run-guix-command _ . _) In guix/scripts/substitute.scm: 691:2 18 (guix-substitute . _) In unknown file: 17 (with-continuation-barrier #) In ice-9/boot-9.scm: 1736:10 16 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In unknown file: 15 (apply-smob/0 #) In ice-9/boot-9.scm: 1736:10 14 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) 1736:10 13 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) 1731:15 12 (with-exception-handler # _) In guix/scripts/substitute.scm: 740:17 11 (_) 434:7 10 (process-substitution _ "/gnu/store/ns00dyapjbq9037dwrxa7hc31d= vir00n-grub-minimal-2.) In ice-9/boot-9.scm: 1736:10 9 (with-exception-handler _ _ #:unwind? _ #:unwind-for-type _) In guix/scripts/substitute.scm: 443:9 8 (_) In ice-9/boot-9.scm: 1731:15 7 (with-exception-handler # _) 1669:16 6 (raise-exception _ #:continuable? _) 1667:16 5 (raise-exception _ #:continuable? _) 1669:16 4 (raise-exception _ #:continuable? _) 1764:13 3 (_ #<&compound-exception components: (#<&error> #<&irritants i= rritants: (read-header) 1669:16 2 (raise-exception _ #:continuable? _) 1667:16 1 (raise-exception _ #:continuable? _) 1669:16 0 (raise-exception _ #:continuable? _) ice-9/boot-9.scm:1669:16: In procedure raise-exception: Bad Read-Header-Line header: # --8<---------------cut here---------------end--------------->8--- This is the kind of issue that =E2=80=98with-cached-connection=E2=80=99 as = it can be seen in 9158020d7853b6e7925802e0d0a082801c680e8f avoided: --8<---------------cut here---------------start------------->8--- (define* (call-with-cached-connection uri proc #:optional (open-connection open-connection-for-uri/cached)) (let ((port (open-connection uri))) (catch #t (lambda () (proc port)) (lambda (key . args) ;; If PORT was cached and the server closed the connection in the ;; meantime, we get EPIPE. In that case, open a fresh connection a= nd ;; retry. We might also get 'bad-response or a similar exception f= rom ;; (web response) later on, once we've sent the request, or a ;; ERROR/INVALID-SESSION from GnuTLS. (if (or (and (eq? key 'system-error) (=3D EPIPE (system-error-errno `(,key ,@args)))) (and (eq? key 'gnutls-error) (eq? (first args) error/invalid-session)) (memq key '(bad-response bad-header bad-header-component))) (proc (open-connection uri #:fresh? #t)) (apply throw key args)))))) --8<---------------cut here---------------end--------------->8--- I think 7b812f7c84c43455cdd68a0e51b6ded018afcc8e and subsequent commits may have caused this regression. In particular, in 20c08a8a45d0f137ead7c05e720456b2aea44402, =E2=80=98call-with-connection-error-handling=E2=80=99 is now used, but that= one doesn=E2=80=99t catch the exceptions mentioned above, in this case =E2=80=98bad-header=E2= =80=99. Ludo=E2=80=99.