From: Mark Wu <wudxw@vnet.linux.ibm.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] This patch adds a new block driver : iSCSI
Date: Fri, 23 Sep 2011 17:15:52 +0800 [thread overview]
Message-ID: <4E7C4E48.7030009@vnet.linux.ibm.com> (raw)
In-Reply-To: <1315628610-28222-2-git-send-email-ronniesahlberg@gmail.com>
I tested this patch with the following command:
x86_64-softmmu/qemu-system-x86_64 --enable-kvm rhel54_1.img -m 1024 -net
tap,ifname=tap0,script=no -net nic,model=virtio -sdl -drive
file=iscsi://127.0.0.1/iqn.2011-09.com.example:server.target1/
And I found that the whole qemu process would get freezed, not reachable
via ping and no response on desktop if there's I/O targeted to the iscsi
drive and the iscsi target was forcefully stopped. After checking the
backtrace with gdb, I found the I/O thread got stuck on the mutex
qemu_global_mutex , which was hold by the vcpu thread. It should be
released before re-entering guest. But the vcpu thread was waiting for
the completion of iscsi aio request endlessly, and therefore couldn't
get chance to release the mutex. So the whole qemu process became
unresponsive. But this problem doesn't exist with the combination of
virtio and iscsi. Only the I/O process got hung on guest in this case.
It's more acceptable. I am not sure how to fix this problem.
gdb backtrace:
(gdb) info threads
2 Thread 0x7fa0fdd4c700 (LWP 5086) 0x0000003a868de383 in select ()
from /lib64/libc.so.6
* 1 Thread 0x7fa0fdd4d740 (LWP 5085) 0x0000003a8700dfe4 in
__lll_lock_wait () from /lib64/libpthread.so.0
(gdb) bt
#0 0x0000003a8700dfe4 in __lll_lock_wait () from /lib64/libpthread.so.0
#1 0x0000003a87009318 in _L_lock_854 () from /lib64/libpthread.so.0
#2 0x0000003a870091e7 in pthread_mutex_lock () from /lib64/libpthread.so.0
#3 0x00000000004c9819 in qemu_mutex_lock (mutex=<value optimized out>)
at qemu-thread-posix.c:54
#4 0x00000000004a46c6 in main_loop_wait (nonblocking=<value optimized
out>) at /home/mark/Work/source/qemu/vl.c:1545
#5 0x00000000004a60d6 in main_loop (argc=<value optimized out>,
argv=<value optimized out>, envp=<value optimized out>) at
/home/mark/Work/source/qemu/vl.c:1579
#6 main (argc=<value optimized out>, argv=<value optimized out>,
envp=<value optimized out>) at /home/mark/Work/source/qemu/vl.c:3574
(gdb) t 2
[Switching to thread 2 (Thread 0x7fa0fdd4c700 (LWP 5086))]#0
0x0000003a868de383 in select () from /lib64/libc.so.6
(gdb) bt
#0 0x0000003a868de383 in select () from /lib64/libc.so.6
#1 0x00000000004096aa in qemu_aio_wait () at aio.c:193
#2 0x0000000000409815 in qemu_aio_flush () at aio.c:113
#3 0x00000000004761ea in bmdma_cmd_writeb (bm=0x1db2230, val=8) at
/home/mark/Work/source/qemu/hw/ide/pci.c:311
#4 0x0000000000555900 in access_with_adjusted_size (addr=0,
value=0x7fa0fdd4bdb8, size=1, access_size_min=<value optimized out>,
access_size_max=<value optimized out>, access=
0x555820 <memory_region_write_accessor>, opaque=0x1db2370) at
/home/mark/Work/source/qemu/memory.c:284
#5 0x0000000000555ae1 in memory_region_iorange_write (iorange=<value
optimized out>, offset=<value optimized out>, width=<value optimized
out>, data=8) at /home/mark/Work/source/qemu/memory.c:425
#6 0x000000000054eda1 in kvm_handle_io (env=0x192e080) at
/home/mark/Work/source/qemu/kvm-all.c:834
#7 kvm_cpu_exec (env=0x192e080) at
/home/mark/Work/source/qemu/kvm-all.c:976
#8 0x000000000052cc1a in qemu_kvm_cpu_thread_fn (arg=0x192e080) at
/home/mark/Work/source/qemu/cpus.c:656
#9 0x0000003a870077e1 in start_thread () from /lib64/libpthread.so.0
#10 0x0000003a868e577d in clone () from /lib64/libc.so.6
next prev parent reply other threads:[~2011-09-23 9:16 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-10 4:23 [Qemu-devel] [PATCH] Add iSCSI support for QEMU Ronnie Sahlberg
2011-09-10 4:23 ` [Qemu-devel] [PATCH] This patch adds a new block driver : iSCSI Ronnie Sahlberg
2011-09-12 9:14 ` Stefan Hajnoczi
2011-09-14 14:36 ` Christoph Hellwig
2011-09-14 15:50 ` Stefan Hajnoczi
2011-09-16 15:53 ` Christoph Hellwig
2011-09-17 7:11 ` Stefan Hajnoczi
2011-09-14 22:51 ` ronnie sahlberg
2011-09-15 8:02 ` Daniel P. Berrange
2011-09-15 9:03 ` Kevin Wolf
2011-09-14 23:08 ` ronnie sahlberg
2011-09-15 6:04 ` Paolo Bonzini
2011-09-15 8:48 ` Dor Laor
2011-09-15 9:11 ` Paolo Bonzini
2011-09-15 11:27 ` ronnie sahlberg
2011-09-15 11:42 ` Dor Laor
2011-09-15 11:46 ` Christoph Hellwig
2011-09-15 12:01 ` Dor Laor
2011-09-15 12:04 ` Paolo Bonzini
2011-09-15 11:58 ` Paolo Bonzini
2011-09-15 12:34 ` Orit Wasserman
2011-09-15 12:58 ` Paolo Bonzini
2011-09-15 16:59 ` Orit Wasserman
2011-09-15 9:44 ` Daniel P. Berrange
2011-09-15 9:10 ` Kevin Wolf
2011-09-15 9:39 ` Paolo Bonzini
2011-09-21 9:48 ` ronnie sahlberg
2011-09-23 9:15 ` Mark Wu [this message]
2011-09-23 10:16 ` Paolo Bonzini
2011-09-12 8:56 ` [Qemu-devel] [PATCH] Add iSCSI support for QEMU Kevin Wolf
2011-09-14 12:24 ` Orit Wasserman
2011-09-14 14:33 ` Christoph Hellwig
2011-09-14 14:37 ` Christoph Hellwig
2011-09-14 15:35 ` Stefan Hajnoczi
2011-09-14 15:40 ` Christoph Hellwig
2011-09-14 15:51 ` Stefan Hajnoczi
2011-09-14 16:36 ` Orit Wasserman
2011-09-15 6:06 ` Paolo Bonzini
2011-09-15 9:52 ` Orit Wasserman
2011-09-15 9:55 ` Paolo Bonzini
2011-09-15 10:10 ` Kevin Wolf
2011-09-17 19:08 ` Laurent Vivier
2011-09-18 7:43 ` Paolo Bonzini
2011-09-14 16:37 ` Paolo Bonzini
2011-09-14 22:46 ` ronnie sahlberg
-- strict thread matches above, loose matches on Subject: below --
2011-09-21 9:37 Ronnie Sahlberg
2011-09-21 9:37 ` [Qemu-devel] [PATCH] This patch adds a new block driver : iSCSI Ronnie Sahlberg
2011-09-21 9:45 ` Paolo Bonzini
2011-09-21 9:52 ` ronnie sahlberg
2011-09-27 20:08 ` ronnie sahlberg
2011-09-28 5:54 ` Paolo Bonzini
2011-09-29 6:54 ` Stefan Hajnoczi
2011-10-09 20:46 ` ronnie sahlberg
2011-10-13 9:46 ` ronnie sahlberg
2011-10-13 9:48 ` Paolo Bonzini
2011-10-13 9:54 ` Stefan Hajnoczi
2011-10-13 10:01 ` Daniel P. Berrange
2011-10-13 10:55 ` Daniel P. Berrange
2011-10-13 10:52 ` Kevin Wolf
2011-10-24 13:33 ` Kevin Wolf
2011-10-25 8:04 ` ronnie sahlberg
2011-10-25 8:17 ` Kevin Wolf
2011-10-25 8:23 ` ronnie sahlberg
2011-10-25 8:46 ` Kevin Wolf
2011-10-28 10:46 ` Zhi Yong Wu
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=4E7C4E48.7030009@vnet.linux.ibm.com \
--to=wudxw@vnet.linux.ibm.com \
--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).