qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Help with deadlock when using sound


From: Programmingkid
Subject: Re: [Qemu-devel] Help with deadlock when using sound
Date: Wed, 6 May 2015 15:41:36 -0400

On May 6, 2015, at 1:00 PM, Peter Maydell wrote:

> On 6 May 2015 at 17:40, Programmingkid <address@hidden> wrote:
>> (gdb) bt
>> #0  0x00007fff824e2db6 in semaphore_wait_trap ()
>> #1  0x00007fff824e8417 in pthread_mutex_lock ()
>> #2  0x0000000100267199 in qemu_mutex_lock (mutex=<value temporarily 
>> unavailable, due to optimizations>) at util/qemu-thread-posix.c:73
>> #3  0x003c44016e95153b in ?? ()
>> 
>> 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.
>> 
>> 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.
> 
> 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=ppc-softmmu,i386-softmmu --disable-gtk 
--audio-drv-list=sdl --enable-debug

Ran like this:
qemu-system-i386 -soundhw pcspk -cdrom <cd image file>

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=1) 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=0x10062ba80, forfn=0x1003a68e2 
"sdl_callback") at audio/sdlaudio.c:101
#5  0x000000010013b7cf in sdl_callback (opaque=0x122a5d410, buf=0x10385d600 "", 
len=4096) 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=1) at exec/exec-all.h:208
#1  0x000000010000c9d7 in tb_find_slow (env=0x103846620, pc=133133655, 
cs_base=133118944, flags=244) at 
/Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:309
#2  0x000000010000cae3 in tb_find_fast (env=0x103846620) at 
/Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:327
#3  0x000000010000cf66 in cpu_x86_exec (env=0x103846620) at 
/Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:485
#4  0x000000010003978b in tcg_cpu_exec (env=0x103846620) 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=0x10383e400) 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=0x10297ca70) 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=0x100a4f880, val=4294967295) at 
util/qemu-thread-posix.c:319
#3  0x0000000100370116 in qemu_event_wait (ev=0x100a4f880) at 
util/qemu-thread-posix.c:399
#4  0x0000000100384982 in call_rcu_thread (opaque=0x0) 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=0x100630240) 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=911000) at 
main-loop.c:242
#5  0x00000001002d7317 in main_loop_wait (nonblocking=0) at main-loop.c:494
#6  0x0000000100114038 in main_loop () at vl.c:1799
#7  0x000000010011be99 in qemu_main (argc=5, argv=0x10292ffb0, envp=0x0) at 
vl.c:4385
#8  0x0000000100111799 in SDL_main (argc=5, argv=0x10292ffb0) at vl.c:47
#9  0x0000000100385400 in -[SDLMain applicationDidFinishLaunching:] 
(self=0x5fbfe75000000005, _cmd=0x10292ffb0, note=0x0) 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=43217056, argv=0x102938010) at 
SDLMain.m:377




reply via email to

[Prev in Thread] Current Thread [Next in Thread]