From: Stefan Hajnoczi <stefanha@gmail.com>
To: "Marcin Gibuła" <m.gibula@beyond.pl>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] qemu 2.0, deadlock in block-commit
Date: Fri, 23 May 2014 14:58:47 +0200 [thread overview]
Message-ID: <20140523125847.GD5990@stefanha-thinkpad.hitronhub.home> (raw)
In-Reply-To: <537E62CE.2050302@beyond.pl>
On Thu, May 22, 2014 at 10:49:18PM +0200, Marcin Gibuła wrote:
> This is backtrace of qemu process:
>
> (gdb) thread apply all backtrace
[...] a bunch of rbd threads, vnc worker thread, QEMU worker threads
> Thread 1 (Thread 0x7f699bfcd900 (LWP 13647)):
> #0 0x00007f6998020286 in ppoll () from /lib64/libc.so.6
> #1 0x00007f699c1f3d9b in ppoll (__ss=0x0, __timeout=0x0, __nfds=<optimized
> out>, __fds=<optimized out>) at /usr/include/bits/poll2.h:77
> #2 qemu_poll_ns (fds=<optimized out>, nfds=<optimized out>,
> timeout=<optimized out>) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/qemu-timer.c:311
> #3 0x00007f699c0877e0 in aio_poll (ctx=0x7f699e4c9c00,
> blocking=blocking@entry=true) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/aio-posix.c:221
> #4 0x00007f699c095c0a in bdrv_drain_all () at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/block.c:1805
QEMU is waiting for all block I/O requests to complete. I wonder if
there is some weird interaction with rbd here, which is why this never
completes.
In gdb you can iterate over bdrv_states to inspect the open
BlockDriverState structs. Each BDS struct has a tracked_requests list
and bdrv_drain_all() is waiting for this pending requests list to become
empty.
If you see a pending request on a RADOS block device (rbd) then it would
be good to dig deeper into QEMU's block/rbd.c driver to see why it's not
completing that request.
Are you using qcow2 on top of rbd?
> #5 0x00007f699c09c87e in bdrv_close (bs=bs@entry=0x7f699f0bc520) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/block.c:1695
> #6 0x00007f699c09c5fa in bdrv_delete (bs=0x7f699f0bc520) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/block.c:1978
> #7 bdrv_unref (bs=0x7f699f0bc520) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/block.c:5198
> #8 0x00007f699c09c812 in bdrv_drop_intermediate
> (active=active@entry=0x7f699ebfd330, top=top@entry=0x7f699f0bc520,
> base=base@entry=0x7f699eec43d0) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/block.c:2567
> #9 0x00007f699c0a1963 in commit_run (opaque=0x7f699f17dcc0) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/block/commit.c:144
> #10 0x00007f699c0e0dca in coroutine_trampoline (i0=<optimized out>,
> i1=<optimized out>) at /var/tmp/portage/app-emulation/qemu-2.0.0_rc2/work/qemu-2.0.0-rc2/coroutine-ucontext.c:118
> #11 0x00007f6997f859f0 in ?? () from /lib64/libc.so.6
> #12 0x00007fffdbe06750 in ?? ()
> #13 0x0000000000000000 in ?? ()
next prev parent reply other threads:[~2014-05-23 15:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-22 20:49 [Qemu-devel] qemu 2.0, deadlock in block-commit Marcin Gibuła
2014-05-22 21:05 ` Marcin Gibuła
2014-05-23 8:19 ` Paolo Bonzini
2014-05-23 8:21 ` Marcin Gibuła
2014-05-23 9:25 ` Marcin Gibuła
2014-05-23 12:29 ` Kevin Wolf
2014-05-23 12:38 ` Marcin Gibuła
2014-05-23 13:14 ` Marcin Gibuła
2014-05-23 13:18 ` Marcin Gibuła
2014-05-23 22:02 ` Marcin Gibuła
2014-05-22 21:25 ` Eric Blake
2014-05-22 21:43 ` Marcin Gibuła
2014-05-23 12:58 ` Stefan Hajnoczi [this message]
2014-05-23 16:25 ` Marcin Gibuła
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=20140523125847.GD5990@stefanha-thinkpad.hitronhub.home \
--to=stefanha@gmail.com \
--cc=m.gibula@beyond.pl \
--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).