All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilya Maximets <i.maximets@samsung.com>
To: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Cc: dev@dpdk.org, Huawei Xie <huawei.xie@intel.com>,
	Dyasly Sergey <s.dyasly@samsung.com>,
	Heetae Ahn <heetae82.ahn@samsung.com>,
	Thomas Monjalon <thomas.monjalon@6wind.com>
Subject: Re: [PATCH v3] vhost: fix connect hang in client mode
Date: Thu, 21 Jul 2016 16:43:25 +0300	[thread overview]
Message-ID: <5790D17D.8080402@samsung.com> (raw)
In-Reply-To: <20160721133558.GK28708@yliu-dev.sh.intel.com>



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 <i.maximets@samsung.com>
> 
> Acked-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
> 
> 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.

  reply	other threads:[~2016-07-21 13:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-21  8:21 [PATCH] vhost: fix connect hang in client mode Ilya Maximets
2016-07-21  9:37 ` Yuanhan Liu
2016-07-21  9:45   ` Ilya Maximets
2016-07-21 10:13     ` Yuanhan Liu
2016-07-21 10:37       ` Ilya Maximets
2016-07-21 11:14         ` Ilya Maximets
2016-07-21 11:40           ` Yuanhan Liu
2016-07-21 12:10             ` Ilya Maximets
2016-07-21 12:13               ` Ilya Maximets
2016-07-21 12:35                 ` Yuanhan Liu
2016-07-21 12:42                   ` Ilya Maximets
2016-07-21 12:58                     ` Yuanhan Liu
2016-07-21 12:58                       ` Ilya Maximets
2016-07-21 13:10                         ` Yuanhan Liu
2016-07-21 11:12 ` [PATCH v2] " Ilya Maximets
2016-07-21 13:19 ` [PATCH v3] " Ilya Maximets
2016-07-21 13:35   ` Yuanhan Liu
2016-07-21 13:43     ` Ilya Maximets [this message]
2016-07-21 13:56       ` Yuanhan Liu
2016-07-21 22:21     ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5790D17D.8080402@samsung.com \
    --to=i.maximets@samsung.com \
    --cc=dev@dpdk.org \
    --cc=heetae82.ahn@samsung.com \
    --cc=huawei.xie@intel.com \
    --cc=s.dyasly@samsung.com \
    --cc=thomas.monjalon@6wind.com \
    --cc=yuanhan.liu@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.