Received: from eggs.gnu.org ([2001:4830:134:3::10]:53428) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq5CR-0000lm-2l for qemu-devel@nongnu.org; Wed, 06 May 2015 15:41:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq5CN-0008Ch-Pr for qemu-devel@nongnu.org; Wed, 06 May 2015 15:41:43 -0400 Received: from mail-qc0-x230.google.com ([2607:f8b0:400d:c01::230]:33043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq5CN-0008Cb-Jh for qemu-devel@nongnu.org; Wed, 06 May 2015 15:41:39 -0400 Received: by qctx5 with SMTP id x5so10338259qct.0 for ; Wed, 06 May 2015 12:41:39 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: Date: Wed, 6 May 2015 15:41:36 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <18C7C30B-DC02-4CF1-8190-EFB063692272@gmail.com> Subject: Re: [Qemu-devel] Help with deadlock when using sound List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel qemu-devel On May 6, 2015, at 1:00 PM, Peter Maydell wrote: > On 6 May 2015 at 17:40, Programmingkid = wrote: >> (gdb) bt >> #0 0x00007fff824e2db6 in semaphore_wait_trap () >> #1 0x00007fff824e8417 in pthread_mutex_lock () >> #2 0x0000000100267199 in qemu_mutex_lock (mutex=3D) at util/qemu-thread-posix.c:73 >> #3 0x003c44016e95153b in ?? () >>=20 >> My host is Mac OS 10.6.8. My guest isn't really anything. I have used = Windows XP before but it isn't necessary to reproduce the problem. >>=20 >> The ?? is what appears to be the problem. I can't even print = instructions at that address. Any ideas as to what is calling the = qemu_mutex_lock() function could help. >=20 > Recompile with optimization disabled and try again. It would > also be helpful to provide the backtraces for all threads. Here is my info: Configured like this: configure --target-list=3Dppc-softmmu,i386-softmmu --disable-gtk = --audio-drv-list=3Dsdl --enable-debug Ran like this: qemu-system-i386 -soundhw pcspk -cdrom The cd image file does not matter, since QEMU freezes so quickly in the = boot process. This freeze issue also happens when using the coreaudio. Where all the threads stopped at: 11 0x00007fff824fca2a in = __workq_kernreturn () 10 0x00007fff8251da6a in = __semwait_signal () 8 tb_jmp_cache_hash_func (pc=3D1) at = exec/exec-all.h:208 6 0x00007fff8254499e in __sigwait () 3 "com.apple.libdispatch-manager" 0x00007fff824fbc0a in kevent () 2 0x00007fff8251da6a in = __semwait_signal () * 1 "com.apple.main-thread" 0x00007fff824e2dc2 in = semaphore_wait_signal_ Full backtrace of all threads: Thread 11 (process 29237): #0 0x00007fff824fca2a in __workq_kernreturn () #1 0x00007fff824fce3c in _pthread_wqthread () #2 0x00007fff824fcaa5 in start_wqthread () Thread 10 (process 29237): #0 0x00007fff8251da6a in __semwait_signal () #1 0x00007fff82521881 in _pthread_cond_wait () #2 0x00000001010602ce in SDL_CondWaitTimeout () #3 0x000000010105ffbf in SDL_SemWaitTimeout () #4 0x000000010013b3e4 in sdl_wait (s=3D0x10062ba80, forfn=3D0x1003a68e2 = "sdl_callback") at audio/sdlaudio.c:101 #5 0x000000010013b7cf in sdl_callback (opaque=3D0x122a5d410, = buf=3D0x10385d600 "", len=3D4096) at audio/sdlaudio.c:247 #6 0x000000010106084f in audioCallback () #7 0x0000000122c2017a in basic_engine_core_text_type () #8 0x0000000122c2023d in basic_engine_core_text_type () #9 0x00007fff852ea8b4 in AudioConverterChain::CallInputProc () #10 0x00007fff852ea462 in AudioConverterChain::FillBufferFromInputProc = () #11 0x00007fff852ea3e4 in BufferedAudioConverter::GetInputBytes () #12 0x00007fff852ea2a7 in CBRConverter::RenderOutput () #13 0x00007fff852ea027 in BufferedAudioConverter::FillBuffer () #14 0x00007fff852ea198 in AudioConverterChain::RenderOutput () #15 0x00007fff852ea027 in BufferedAudioConverter::FillBuffer () #16 0x00007fff852e9da3 in AudioConverterFillComplexBuffer () #17 0x0000000122c202f7 in basic_engine_core_text_type () #18 0x0000000122c1f95a in basic_engine_core_text_type () #19 0x0000000122c1e323 in basic_engine_core_text_type () #20 0x0000000122c1d45c in basic_engine_core_text_type () #21 0x0000000122c22fd0 in AUGenericOutputEntry () #22 0x00007fff8423733d in HP_IOProc::Call () #23 0x00007fff8423710f in IOA_Device::CallIOProcs () #24 0x00007fff84236f45 in HP_IOThread::PerformIO () #25 0x00007fff84234f54 in HP_IOThread::WorkLoop () #26 0x00007fff84234827 in HP_IOThread::ThreadEntry () #27 0x00007fff84234755 in CAPThread::Entry () #28 0x00007fff8251bfd6 in _pthread_start () #29 0x00007fff8251be89 in thread_start () Thread 8 (process 29237): #0 tb_jmp_cache_hash_func (pc=3D1) at exec/exec-all.h:208 #1 0x000000010000c9d7 in tb_find_slow (env=3D0x103846620, pc=3D133133655,= cs_base=3D133118944, flags=3D244) at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:309 #2 0x000000010000cae3 in tb_find_fast (env=3D0x103846620) at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:327 #3 0x000000010000cf66 in cpu_x86_exec (env=3D0x103846620) at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:485 #4 0x000000010003978b in tcg_cpu_exec (env=3D0x103846620) at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1354 #5 0x0000000100039878 in tcg_exec_all () at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1387 #6 0x0000000100038dec in qemu_tcg_cpu_thread_fn (arg=3D0x10383e400) at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1032 #7 0x00007fff8251bfd6 in _pthread_start () #8 0x00007fff8251be89 in thread_start () Thread 6 (process 29237): #0 0x00007fff8254499e in __sigwait () #1 0x00007fff82544977 in sigwait () #2 0x0000000100373ea0 in sigwait_compat (opaque=3D0x10297ca70) at = util/compatfd.c:36 #3 0x00007fff8251bfd6 in _pthread_start () #4 0x00007fff8251be89 in thread_start () Thread 3 (process 29237): #0 0x00007fff824fbc0a in kevent () #1 0x00007fff824fdadd in _dispatch_mgr_invoke () #2 0x00007fff824fd7b4 in _dispatch_queue_invoke () #3 0x00007fff824fd2de in _dispatch_worker_thread2 () #4 0x00007fff824fcc08 in _pthread_wqthread () #5 0x00007fff824fcaa5 in start_wqthread () Thread 2 (process 29237): #0 0x00007fff8251da6a in __semwait_signal () #1 0x00007fff82521881 in _pthread_cond_wait () #2 0x000000010036ff9c in futex_wait (ev=3D0x100a4f880, val=3D4294967295) = at util/qemu-thread-posix.c:319 #3 0x0000000100370116 in qemu_event_wait (ev=3D0x100a4f880) at = util/qemu-thread-posix.c:399 #4 0x0000000100384982 in call_rcu_thread (opaque=3D0x0) at = util/rcu.c:233 #5 0x00007fff8251bfd6 in _pthread_start () #6 0x00007fff8251be89 in thread_start () Thread 1 (process 29237): #0 0x00007fff824e2dc2 in semaphore_wait_signal_trap () #1 0x00007fff824e840d in pthread_mutex_lock () #2 0x000000010036f9fa in qemu_mutex_lock (mutex=3D0x100630240) at = util/qemu-thread-posix.c:73 #3 0x000000010003903a in qemu_mutex_lock_iothread () at = /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1128 #4 0x00000001002d7252 in os_host_main_loop_wait (timeout=3D911000) at = main-loop.c:242 #5 0x00000001002d7317 in main_loop_wait (nonblocking=3D0) at = main-loop.c:494 #6 0x0000000100114038 in main_loop () at vl.c:1799 #7 0x000000010011be99 in qemu_main (argc=3D5, argv=3D0x10292ffb0, = envp=3D0x0) at vl.c:4385 #8 0x0000000100111799 in SDL_main (argc=3D5, argv=3D0x10292ffb0) at = vl.c:47 #9 0x0000000100385400 in -[SDLMain applicationDidFinishLaunching:] = (self=3D0x5fbfe75000000005, _cmd=3D0x10292ffb0, note=3D0x0) at = SDLMain.m:300 #10 0x00007fff8a50dbc5 in _nsnote_callback () #11 0x00007fff83a7b000 in __CFXNotificationPost () #12 0x00007fff83a67578 in _CFXNotificationPostNotification () #13 0x00007fff8a504b26 in -[NSNotificationCenter = postNotificationName:object:userInfo:] () #14 0x00007fff80a1c44a in -[NSApplication _postDidFinishNotification] () #15 0x00007fff80a1c37f in -[NSApplication = _sendFinishLaunchingNotification] () #16 0x00007fff80ae735d in -[NSApplication(NSAppleEventHandling) = _handleAEOpen:] () #17 0x00007fff80ae6fd9 in -[NSApplication(NSAppleEventHandling) = _handleCoreEvent:withReplyEvent:] () #18 0x00007fff8a53c1c6 in -[NSAppleEventManager = dispatchRawAppleEvent:withRawReply:handlerRefCon:] () #19 0x00007fff8a53bff6 in _NSAppleEventManagerGenericHandler () #20 0x00007fff84a6f32b in aeDispatchAppleEvent () #21 0x00007fff84a6f224 in dispatchEventAndSendReply () #22 0x00007fff84a6f12b in aeProcessAppleEvent () #23 0x00007fff87300619 in AEProcessAppleEvent () #24 0x00007fff809ec095 in _DPSNextEvent () #25 0x00007fff809eb801 in -[NSApplication = nextEventMatchingMask:untilDate:inMode:dequeue:] () #26 0x00007fff809b168f in -[NSApplication run] () #27 0x0000000100385214 in CustomApplicationMain [inlined] () at :227 #28 0x0000000100385214 in main (argc=3D43217056, argv=3D0x102938010) at = SDLMain.m:377