From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id CABlKcOSzGBXVQEAgWs5BA (envelope-from ) for ; Fri, 18 Jun 2021 14:34:11 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id UPr+JMOSzGBCegAA1q6Kng (envelope-from ) for ; Fri, 18 Jun 2021 12:34:11 +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 22EBC1784C for ; Fri, 18 Jun 2021 14:34:11 +0200 (CEST) Received: from localhost ([::1]:57172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luDhJ-00079r-NR for larch@yhetil.org; Fri, 18 Jun 2021 08:34:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56282) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luDhC-00079Q-EQ for bug-guix@gnu.org; Fri, 18 Jun 2021 08:34:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:44471) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1luDhC-0002ve-7K for bug-guix@gnu.org; Fri, 18 Jun 2021 08:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1luDhC-00037L-3i for bug-guix@gnu.org; Fri, 18 Jun 2021 08:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48468: substitute server connection timeout Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 18 Jun 2021 12:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48468 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Mathieu Othacehe Received: via spool by 48468-submit@debbugs.gnu.org id=B48468.162401961111909 (code B ref 48468); Fri, 18 Jun 2021 12:34:02 +0000 Received: (at 48468) by debbugs.gnu.org; 18 Jun 2021 12:33:31 +0000 Received: from localhost ([127.0.0.1]:56007 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luDgh-000360-EP for submit@debbugs.gnu.org; Fri, 18 Jun 2021 08:33:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:58296) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1luDgf-00035o-Ah for 48468@debbugs.gnu.org; Fri, 18 Jun 2021 08:33:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:45758) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1luDga-0002no-4Q for 48468@debbugs.gnu.org; Fri, 18 Jun 2021 08:33:24 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=54544 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1luDgZ-0004v0-0B; Fri, 18 Jun 2021 08:33:23 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87lf8e4l42.fsf@gnu.org> Date: Fri, 18 Jun 2021 14:33:21 +0200 In-Reply-To: <87lf8e4l42.fsf@gnu.org> (Mathieu Othacehe's message of "Sun, 16 May 2021 19:57:49 +0200") Message-ID: <87im2bfj3i.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) 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: , Cc: 48468@debbugs.gnu.org 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=1624019651; 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: 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; bh=GZOgBK4HrSDXJoVBeKE59NAjIsEosB/N5CdxJ0aJNrU=; b=db9guAUGwY/ChYd2Vw8Nxwe4+ekZOxgsm9iFRjqk9cxtup2G0vGqrsVUDpLUi+NT7yemSy cBs1AodyYDJ96QxHKsZe1x1f6npDj0DXcbTYoVFWXkepa3+4Hctfn/Grk74b3w11hb/c5W gvSD+ztHou1KlkKijyuIjUEskZXFuVJyvXLFiYmba9O41ESgrp1Bl41NLbgejtr8aYC7yM 17FBA/UhiJq4NbpMQJx8VhcYiD+MvaHcEgRab861udL8QCHVKMUbZBvf0E+8w3Bqy0Vs0b 8UgNPsb0y71A08CkxZLyH+qB3XAJssjxVRtNXTdAKcJF02J/Hjmit9uDGDcS/g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1624019651; a=rsa-sha256; cv=none; b=Pl68J/Dz2a8IB4/p0u2PBwsQWe4idnwf8n7bucz3xu15nAPIqG4Ja884pruRI1d17OC9h1 YoIoyZcBIoUsE3jlPp/359Sd9DaNFp4Ogv3lUx/e54j6zm9/mn19fCBsQZLEKvt7FsbZ8I wm/pvfBeWswIBPprUUtnKXc5rOGzIszy+OLSKUfiXGArWZCSzmkbdCMeV2ZdmJ78BBnI4i 1Ptqfvi+9A1JaGPlN1u3SwtLnbgbjRPXUXczphmzSQkEoKHyEEvQQ30y+lqiymQIZZJwP4 hIHeoYjUph9BS/0nW7QXIgaQhJKxQq7clu5yWe0LxYjFeSzegsVGaNq7v2hwoQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: -2.93 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; 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: 22EBC1784C X-Spam-Score: -2.93 X-Migadu-Scanner: scn1.migadu.com X-TUID: d3rEx74x7SWw Hi, Mathieu Othacehe skribis: > Investigating it, I found that the connection is closed and opened > multiple times in the call-with-cached-connection procedure of the (guix > script substitute) module. > > It looks like its because a 'bad-headers exception is raised when trying > to parse an eof object: > > ;;; (error bad-header (read-header-line #)) > > > I'm not sure where this eof comes from. There is this comment in the > http-multiple-get procedure in (guix http-client): > > ;; Swallow networking errors that could occur due to connection reuse > ;; and the like; they will be handled down the road when trying to > ;; read responses. > (false-if-networking-error > (begin > (for-each (cut write-request <> buffer) batch) > (put-bytevector p (get)) > (force-output p)))) > > which would suggest that connection reuse could cause networking errors? Trying to see exactly which bit is at fault here. First, =E2=80=98http-multiple-get=E2=80=99 seems to be working as expected when pa= ssed a fresh connection: --8<---------------cut here---------------start------------->8--- scheme@(guix http-client)> (http-multiple-get (string->uri "https://ci.guix= .gnu.org") (lambda (request response port result) (get-bytevector-n port (response-content-length response)) (cons #t result)) '() (make-list 5000 (build-request (build-uri 'https #:host "ci.guix.gnu.org" #:path "/d7gpr41qpsifri54vp2lzjs99zkylscq.narinfo")))) connecting (5000 requests left)...connecting (4400 requests left)...connect= ing (3800 requests left)...connecting (3200 requests left)...connecting (26= 00 requests left)...connecting (2000 requests left)...connecting (1400 requ= ests left)...connecting (800 requests left)...connecting (200 requests left= )...$143 =3D (#t #t =E2=80=A6) scheme@(guix http-client)> (length $143) $144 =3D 5000 --8<---------------cut here---------------end--------------->8--- But maybe I=E2=80=99m not looking at the right thing. Do you have evidence or a reproducer? Thanks, Ludo=E2=80=99.