Received: from eggs.gnu.org ([208.118.235.92]:49895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th9Ae-00088H-Fc for qemu-devel@nongnu.org; Fri, 07 Dec 2012 20:25:43 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Th9Aa-0000Pr-6i for qemu-devel@nongnu.org; Fri, 07 Dec 2012 20:25:36 -0500 Received: from indium.canonical.com ([91.189.90.7]:51181) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Th9AZ-0000Pl-UK for qemu-devel@nongnu.org; Fri, 07 Dec 2012 20:25:32 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Th9AZ-00088h-9k for ; Sat, 08 Dec 2012 01:25:31 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 414762E807B for ; Sat, 8 Dec 2012 01:25:31 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Sat, 08 Dec 2012 01:18:27 -0000 From: Niel van der Westhuizen <1087590@bugs.launchpad.net> Sender: bounces@canonical.com References: <20121207081524.27407.30882.malonedeb@gac.canonical.com> Message-Id: <20121208011827.16969.55328.malone@chaenomeles.canonical.com> Errors-To: bounces@canonical.com Subject: [Qemu-devel] [Bug 1087590] Re: gdbstub step instruction locks up on OS X Reply-To: Bug 1087590 <1087590@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Yes. -- = You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1087590 Title: gdbstub step instruction locks up on OS X Status in QEMU: New Bug description: OS X 10.8.2 (Darwin Niels-MacBook-Air.local 12.2.0 Darwin Kernel Version 12.2.0: Sat = Aug 25 00:48:52 PDT 2012; root:xnu-2050.18.24~1/RELEASE_X86_64 x86_64) -Only seems to occur with a drive attached -To reproduce (from current git master): ./configure --cc=3Dclang --enable-debug --disable-user --target-list=3Di3= 86-softmmu i386-softmmu/qemu-system-i386 -drive file=3D~/tmp.qcow2,index=3D0,media= =3Ddisk -s -S #wait several seconds gdb =C2=A0=C2=A0=C2=A0=C2=A0target remote localhost:1234 =C2=A0=C2=A0=C2=A0=C2=A0si #qemu locks up, requires kill -9 -Bisected it to: commit 47e6b251a5e9a47c406f2f2c0b01bb88854c98ec Author: Paolo Bonzini Date: Thu May 24 18:03:13 2012 +0200 =C2=A0=C2=A0=C2=A0=C2=A0block: switch posix-aio-compat to threadpool =C2=A0=C2=A0=C2=A0=C2=A0This is not meant for portability, but to remove = code duplication. =C2=A0=C2=A0=C2=A0=C2=A0Signed-off-by: Paolo Bonzini (cherry picking 1f001dc7bc9e435bf231a5b0edcad1c7c2bd6214, c166cb72f1676855816340666c3b618beef4b976 and 1d8ddda045b4b72dc95a325debb6df0fc19ec821 as needed to keep it building, which was kinda dodgy). -Trackback while locked up: Thread 9 (process 49143): #0 0x00007fff93dcd0fa in __psynch_cvwait () #1 0x00007fff931c0f89 in _pthread_cond_wait () #2 0x0000000100202363 in qemu_sem_timedwait (sem=3D0x1009a6678, ms=3D100= 00) at qemu-thread-posix.c:214 #3 0x000000010023017e in worker_thread (unused=3D0x0) at thread-pool.c:88 #4 0x00007fff931bc742 in _pthread_start () #5 0x00007fff931a9181 in thread_start () Thread 8 (process 49143): #0 0x00007fff93dcd0fa in __psynch_cvwait () #1 0x00007fff931c0f89 in _pthread_cond_wait () #2 0x0000000100ffab83 in g_cond_wait () #3 0x0000000100074aa5 in coroutine_wait_runnable_locked (co=3D0x1032361d= 0) at coroutine-gthread.c:133 #4 0x00000001000749fe in qemu_coroutine_switch (from_=3D0x1032361d0, to_= =3D0x103024200, action=3DCOROUTINE_YIELD) at coroutine-gthread.c:191 #5 0x00000001001f8fbc in coroutine_swap (from=3D0x1032361d0, to=3D0x1030= 24200) at qemu-coroutine.c:31 #6 0x00000001001f90b5 in qemu_coroutine_yield () at qemu-coroutine.c:74 #7 0x0000000100024238 in bdrv_co_flush (bs=3D0x104007c00) at block.c:4023 #8 0x00000001000244ae in bdrv_flush_co_entry (opaque=3D0x103480d80) at b= lock.c:3987 #9 0x000000010001d142 in bdrv_flush (bs=3D0x104007c00) at block.c:4086 #10 0x000000010003554a in qcow2_cache_flush (bs=3D0x10281e600, c=3D0x1018= 3cd60) at block/qcow2-cache.c:151 #11 0x0000000100041f69 in qcow2_co_flush_to_os (bs=3D0x10281e600) at bloc= k/qcow2.c:1559 #12 0x000000010002415a in bdrv_co_flush (bs=3D0x10281e600) at block.c:4000 #13 0x00000001000244ae in bdrv_flush_co_entry (opaque=3D0x7fff5fbfe320) a= t block.c:3987 #14 0x00000001000748a2 in coroutine_thread (opaque=3D0x1032361d0) at coro= utine-gthread.c:150 #15 0x0000000100fdf8fa in g_thread_proxy () #16 0x00007fff931bc742 in _pthread_start () #17 0x00007fff931a9181 in thread_start () Thread 7 (process 49143): #0 0x00007fff93dcd122 in __psynch_mutexwait () #1 0x00007fff931c1d9d in pthread_mutex_lock () #2 0x00007fff931c1017 in _pthread_cond_wait () #3 0x000000010020205b in qemu_cond_wait (cond=3D0x10322db90, mutex=3D0x1= 009b6640) at qemu-thread-posix.c:116 #4 0x000000010027770a in qemu_tcg_wait_io_event () at cpus.c:708 #5 0x000000010027747b in qemu_tcg_cpu_thread_fn (arg=3D0x10381d200) at c= pus.c:845 #6 0x00007fff931bc742 in _pthread_start () #7 0x00007fff931a9181 in thread_start () Thread 6 (process 49143): #0 0x00007fff93dcd57a in __sigwait () #1 0x00007fff93246e4d in sigwait () #2 0x000000010006eca9 in sigwait_compat (opaque=3D0x101c253a0) at compat= fd.c:40 #3 0x00007fff931bc742 in _pthread_start () #4 0x00007fff931a9181 in thread_start () Thread 3 (process 49143): #0 0x00007fff93dcdd16 in kevent () #1 0x00007fff8bb78dea in _dispatch_mgr_invoke () #2 0x00007fff8bb789ee in _dispatch_mgr_thread () Thread 1 (process 49143): #0 0x00007fff93dcd322 in select$DARWIN_EXTSN () #1 0x0000000100004a50 in aio_poll (ctx=3D0x101c253f0, blocking=3Dtrue) a= t aio-posix.c:230 #2 0x00000001001bb857 in qemu_aio_wait () at main-loop.c:449 #3 0x000000010001d181 in bdrv_flush (bs=3D0x10281e600) at block.c:4091 #4 0x0000000100020fc8 in bdrv_flush_all () at block.c:2685 #5 0x0000000100276642 in do_vm_stop (state=3DRUN_STATE_DEBUG) at cpus.c:= 446 #6 0x00000001002765c5 in vm_stop (state=3DRUN_STATE_DEBUG) at cpus.c:1078 #7 0x000000010026e850 in main_loop_should_exit () at vl.c:1718 #8 0x000000010026e77c in main_loop () at vl.c:1774 #9 0x0000000100268eed in qemu_main (argc=3D9, argv=3D0x7fff5fbffa40, env= p=3D0x7fff5fbffa90) at vl.c:3999 #10 0x0000000100234509 in -[QemuCocoaAppController startEmulationWithArgc= :argv:] (self=3D0x101804a90, _cmd=3D0x1003c7f05, argc=3D9, argv=3D0x7fff5fb= ffa40) at ui/cocoa.m:798 #11 0x0000000100234421 in -[QemuCocoaAppController applicationDidFinishLa= unching:] (self=3D0x101804a90, _cmd=3D0x7fff93597f79, note=3D0x101c218f0) a= t ui/cocoa.m:776 #12 0x00007fff952f647a in _CFXNotificationPost () #13 0x00007fff959f0846 in -[NSNotificationCenter postNotificationName:obj= ect:userInfo:] () #14 0x00007fff8cc6560d in -[NSApplication _postDidFinishNotification] () #15 0x00007fff8cc65346 in -[NSApplication _sendFinishLaunchingNotificatio= n] () #16 0x00007fff8cc62532 in -[NSApplication(NSAppleEventHandling) _handleAE= OpenEvent:] () #17 0x00007fff8cc6212c in -[NSApplication(NSAppleEventHandling) _handleCo= reEvent:withReplyEvent:] () #18 0x00007fff95a0a12b in -[NSAppleEventManager dispatchRawAppleEvent:wit= hRawReply:handlerRefCon:] () #19 0x00007fff95a09f8d in _NSAppleEventManagerGenericHandler () #20 0x00007fff8bc2cb48 in aeDispatchAppleEvent () #21 0x00007fff8bc2c9a9 in dispatchEventAndSendReply () #22 0x00007fff8bc2c869 in aeProcessAppleEvent () #23 0x00007fff9609d8e9 in AEProcessAppleEvent () #24 0x00007fff8cc5e916 in _DPSNextEvent () #25 0x00007fff8cc5ded2 in -[NSApplication nextEventMatchingMask:untilDate= :inMode:dequeue:] () #26 0x00007fff8cc55283 in -[NSApplication run] () #27 0x00000001002353f6 in main (argc=3D9, argv=3D0x7fff5fbffa40) at ui/co= coa.m:946 To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1087590/+subscriptions