qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Fam Zheng <famz@redhat.com>
To: "Jason J. Herne" <jjherne@linux.vnet.ibm.com>
Cc: jcody@redhat.com, stefanha@redhat.com, qemu-devel@nongnu.org,
	qemu-block@nongnu.org, quintela@redhat.com
Subject: Re: [Qemu-devel] coroutines: block: Co-routine re-entered recursively when migrating disk with iothreads
Date: Wed, 25 May 2016 16:36:22 +0800	[thread overview]
Message-ID: <20160525083622.GC32161@ad.usersys.redhat.com> (raw)
In-Reply-To: <57446DA8.8030709@linux.vnet.ibm.com>

On Tue, 05/24 11:05, Jason J. Herne wrote:
> Thread 13 (Thread 0x3ff989ff910 (LWP 29452)):
> #0  0x000003ff99abe2c0 in raise () from /lib64/libc.so.6
> #1  0x000003ff99abfc26 in abort () from /lib64/libc.so.6
> #2  0x0000000080427d80 in qemu_coroutine_enter (co=0x9c5a4120, opaque=0x0)
> at /root/kvmdev/qemu/util/qemu-coroutine.c:112
> #3  0x000000008032246e in nbd_restart_write (opaque=0x9c5897b0) at
> /root/kvmdev/qemu/block/nbd-client.c:114
> #4  0x00000000802b3a1c in aio_dispatch (ctx=0x9c530770) at
> /root/kvmdev/qemu/aio-posix.c:341
> #5  0x00000000802b4332 in aio_poll (ctx=0x9c530770, blocking=true) at
> /root/kvmdev/qemu/aio-posix.c:479
> #6  0x0000000080155aba in iothread_run (opaque=0x9c530200) at
> /root/kvmdev/qemu/iothread.c:46
> #7  0x000003ff99c87c2c in start_thread () from /lib64/libpthread.so.0
> #8  0x000003ff99b8ec9a in thread_start () from /lib64/libc.so.6

This is the continuation of write request to the NBD target....

> Thread 1 (Thread 0x3ff9a6f2a90 (LWP 29433)):
> #0  0x000003ff99c8d68a in pthread_cond_wait@@GLIBC_2.3.2 () from
> /lib64/libpthread.so.0
> #1  0x000000008040932e in qemu_cond_wait (cond=0x9c530800, mutex=0x9c5307d0)
> at /root/kvmdev/qemu/util/qemu-thread-posix.c:123
> #2  0x0000000080426a38 in rfifolock_lock (r=0x9c5307d0) at
> /root/kvmdev/qemu/util/rfifolock.c:59
> #3  0x00000000802a1f72 in aio_context_acquire (ctx=0x9c530770) at
> /root/kvmdev/qemu/async.c:373
> #4  0x00000000802b3f54 in aio_poll (ctx=0x9c530770, blocking=true) at
> /root/kvmdev/qemu/aio-posix.c:415
> #5  0x000000008031e7ac in bdrv_flush (bs=0x9c59b5c0) at
> /root/kvmdev/qemu/block/io.c:2470
> #6  0x00000000802a8e6e in bdrv_close (bs=0x9c59b5c0) at
> /root/kvmdev/qemu/block.c:2134
> #7  0x00000000802a9966 in bdrv_delete (bs=0x9c59b5c0) at
> /root/kvmdev/qemu/block.c:2341
> #8  0x00000000802ac7c6 in bdrv_unref (bs=0x9c59b5c0) at
> /root/kvmdev/qemu/block.c:3376
> #9  0x0000000080315340 in mirror_exit (job=0x9c956ed0, opaque=0x9c9570d0) at
> /root/kvmdev/qemu/block/mirror.c:494
> #10 0x00000000802afb52 in block_job_defer_to_main_loop_bh
> (opaque=0x9c90dc10) at /root/kvmdev/qemu/blockjob.c:476

... while this is the completion of mirror. They are not supposed to happen
together. Either the job is completed too early, or the nbd_restart_write
function is invoked incorrectly.

I'll see if I can reproduce it here.

Fam

  reply	other threads:[~2016-05-25  8:36 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 [this message]
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             ` [Qemu-devel] [Qemu-block] " Stefan Hajnoczi
2016-06-08 16:03               ` 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=20160525083622.GC32161@ad.usersys.redhat.com \
    --to=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=jjherne@linux.vnet.ibm.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).