From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:48237) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbYW7-0005A4-QK for qemu-devel@nongnu.org; Thu, 22 Nov 2012 10:16:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TbYW1-000794-PP for qemu-devel@nongnu.org; Thu, 22 Nov 2012 10:16:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64094) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TbYW1-00078p-HN for qemu-devel@nongnu.org; Thu, 22 Nov 2012 10:16:33 -0500 Message-ID: <50AE41CC.7040705@redhat.com> Date: Thu, 22 Nov 2012 16:16:28 +0100 From: Paolo Bonzini 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> In-Reply-To: <50AE2A01.4040306@siemens.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: Jan Kiszka Cc: "aliguori@us.ibm.com" , "qemu-devel@nongnu.org" , "stefanha@redhat.com" Il 22/11/2012 14:34, Jan Kiszka ha scritto: >=20 > =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 qem= u-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:1997= ] 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_cf= i01.c:405] in qemu-system-arm (0x0105bdec) > 12 0x00618a7e io_mem_write+0xed(mr=3D0xd6f2a48, addr=3D0x105bdec, val= =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 qe= mu-system-arm (0x3700001e) > 14 0x02136637 (0x0015e268) >=20 > 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? Ah, so it wasn't fixed by the TLS change? 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)? This patch can help gathering debug output, it will place it into a console window. 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(); + 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); Paolo