qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
Cc: Fam Zheng <famz@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	qemu block <qemu-block@nongnu.org>,
	Juan Quintela <quintela@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-block] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads
Date: Wed, 8 Jun 2016 16:30:33 +0100	[thread overview]
Message-ID: <CAJSP0QUP7shbTUsCQR7L5j0VV-0ZBndn01Uwf9ogFMSpPVMgFA@mail.gmail.com> (raw)
In-Reply-To: <5756C152.2070007@linux.vnet.ibm.com>

On Tue, Jun 7, 2016 at 1:42 PM, Jason J. Herne
<jjherne@linux.vnet.ibm.com> wrote:
> On 06/06/2016 10:44 PM, Fam Zheng wrote:
>>
>> On Mon, 06/06 14:55, Jason J. Herne wrote:
>>>>
>>>> I'll see if I can reproduce it here.
>>>>
>>>> Fam
>>>>
>>>
>>> Hi Fam,
>>> Have you had any luck reproducing this?
>>
>>
>> No I cannot reproduce so far.
>>
>
> I can hit the problem 100% of the time. Is there any info I can provide to
> help? Either with debugging or reproducing?

I have a related scenario that is reproducible on qemu.git/master:

Launch an x86 guest with virtio-blk-pci,iothread= and perform
drive_mirror to NBD.  Now live migrate (without block migration
because you already mirrored) and the source QEMU will eventually
abort.

The backtrace shows the coroutine is running in the IOThread.  It
should be doing that since virtio-blk.c stops dataplane when live
migration/savevm begins.

What happens is that the mirror block job's coroutine continues to run
in the IOThread but the BlockDriverState's AioContext has switched
back to the main loop.

blk_add_aio_context_notifier() calls are missing for block jobs.  They
need to attach/detach when the AioContext changes.

This needs to be fixed.  I believe Paolo has a patch to continue using
dataplane during savevm but that's a workaround rather than a solution
to this problem.

Stefan

  reply	other threads:[~2016-06-08 15:30 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-23 18:54 [Qemu-devel] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads Jason J. Herne
2016-05-24  2:12 ` Fam Zheng
2016-05-24 15:05   ` Jason J. Herne
2016-05-25  8:36     ` Fam Zheng
2016-06-06 18:55       ` Jason J. Herne
2016-06-07  2:44         ` Fam Zheng
2016-06-07 12:42           ` Jason J. Herne
2016-06-08 15:30             ` Stefan Hajnoczi [this message]
2016-06-08 16:03               ` [Qemu-devel] [Qemu-block] " Paolo Bonzini
2016-06-09  7:35                 ` Stefan Hajnoczi
2016-06-09  8:25                   ` Paolo Bonzini
2016-06-09  8:47                     ` Stefan Hajnoczi
2016-06-09  8:48                       ` Stefan Hajnoczi
2016-06-09 10:02                         ` Paolo Bonzini
2016-06-09 16:31 ` [Qemu-devel] " Stefan Hajnoczi
2016-06-09 18:19   ` Jason J. Herne

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=CAJSP0QUP7shbTUsCQR7L5j0VV-0ZBndn01Uwf9ogFMSpPVMgFA@mail.gmail.com \
    --to=stefanha@gmail.com \
    --cc=famz@redhat.com \
    --cc=jjherne@linux.vnet.ibm.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=stefanha@redhat.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 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).