From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id A58073989 for ; Thu, 21 Jul 2016 15:43:27 +0200 (CEST) Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OAO00BOI3GEW9B0@mailout1.w1.samsung.com> for dev@dpdk.org; Thu, 21 Jul 2016 14:43:26 +0100 (BST) X-AuditID: cbfec7f5-f792a6d000001302-ef-5790d17e33ea Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id F9.36.04866.E71D0975; Thu, 21 Jul 2016 14:43:26 +0100 (BST) Received: from [106.109.129.180] by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OAO00MER3GDLF50@eusync4.samsung.com>; Thu, 21 Jul 2016 14:43:26 +0100 (BST) To: Yuanhan Liu 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> Cc: dev@dpdk.org, Huawei Xie , Dyasly Sergey , Heetae Ahn , Thomas Monjalon From: Ilya Maximets Message-id: <5790D17D.8080402@samsung.com> Date: Thu, 21 Jul 2016 16:43:25 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-version: 1.0 In-reply-to: <20160721133558.GK28708@yliu-dev.sh.intel.com> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrNLMWRmVeSWpSXmKPExsVy+t/xa7p1FyeEG5zbz2/x7tN2Jotpn2+z W7TPPMtkcaX9J7vF5NlSFl82TWezuD7hAqsDu8fF/juMHr8WLGX1WLznJZPHvJOBHn1bVjEG sEZx2aSk5mSWpRbp2yVwZbxZuYWxYAFfRfO8rcwNjBe4uxg5OSQETCSOXGhihrDFJC7cW8/W xcjFISSwlFHiwZP/LBDOC0aJTXNXgVUJC9hJrJ+zgB3EFhHQlXg6Zx0rRNFmRolfF7aBOcwC GxklFkw9zQZSxSagI3Fq9RFGEJtXQEtiybkXYHEWAVWJq79XgMVFBSIkZm3/wQRRIyjxY/I9 FhCbU8Ba4l/jbqB6DqChehL3L2qBhJkF5CU2r3nLPIFRYBaSjlkIVbOQVC1gZF7FKJpamlxQ nJSea6RXnJhbXJqXrpecn7uJERLkX3cwLj1mdYhRgINRiYd3x+r+cCHWxLLiytxDjBIczEoi vKYXJoQL8aYkVlalFuXHF5XmpBYfYpTmYFES5525632IkEB6YklqdmpqQWoRTJaJg1OqgXFj osnTQgGu3WzmPufvtkru+qOQxlRTM+1/AP/DdcxnTp/6vDVThLHR4dvt0PcG6lP5pznkz167 W4JpXf8Tzt/8O7p3CgTnpBSE5RwvWdA55YrxzJstBw9xHhDefIlrQROLGt/6R3yWlcGBJ5LP TL8y+eaTKwaV8wS4mrok6pWU7lfOYWJx2qfEUpyRaKjFXFScCADqWSmebgIAAA== 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 13:43:27 -0000 On 21.07.2016 16:35, Yuanhan Liu wrote: > 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 > > One help I'd like to ask is that I'd appriciate if you could do the test > to make sure that your 2 (latest) patches fix the two issues you reported. > > You might have already done that; I just want to make sure. I've performed the test with 'ofport_request' script before sending patches. And currently test still works. No leaks of descriptors, no hangs, no QEMU crashes observed. Sometimes network device breaks on QEMU side, but it's QEMU issue. In this case I'm receiving following message from DPDK's vhost: VHOST_CONFIG: vhost-user client: socket created, fd: 28 VHOST_CONFIG: failed to connect to /vhost1: Resource temporarily unavailable VHOST_CONFIG: /vhost1: reconnecting... Before the 'hang' patch there was hang of main thread. After QEMU restart all works normally. OVS restart not required. Best regards, Ilya Maximets.