From patchwork Mon Sep 28 13:12:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11803807 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D8E7139A for ; Mon, 28 Sep 2020 13:13:44 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6CC4B2074A for ; Mon, 28 Sep 2020 13:13:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6CC4B2074A Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=xenproject.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kMsxd-0004Eh-5y; Mon, 28 Sep 2020 13:12:57 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1kMsxb-0004DB-Qt for xen-devel@lists.xenproject.org; Mon, 28 Sep 2020 13:12:55 +0000 X-Inumbo-ID: 71dbab40-fd75-45a1-9145-7c6ffc6a0c87 Received: from chiark.greenend.org.uk (unknown [2001:ba8:1e3::]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 71dbab40-fd75-45a1-9145-7c6ffc6a0c87; Mon, 28 Sep 2020 13:12:46 +0000 (UTC) Received: from [172.18.45.5] (helo=zealot.relativity.greenend.org.uk) by chiark.greenend.org.uk (Debian Exim 4.84_2 #1) with esmtp (return-path ijackson@chiark.greenend.org.uk) id 1kMsxQ-0007vv-QS; Mon, 28 Sep 2020 14:12:44 +0100 From: Ian Jackson To: xen-devel@lists.xenproject.org Cc: Ian Jackson Subject: [OSSTEST PATCH 2/5] TCP fix: Do not wait for queuedaemon to speak Date: Mon, 28 Sep 2020 14:12:38 +0100 Message-Id: <20200928131241.30278-3-iwj@xenproject.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200928131241.30278-1-iwj@xenproject.org> References: <20200928131241.30278-1-iwj@xenproject.org> MIME-Version: 1.0 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" From: Ian Jackson This depends on the preceding daemonlib patch and an ms-queuedaemon restart. Signed-off-by: Ian Jackson --- Osstest/Executive.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm index 61a99bc3..80e70070 100644 --- a/Osstest/Executive.pm +++ b/Osstest/Executive.pm @@ -643,7 +643,16 @@ sub tcpconnect_queuedaemon () { my $qserv= tcpconnect($c{QueueDaemonHost}, $c{QueueDaemonPort}); $qserv->autoflush(1); + # TCP connections can get into a weird state where the client + # thinks the connection is open but the server has no record + # of it. To avoid this, have the client speak without waiting + # for the server. + # + # See A TCP "stuck" connection mystery" + # https://www.evanjones.ca/tcp-stuck-connection-mystery.html + print $qserv "noop\n"; $_= <$qserv>; defined && m/^OK ms-queuedaemon\s/ or die "$_?"; + $_= <$qserv>; defined && m/^OK noop\s/ or die "$_?"; return $qserv; }