From patchwork Fri Jan 10 13:28:54 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Jackson X-Patchwork-Id: 11327387 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 2138C17EE for ; Fri, 10 Jan 2020 13:30:09 +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 F21A62077C for ; Fri, 10 Jan 2020 13:30:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=citrix.com header.i=@citrix.com header.b="Bzc3ZpIv" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F21A62077C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=eu.citrix.com Authentication-Results: mail.kernel.org; spf=none 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.89) (envelope-from ) id 1ipuLf-0001yM-2V; Fri, 10 Jan 2020 13:29:11 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1ipuLd-0001yH-Jd for xen-devel@lists.xenproject.org; Fri, 10 Jan 2020 13:29:09 +0000 X-Inumbo-ID: 2de1f9fc-33ad-11ea-bf0f-12813bfff9fa Received: from esa2.hc3370-68.iphmx.com (unknown [216.71.145.153]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 2de1f9fc-33ad-11ea-bf0f-12813bfff9fa; Fri, 10 Jan 2020 13:29:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1578662949; h=from:to:cc:subject:date:message-id:mime-version; bh=6G7vPLriAedPyky35mv96xuKS66vJfO52LVZrQ4s+M4=; b=Bzc3ZpIvJztUYP4sDP3M3030vPkMua339gA8NhvWX5kQ1/BlgOfFSxB8 SSFNC25WQpzf99j0ONBFA5x1AenuYRI/ubhr3OnCCjCkr9lgIQwbsnEKU tZB8weMqzAZRr+KZhkTAZDOfeIVt/MfrWDdoezlmDBhNlfY5yYpC6YmXB s=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none; spf=None smtp.pra=ian.jackson@eu.citrix.com; spf=Pass smtp.mailfrom=Ian.Jackson@citrix.com; spf=None smtp.helo=postmaster@mail.citrix.com Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of ian.jackson@eu.citrix.com) identity=pra; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="ian.jackson@eu.citrix.com"; x-conformance=sidf_compatible Received-SPF: Pass (esa2.hc3370-68.iphmx.com: domain of Ian.Jackson@citrix.com designates 162.221.158.21 as permitted sender) identity=mailfrom; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="Ian.Jackson@citrix.com"; x-conformance=sidf_compatible; x-record-type="v=spf1"; x-record-text="v=spf1 ip4:209.167.231.154 ip4:178.63.86.133 ip4:195.66.111.40/30 ip4:85.115.9.32/28 ip4:199.102.83.4 ip4:192.28.146.160 ip4:192.28.146.107 ip4:216.52.6.88 ip4:216.52.6.188 ip4:162.221.158.21 ip4:162.221.156.83 ip4:168.245.78.127 ~all" Received-SPF: None (esa2.hc3370-68.iphmx.com: no sender authenticity information available from domain of postmaster@mail.citrix.com) identity=helo; client-ip=162.221.158.21; receiver=esa2.hc3370-68.iphmx.com; envelope-from="Ian.Jackson@citrix.com"; x-sender="postmaster@mail.citrix.com"; x-conformance=sidf_compatible IronPort-SDR: rM29Q5+EKNxx02t9qlKNzFLwR9xPqzoDRHqZj4bWYfpdQBPiwrGMWcbmVxametdqpKVdRsa91i UaMABYv8w/W2byq5uxCvTcy7rqXHkjjnGleGDhGxyLmIHYoMCO/RYI15SF6EHXBZpfpUUjGwke RIzm0vzDN//gLiKGXC5w4KW8/NLma7tngWaApfZoM9fxX14zeUyiAP4cmw9Q2UkdIJS1E//SUS bltY8J8l57lYMC8UTvzIA74s+nIsGG+GOQZVqd7FMQi4xwJOnivvYBQIll0jihfrZCjntTY1NG A9o= X-SBRS: 2.7 X-MesageID: 10756440 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.158.21 X-Policy: $RELAYED X-IronPort-AV: E=Sophos;i="5.69,417,1571716800"; d="scan'208";a="10756440" From: Ian Jackson To: Date: Fri, 10 Jan 2020 13:28:54 +0000 Message-ID: <20200110132902.29295-1-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH 0/8] libxl: event: Fix hang for some applications X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Anthony PERARD , Ian Jackson , George Dunlap , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" The meat here, including a description of the bug, is in: libxl: event: Fix hang when mixing blocking and eventy calls I have compiled this but not tested it. We do not have a good test suite for this event stuff. (And races etc are hard to test.) George, can you check to see whether it fixes the issue you saw ? If so then I suggest we try to convince ourselves of its correctness via a second round of code review. I will certainly want to read it all again after the weekend, since then I will hopefully have forgotten enough about this to make that a worthwhile exercise. Ian Jackson (8): libxl: event: Rename poller.fds_changed to .fds_deregistered libxl: event: Rename ctx.pollers_fd_changed to .pollers_active libxl: event: Introduce CTX_UNLOCK_EGC_FREE libxl: event: Fix hang when mixing blocking and eventy calls libxl: event: poller pipe optimisation libxl: event: Break out baton_wake libxl: event: Fix possible hang with libxl_osevent_beforepoll libxl: event: Move poller pipe emptying to the end of afterpoll tools/libxl/libxl.c | 4 +- tools/libxl/libxl_event.c | 126 ++++++++++++++++++++++++++++++------------- tools/libxl/libxl_fork.c | 6 +-- tools/libxl/libxl_internal.h | 42 +++++++++++---- 4 files changed, 127 insertions(+), 51 deletions(-)