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 livtG+e1smBfaQEAgWs5BA (envelope-from ) for ; Sat, 29 May 2021 23:45: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 wC/RFue1smBwJQAA1q6Kng (envelope-from ) for ; Sat, 29 May 2021 21:45: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 A518925318 for ; Sat, 29 May 2021 23:45:10 +0200 (CEST) Received: from localhost ([::1]:45280 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln6lZ-00071V-La for larch@yhetil.org; Sat, 29 May 2021 17:45:09 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:34032) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln6lS-00071B-JV for bug-guix@gnu.org; Sat, 29 May 2021 17:45:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46309) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ln6lS-0001a1-BU for bug-guix@gnu.org; Sat, 29 May 2021 17:45:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ln6lS-0004LU-A4 for bug-guix@gnu.org; Sat, 29 May 2021 17:45: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: Sat, 29 May 2021 21:45: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: Christopher Baines Received: via spool by 48468-submit@debbugs.gnu.org id=B48468.162232468316650 (code B ref 48468); Sat, 29 May 2021 21:45:02 +0000 Received: (at 48468) by debbugs.gnu.org; 29 May 2021 21:44:43 +0000 Received: from localhost ([127.0.0.1]:57852 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln6l8-0004KU-TX for submit@debbugs.gnu.org; Sat, 29 May 2021 17:44:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:40360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ln6l8-0004KI-BF for 48468@debbugs.gnu.org; Sat, 29 May 2021 17:44:42 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55892) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ln6l3-0001I6-1J; Sat, 29 May 2021 17:44:37 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=41666 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ln6l2-0003Ey-Nx; Sat, 29 May 2021 17:44:36 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <87lf8e4l42.fsf@gnu.org> <87eee6cz75.fsf@cbaines.net> Date: Sat, 29 May 2021 23:44:35 +0200 In-Reply-To: <87eee6cz75.fsf@cbaines.net> (Christopher Baines's message of "Sun, 16 May 2021 19:26:22 +0100") Message-ID: <87v97143lo.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: Mathieu Othacehe , 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=1622324710; 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=Tdpr2tuX8y431hBRYUuq/0eIq+JJ0DKRS3UqrlsVWHk=; b=mPVHWRLxrTfYLO8nhCVrif78XmUdguGWPkXFt1RSPGj2Qy1gf0qUGUmjS9lJavse+/7YBj 68iFYg+kFvTColfiiCDI9mj8yQb/1Wh/RoWSfOBI7cogtFBanAX1DW7amRoDwEHn2kFD6T kyS0fLqOSzpVA+vElU8e+Gq+0arpdUnTh1A09BdjSAiDzMiKkEExGDKoX1LVlDuTeJ7MEO ezrLiKPgozQrbC9e6OlxYbdfSJGy22Cq1tkP79+aCknY/p4+HW2syvyGlVhaKk8xnNc/UA iAjr48fwDxW/LelWgn7kJl0X39wNBOshOBMOo1yp+GU5U+f7ghIEVyju9Qcc4A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1622324710; a=rsa-sha256; cv=none; b=Yy/wsDDLOjt0jDDT6syUsyXXfI0/HSXxv64ghQgvHCmTVUDrfTu8scuzP/N3SCPapbb4Mo HHXklc8vT86H6GuNcPFThG7sEfmDiF7LJ8zvSEUHyP7PUlC47fy9DSEJ129fVZUQeF6IVX WTRzC8eboAjKf7hlCQPkgOeMic4v7ni6G81Y585j/IS7DnDSN7e1f1kxV6UW8W/VspL5if L5gUNy6goodTof3MWDED3e3T1RFx53Nym37OQ5lk1/LoxZFfGkNf15S0ekHkfwN2jEnDzd 1v+cmw2OccJ1ef9Z/nE++YfjS03miMweeqQlVjjODlAKvCWL0DaCt1BSmR8zCg== 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: A518925318 X-Spam-Score: -2.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: dgUAfdY5cxdR Hi, Christopher Baines skribis: > Mathieu Othacehe writes: [...] >> Stracing this publish server shows that connection reuse seems to be >> broken: >> >> --8<---------------cut here---------------start------------->8--- >> accept4(9, {sa_family=3DAF_INET, sin_port=3Dhtons(41742), sin_addr=3Dine= t_addr("141.80.167.185")}, [112->16], 0) =3D 21 >> accept4(9, {sa_family=3DAF_INET, sin_port=3Dhtons(41744), sin_addr=3Dine= t_addr("141.80.167.185")}, [112->16], 0) =3D 21 >> accept4(9, {sa_family=3DAF_INET, sin_port=3Dhtons(41746), sin_addr=3Dine= t_addr("141.80.167.185")}, [112->16], 0) =3D 25 >> accept4(9, {sa_family=3DAF_INET, sin_port=3Dhtons(41748), sin_addr=3Dine= t_addr("141.80.167.185")}, [112->16], 0) =3D 24 >> accept4(9, {sa_family=3DAF_INET, sin_port=3Dhtons(41750), sin_addr=3Dine= t_addr("141.80.167.185")}, [112->16], 0) =3D 21 Ouch. >> 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: >> >> --8<---------------cut here---------------start------------->8--- >> ;;; (error bad-header (read-header-line #)) >> --8<---------------cut here---------------end--------------->8--- >> >> I'm not sure where this eof comes from. There is this comment in the >> http-multiple-get procedure in (guix http-client): >> >> --8<---------------cut here---------------start------------->8--- >> ;; 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)))) >> --8<---------------cut here---------------end--------------->8--- >> >> which would suggest that connection reuse could cause networking errors? [...] > That's on the server side, the actual problem is probably on the client > side, as I guess there are possibly places where closed connections > aren't handled properly. D=E2=80=99oh. So we should be able to use it by talking to a bare =E2=80= =98guix publish=E2=80=99? I tried and failed to reproduce it, but that=E2=80=99s p= robably not deterministic. > This reminds me I sent some patches relating to closing connections, > this could well be related [1]. > > 1: https://issues.guix.gnu.org/47174 This one will properly close connections when the servers asks for it, but would that make a difference? Thanks, Ludo=E2=80=99.