qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Eric Blake <eblake@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] nbd-client: fix hang after server closes connection
Date: Wed, 23 Aug 2017 15:46:59 +0100	[thread overview]
Message-ID: <20170823144659.GF16760@stefanha-x1.localdomain> (raw)
In-Reply-To: <20170821161539.11066-1-stefanha@redhat.com>

On Mon, Aug 21, 2017 at 05:15:39PM +0100, Stefan Hajnoczi wrote:
> Commit 72b6ffc76653214b69a94a7b1643ff80df134486 ("nbd-client: Fix
> regression when server sends garbage") improved NBD client behavior when
> the connection enters a broken state.
> 
> The following still does not behave as expected:
> 
>   $ qemu-nbd -p 1234 -x drive0 -f qcow2 test.qcow2
>   $ qemu-system-x86_64 -M accel=kvm -m 1G \
>         -drive if=virtio,id=drive0,file=nbd://localhost:1234/drive0,format=raw
>   $ pkill qemu-nbd
>   (qemu) quit
>   ...hang...
> 
> QEMU should be able to quit even when the connection was previously
> closed by the NBD server.  Currently the nbd_read_reply_entry()
> coroutine terminates without letting in-flight requests know that the
> connection is dead.
> 
> This patch flags the connection as dead so in-flight requests can
> complete.
> 
> Reported-by: Longxiang Lyu <lolyu@redhat.com>
> Cc: Eric Blake <eblake@redhat.com>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  block/nbd-client.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)

This patch is superceded by "[PATCH] nbd-client: avoid spurious
qio_channel_yield() re-entry".

Stefan

      parent reply	other threads:[~2017-08-23 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 16:15 [Qemu-devel] [PATCH] nbd-client: fix hang after server closes connection Stefan Hajnoczi
2017-08-21 16:27 ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2017-08-21 19:01   ` Eric Blake
2017-08-23 14:25     ` Eric Blake
2017-08-23 14:28       ` Eric Blake
2017-08-22 13:49 ` [Qemu-devel] " Philippe Mathieu-Daudé
2017-08-23 14:46 ` 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=20170823144659.GF16760@stefanha-x1.localdomain \
    --to=stefanha@redhat.com \
    --cc=eblake@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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).