From: Kevin Wolf <kwolf@redhat.com>
To: "Roman Kagan" <rvkagan@yandex-team.ru>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
"Michael S. Tsirkin" <mst@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
yc-core@yandex-team.ru,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: Re: [PATCH 01/10] vhost-user-blk: reconnect on any error during realize
Date: Fri, 12 Nov 2021 12:37:59 +0100 [thread overview]
Message-ID: <YY5SF0uPkoEvX9qM@redhat.com> (raw)
In-Reply-To: <YY4aGok6e8Z6BRQu@rvkaganb.lan>
Am 12.11.2021 um 08:39 hat Roman Kagan geschrieben:
> On Thu, Nov 11, 2021 at 06:52:30PM +0100, Kevin Wolf wrote:
> > Am 11.11.2021 um 16:33 hat Roman Kagan geschrieben:
> > > vhost-user-blk realize only attempts to reconnect if the previous
> > > connection attempt failed on "a problem with the connection and not an
> > > error related to the content (which would fail again the same way in the
> > > next attempt)".
> > >
> > > However this distinction is very subtle, and may be inadvertently broken
> > > if the code changes somewhere deep down the stack and a new error gets
> > > propagated up to here.
> > >
> > > OTOH now that the number of reconnection attempts is limited it seems
> > > harmless to try reconnecting on any error.
> > >
> > > So relax the condition of whether to retry connecting to check for any
> > > error.
> > >
> > > This patch amends a527e312b5 "vhost-user-blk: Implement reconnection
> > > during realize".
> > >
> > > Signed-off-by: Roman Kagan <rvkagan@yandex-team.ru>
> >
> > It results in less than perfect error messages. With a modified export
> > that just crashes qemu-storage-daemon during get_features, I get:
> >
> > qemu-system-x86_64: -device vhost-user-blk-pci,chardev=c: Failed to read msg header. Read 0 instead of 12. Original request 1.
> > qemu-system-x86_64: -device vhost-user-blk-pci,chardev=c: Reconnecting after error: vhost_backend_init failed: Protocol error
> > qemu-system-x86_64: -device vhost-user-blk-pci,chardev=c: Reconnecting after error: Failed to connect to '/tmp/vsock': Connection refused
> > qemu-system-x86_64: -device vhost-user-blk-pci,chardev=c: Reconnecting after error: Failed to connect to '/tmp/vsock': Connection refused
> > qemu-system-x86_64: -device vhost-user-blk-pci,chardev=c: Failed to connect to '/tmp/vsock': Connection refused
>
> This patch doesn't change any error messages. Which ones specifically
> became less than perfect as a result of this patch?
But it adds error messages (for each retry), which are different from
the first error message. As I said this is not the end of the world, but
maybe a bit more confusing.
> > I guess this might be tolerable. On the other hand, the patch doesn't
> > really fix anything either, but just gets rid of possible subtleties.
>
> The remaining patches in the series make other errors beside -EPROTO
> propagate up to this point, and some (most) of them are retryable. This
> was the reason to include this patch at the beginning of the series (I
> guess I should've mentioned that in the patch log).
I see. I hadn't looked at the rest of the series yet because I ran out
of time, but now that I'm skimming them, I see quite a few places that
use non-EPROTO, but I wonder which of them actually should be
reconnected. So far all I saw were presumably persistent errors where a
retry won't help. Can you give me some examples?
Kevin
next prev parent reply other threads:[~2021-11-12 11:39 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-11 15:33 [PATCH 00/10] vhost: stick to -errno error return convention Roman Kagan
2021-11-11 15:33 ` [PATCH 01/10] vhost-user-blk: reconnect on any error during realize Roman Kagan
2021-11-11 17:52 ` Kevin Wolf
2021-11-12 7:39 ` Roman Kagan
2021-11-12 11:37 ` Kevin Wolf [this message]
2021-11-12 19:59 ` Roman Kagan
2021-11-29 22:15 ` Raphael Norwitz
2021-11-29 22:17 ` Raphael Norwitz
2021-11-11 15:33 ` [PATCH 02/10] chardev/char-socket: tcp_chr_recv: don't clobber errno Roman Kagan
2021-11-12 8:27 ` Marc-André Lureau
2021-11-11 15:33 ` [PATCH 03/10] chardev/char-socket: tcp_chr_sync_read: " Roman Kagan
2021-11-12 8:28 ` Marc-André Lureau
2021-11-11 15:33 ` [PATCH 04/10] chardev/char-fe: don't allow EAGAIN from blocking read Roman Kagan
2021-11-12 8:24 ` Marc-André Lureau
2021-11-12 19:04 ` Roman Kagan
2021-11-11 15:33 ` [PATCH 05/10] vhost-backend: avoid overflow on memslots_limit Roman Kagan
2021-11-11 17:59 ` Philippe Mathieu-Daudé
2021-11-12 7:46 ` Roman Kagan
2021-11-12 9:56 ` Daniel P. Berrangé
2021-11-12 11:10 ` Roman Kagan
2021-11-11 15:33 ` [PATCH 06/10] vhost-backend: stick to -errno error return convention Roman Kagan
2021-11-11 18:00 ` Philippe Mathieu-Daudé
2021-11-11 15:33 ` [PATCH 07/10] vhost-vdpa: " Roman Kagan
2021-11-11 15:33 ` [PATCH 08/10] vhost-user: " Roman Kagan
2021-11-11 15:33 ` [PATCH 09/10] vhost: " Roman Kagan
2021-11-11 15:33 ` [PATCH 10/10] vhost-user-blk: propagate error return from generic vhost Roman Kagan
2021-11-29 22:37 ` Raphael Norwitz
2021-11-11 20:14 ` [PATCH 00/10] vhost: stick to -errno error return convention Michael S. Tsirkin
2021-11-12 8:04 ` Roman Kagan
2021-11-28 21:47 ` Michael S. Tsirkin
2021-11-29 21:44 ` Roman Kagan
2022-01-06 9:57 ` Michael S. Tsirkin
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=YY5SF0uPkoEvX9qM@redhat.com \
--to=kwolf@redhat.com \
--cc=hreitz@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rvkagan@yandex-team.ru \
--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).