From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr7Uk-0002tk-M3 for qemu-devel@nongnu.org; Tue, 27 Oct 2015 12:53:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr7Uh-0006JV-Gk for qemu-devel@nongnu.org; Tue, 27 Oct 2015 12:53:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52843) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr7Uh-0006JK-9w for qemu-devel@nongnu.org; Tue, 27 Oct 2015 12:53:07 -0400 Date: Tue, 27 Oct 2015 16:53:04 +0000 From: Stefan Hajnoczi Message-ID: <20151027165304.GB9986@stefanha-x1.localdomain> References: <1445951385-11924-1-git-send-email-dgilbert@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445951385-11924-1-git-send-email-dgilbert@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2] gdb command: qemu handlers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert (git)" Cc: pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, peter.maydell@linaro.org On Tue, Oct 27, 2015 at 01:09:45PM +0000, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > A new gdb commands are added: > > qemu handlers > > That dumps an AioContext list (by default qemu_aio_context) > possibly including a backtrace for cases it knows about > (with the verbose option). Intended to help find why something > is hanging waiting for IO. > > Use 'qemu handlers --verbose iohandler_ctx' to find out why > your incoming migration is stuck. > > Signed-off-by: Dr. David Alan Gilbert > > V2: > Merge into one command with optional handlers arg, and only do > backtrace in verbose mode > > (gdb) qemu handlers > ---- > {pfd = {fd = 6, events = 25, revents = 0}, io_read = 0x55869656ffd0 > , io_write = 0x0, deleted = 0, opaque = > 0x558698c4ce08, node = {le_next = 0x0, le_prev = 0x558698c4cdc0}} > > (gdb) qemu handlers iohandler_ctx > ---- > {pfd = {fd = 9, events = 25, revents = 0}, io_read = 0x558696581380 > , io_write = 0x0, deleted = 0, opaque = > 0x558698dc99d0, node = {le_next = 0x558698c4cca0, le_prev = > 0x558698c4c1d0}} > ---- > {pfd = {fd = 4, events = 25, revents = 0}, io_read = 0x55869657b330 > , io_write = 0x0, deleted = 0, opaque = 0x4, node = > {le_next = 0x558698c4c260, le_prev = 0x558699f72508}} > ---- > {pfd = {fd = 5, events = 25, revents = 0}, io_read = 0x55869656ffd0 > , io_write = 0x0, deleted = 0, opaque = > 0x558698c4c218, node = {le_next = 0x0, le_prev = 0x558698c4ccc8}} > ---- > (gdb) qemu handlers --verbose iohandler_ctx > ---- > {pfd = {fd = 9, events = 25, revents = 0}, io_read = 0x558696581380 > , io_write = 0x0, deleted = 0, opaque = > 0x558698dc99d0, node = {le_next = 0x558698c4cca0, le_prev = > 0x558698c4c1d0}} > #0 0x0000558696581820 in qemu_coroutine_switch > (from_=from_@entry=0x558698cb3cf0, to_=to_@entry=0x7f421c37eac8, > action=action@entry=COROUTINE_YIELD) at > /home/dgilbert/git/qemu/coroutine-ucontext.c:177 > #1 0x0000558696580c00 in qemu_coroutine_yield () at > /home/dgilbert/git/qemu/qemu-coroutine.c:145 > #2 0x00005586965814f5 in yield_until_fd_readable (fd=9) at > /home/dgilbert/git/qemu/qemu-coroutine-io.c:90 > #3 0x0000558696523937 in socket_get_buffer (opaque=0x55869a3dc620, > buf=0x558698c505a0 "", pos=, size=32768) at > /home/dgilbert/git/qemu/migration/qemu-file-unix.c:101 > #4 0x0000558696521fac in qemu_fill_buffer (f=0x558698c50570) at > /home/dgilbert/git/qemu/migration/qemu-file.c:227 > #5 0x0000558696522989 in qemu_peek_byte (f=0x558698c50570, offset=0) > at /home/dgilbert/git/qemu/migration/qemu-file.c:507 > #6 0x0000558696522bf4 in qemu_get_be32 (f=0x558698c50570) at > /home/dgilbert/git/qemu/migration/qemu-file.c:520 > #7 0x0000558696522bf4 in qemu_get_be32 (f=f@entry=0x558698c50570) > at /home/dgilbert/git/qemu/migration/qemu-file.c:604 > #8 0x0000558696347e5c in qemu_loadvm_state (f=f@entry=0x558698c50570) > at /home/dgilbert/git/qemu/migration/savevm.c:1821 > #9 0x000055869651de8c in process_incoming_migration_co > (opaque=0x558698c50570) > at /home/dgilbert/git/qemu/migration/migration.c:336 > #10 0x000055869658188a in coroutine_trampoline (i0=, > i1=) > at /home/dgilbert/git/qemu/coroutine-ucontext.c:80 > #11 0x00007f420f05df10 in __start_context () at /lib64/libc.so.6 > #12 0x00007ffc40815f50 in () > #13 0x0000000000000000 in () > > ---- > --- > scripts/qemu-gdb.py | 3 ++- > scripts/qemugdb/aio.py | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++ > 2 files changed, 60 insertions(+), 1 deletion(-) > create mode 100644 scripts/qemugdb/aio.py Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan