From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com [74.125.82.46]) by dpdk.org (Postfix) with ESMTP id 90C975A49 for ; Fri, 22 Jul 2016 00:21:29 +0200 (CEST) Received: by mail-wm0-f46.google.com with SMTP id f65so36650130wmi.0 for ; Thu, 21 Jul 2016 15:21:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=vur/fUrLueGjObEcZ4X8JyUkqTNuadjdg85uOpBzG2U=; b=lqN4ymT5EG3MPPzRAvMgT38fIMJ9Rqu1Bnmh0BDXmiAyxdcDyIh88pHwVDTCf5BPCU gVrEXnD0MBzPlULtY9qCkITdIvc/LaxlB0nNdLLuAfQHuFFaysfOFdiUuKPj6tBJC7j/ puXsqMwwCYG8xLf0LamHzmWiLr1/N8CABKwjxmVsdcIZKviuJeVyZ14i9aIjKE8KZNAY taJyGWZ6IkM2YXlpZVGj/H7CIPRsh73QYDL3VIYErmehUfJcyRIgZLQcc8ozw8DyAVwd bJJJGwJxK3lgp9HHnMUN/zUwaoz9D15biXXbgTbdAsug4VjUp1JFatVLzsrQhSXtNmrw HwmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=vur/fUrLueGjObEcZ4X8JyUkqTNuadjdg85uOpBzG2U=; b=VTfvOjRiDvR+wgBVQic9McPrqyFzhrNGqz1xlTKjBTz8EOLjpfxTOgwRF9F0KAPtKB 5unsBdgoOgttdwUT9mtdx32UK307UISNSnsTADihK73P43jRGHEIT1yCI1tHohibY5jb 2ELy58E1olHm131WpuubV8nhbnXJWcVMCyvxP7QDldQkVhn7sD59ZG3Z1WTFfFmb8QlD xPPyZsxXTFpVfhUsfkhiUxDEZ9E+q3kYJIJOkT+n8fMFOm1BHJUH0fJHSj5b3wt/nj9R 1Rto+hwa0tK8S3DWCzVfQp4xYBvf+vp5VHPKDG8K9c5e1MslDJeuwSDmWmhf9m2yYSSw Ftsw== X-Gm-Message-State: ALyK8tLM+lKa0yFDN/A49VikKOAwW6AsixljMG1/L7xbx029/xTvAWArARYvRAbjABBUWtnX X-Received: by 10.28.1.74 with SMTP id 71mr20180046wmb.4.1469139689335; Thu, 21 Jul 2016 15:21:29 -0700 (PDT) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id m62sm7684207wmm.24.2016.07.21.15.21.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Jul 2016 15:21:28 -0700 (PDT) From: Thomas Monjalon To: Ilya Maximets Cc: Yuanhan Liu , dev@dpdk.org, Huawei Xie , Dyasly Sergey , Heetae Ahn Date: Fri, 22 Jul 2016 00:21:27 +0200 Message-ID: <4631229.NI0eBICl3e@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <20160721133558.GK28708@yliu-dev.sh.intel.com> References: <1469089275-15209-1-git-send-email-i.maximets@samsung.com> <1469107175-1216-1-git-send-email-i.maximets@samsung.com> <20160721133558.GK28708@yliu-dev.sh.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v3] vhost: fix connect hang in client mode X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jul 2016 22:21:29 -0000 2016-07-21 21:35, Yuanhan Liu: > On Thu, Jul 21, 2016 at 04:19:35PM +0300, Ilya Maximets wrote: > > If something abnormal happened to QEMU, 'connect()' can block calling > > thread (e.g. main thread of OVS) forever or for a really long time. > > This can break whole application or block the reconnection thread. > > > > Example with OVS: > > > > ovs_rcu(urcu2)|WARN|blocked 512000 ms waiting for main to quiesce > > (gdb) bt > > #0 connect () from /lib64/libpthread.so.0 > > #1 vhost_user_create_client (vsocket=0xa816e0) > > #2 rte_vhost_driver_register > > #3 netdev_dpdk_vhost_user_construct > > #4 netdev_open (name=0xa664b0 "vhost1") > > [...] > > #11 main > > > > Fix that by setting non-blocking mode for client sockets for connection. > > > > Fixes: 64ab701c3d1e ("vhost: add vhost-user client mode") > > > > Signed-off-by: Ilya Maximets > > Acked-by: Yuanhan Liu Applied, thanks