From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48149) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbZ6B-0002Wm-HD for qemu-devel@nongnu.org; Thu, 22 Nov 2012 10:53:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbZ62-0001xK-Qe for qemu-devel@nongnu.org; Thu, 22 Nov 2012 10:53:55 -0500 Received: from goliath.siemens.de ([192.35.17.28]:25211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbZ62-0001wP-Gt for qemu-devel@nongnu.org; Thu, 22 Nov 2012 10:53:46 -0500 Message-ID: <50AE4A88.3090106@siemens.com> Date: Thu, 22 Nov 2012 16:53:44 +0100 From: Jan Kiszka MIME-Version: 1.0 References: <1351697456-16107-1-git-send-email-pbonzini@redhat.com> <1351697456-16107-40-git-send-email-pbonzini@redhat.com> <50ACD536.2050205@siemens.com> <50ACD65E.6030300@redhat.com> <50ACD6B4.1050706@siemens.com> <50ACD835.4000206@redhat.com> <50ACD945.1040308@siemens.com> <50AE2A01.4040306@siemens.com> <50AE41CC.7040705@redhat.com> In-Reply-To: <50AE41CC.7040705@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v2 39/39] raw-win32: implement native asynchronous I/O List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "aliguori@us.ibm.com" , "qemu-devel@nongnu.org" , "stefanha@redhat.com" On 2012-11-22 16:16, Paolo Bonzini wrote: > Il 22/11/2012 14:34, Jan Kiszka ha scritto: >> >> =3D>0 0xf77c242e __kernel_vsyscall+0xe() in [vdso].so (0x0519df88) >> 1 0xf761f10b __libc_read+0x4a() in libpthread.so.0 (0x0519df88) >> 2 0x7bc78c98 in ntdll (+0x68c97) (0x0519df88) >> 3 0x7bc7b0a3 in ntdll (+0x6b0a2) (0x0519e1b8) >> 4 0x7bc7b195 NtWaitForMultipleObjects+0x54() in ntdll (0x0519e1e8) >> 5 0x7b86de9f WaitForMultipleObjectsEx+0xee() in kernel32 (0x0519e338= ) >> 6 0x7b86df1a WaitForMultipleObjects+0x39() in kernel32 (0x0519e368) >> 7 0x0040301b aio_poll+0x16a(ctx=3D0x157610, blocking=3D) [/data/qemu/aio-win32.c:178] in qemu-system-arm (0x00000001) >> 8 0x004feec3 qemu_aio_wait+0x22() [/data/qemu/main-loop.c:442] in qe= mu-system-arm (0x0105bdec) >> 9 0x00417166 bdrv_rw_co+0xa5(bs=3D0x159648, sector_num=3D, buf=3D"=C2=B9=C2=B8=C3=BF=C2=A6 >> = ", nb_sectors=3D0x4, is_write=3Dtrue) [/data/qemu/block.c:199= 7] in qemu-system-arm (0x0105bdec) >> 10 0x00495544 in qemu-system-arm (+0x95543) (0x0105bdec) >> 11 0x0049592a pflash_write+0x3b9(pfl=3D0xd6f16e0, offset=3D, value=3D0x98f7fb1d, width=3D0x4, be=3D0) [/data/qemu/hw/pflash_c= fi01.c:405] in qemu-system-arm (0x0105bdec) >> 12 0x00618a7e io_mem_write+0xed(mr=3D0xd6f2a48, addr=3D0x105bdec, va= l=3D0x98f7fb1d, size=3D0x4) [/data/qemu/memory.c:911] in qemu-system-arm = (0x00000004) >> 13 0x0064088c helper_stl_mmu+0x2fb(env=3D0x15e268, addr=3D0xca05bdec= , val=3D0x98f7fb1d, mmu_idx=3D0) [/data/qemu/softmmu_template.h:231] in q= emu-system-arm (0x3700001e) >> 14 0x02136637 (0x0015e268) >> >> It's the VCPU thread stuck in aio_poll, holding the BQL, blocking the >> iothread this way as well. Is there some race that prevents we receive >> the proper IO completion signal? Any states I should check? >=20 > Ah, so it wasn't fixed by the TLS change? This version was built with my more recent opensuse mingw toolchain, thus isn't affected by the TLS issue. >=20 > Instead of tracing, can you try adding printfs in aio_worker > (block/raw-win32.c), and also in thread_pool_active and > event_notifier_ready (thread-pool.c)? >=20 > This patch can help gathering debug output, it will place it into a > console window. >=20 > diff --git a/vl.c b/vl.c > index c8e9c78..5398178 100644 > --- a/vl.c > +++ b/vl.c > @@ -3531,6 +3531,10 @@ int main(int argc, char **argv, char **envp) > } > loc_set_none(); >=20 > + AllocConsole(); > + freopen("CONIN$", "rb", stdin); > + freopen("CONOUT$", "wb", stdout); > + freopen("CONOUT$", "wb", stderr); > if (qemu_init_main_loop()) { > fprintf(stderr, "qemu_init_main_loop failed\n"); > exit(1); Ok, will dig into this. Thanks, Jan --=20 Siemens AG, Corporate Technology, CT RTC ITP SDP-DE Corporate Competence Center Embedded Linux