qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: Dima Stepanov <dimastep@yandex-team.ru>
Cc: kwolf@redhat.com, Qing Wang <qinwang@redhat.com>,
	qemu-block@nongnu.org, mst@redhat.com, jasowang@redhat.com,
	Cong Li <coli@redhat.com>,
	dgilbert@redhat.com, qemu-devel@nongnu.org,
	raphael.norwitz@nutanix.com, fengli@smartx.com,
	yc-core@yandex-team.ru, pbonzini@redhat.com,
	marcandre.lureau@redhat.com, mreitz@redhat.com
Subject: Re: [PATCH v4 0/2] vhost-user reconnect issues during vhost initialization
Date: Mon, 14 Sep 2020 14:40:28 +0100	[thread overview]
Message-ID: <20200914134028.GA628463@stefanha-x1.localdomain> (raw)
In-Reply-To: <cover.1590396396.git.dimastep@yandex-team.ru>

[-- Attachment #1: Type: text/plain, Size: 1872 bytes --]

On Thu, May 28, 2020 at 12:11:17PM +0300, Dima Stepanov wrote:
> Before revising the vhost-user initialization code, we suggest adding
> the sanity checks to be aware of the possible disconnect event and that
> the vhost_dev structure can be in "uninitialized" state.
> 
> The vhost-user-blk daemon is updated with the additional
> "--simulate-disconnect-stage=CASENUM" argument to simulate disconnect during
> VHOST device initialization. For instance:
>   1. $ ./vhost-user-blk -s ./vhost.sock -b test-img.raw --simulate-disconnect-stage=1
>      This command will simulate disconnect in the SET_VRING_CALL handler.
>      In this case the vhost device in QEMU is not set the started field to
>      true.
>   2. $ ./vhost-user-blk -s ./vhost.sock -b test-img.raw --simulate-disconnect-stage=2
>      This command will simulate disconnect in the SET_VRING_NUM handler.
>      In this case the started field is set to true.
> These two cases test different QEMU parts. Also to trigger different code paths
> disconnect should be simulated in two ways:
>   - before any successful initialization
>   - make successful initialization once and try to simulate disconnects
> Also we catch SIGABRT on the migration start if vhost-user daemon disconnected
> during vhost-user set log commands communication.
> 
> Dima Stepanov (2):
>   char-socket: return -1 in case of disconnect during tcp_chr_write
>   vhost-user-blk: delay vhost_user_blk_disconnect
> 
>  chardev/char-socket.c     |  7 ++++---
>  hw/block/vhost-user-blk.c | 38 +++++++++++++++++++++++++++++++++++++-
>  2 files changed, 41 insertions(+), 4 deletions(-)

Hi Dima,
The cover letter mentions ./vhost-user-blk --simulate-disconnect-stage=N
to simulate unexpected disconnects but I don't see that option in
contrib/vhost-user-blk/.

Is there a test case?

Thanks,
Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2020-09-14 13:41 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-28  9:11 [PATCH v4 0/2] vhost-user reconnect issues during vhost initialization Dima Stepanov
2020-05-28  9:11 ` [PATCH v4 1/2] char-socket: return -1 in case of disconnect during tcp_chr_write Dima Stepanov
2020-05-28  9:11 ` [PATCH v4 2/2] vhost-user-blk: delay vhost_user_blk_disconnect Dima Stepanov
2020-05-31  0:55   ` Raphael Norwitz
2020-06-02  3:16     ` Li Feng
2020-06-02  8:31     ` Dima Stepanov
2020-09-14 13:40 ` Stefan Hajnoczi [this message]

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=20200914134028.GA628463@stefanha-x1.localdomain \
    --to=stefanha@gmail.com \
    --cc=coli@redhat.com \
    --cc=dgilbert@redhat.com \
    --cc=dimastep@yandex-team.ru \
    --cc=fengli@smartx.com \
    --cc=jasowang@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qinwang@redhat.com \
    --cc=raphael.norwitz@nutanix.com \
    --cc=yc-core@yandex-team.ru \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).