|
From: | Programmingkid |
Subject: | Re: [Qemu-devel] Help with deadlock when using sound |
Date: | Wed, 6 May 2015 17:30:45 -0400 |
Here is the back trace of qemu-system-i386 after it has frozen. This time I used cocoa and coreaudio. Configuration commands: --target-list=ppc-softmmu,i386-softmmu --disable-sdl --disable-gtk --enable-debug Run commands: qemu-system-i386 -cdrom <cd image file> -soundhw pcspk My only theory right now has to do with pthread_mutex_init(). When pthread_mutex_init() is called, it is given NULL as an attribute. This means to use the default attributes. The default attribute on Linux and on Mac OS X are probably different. That might be why we see this problem on Mac OS X. The code is found in qemu-thread-posix.c. Here it is: void qemu_mutex_init(QemuMutex *mutex) { int err; err = pthread_mutex_init(&mutex->lock, NULL); if (err) error_exit(err, __func__); } The full back trace: Thread 10 (process 34926): #0 0x00007fff824e2dda in semaphore_timedwait_signal_trap () #1 0x00007fff82521772 in _pthread_cond_wait () #2 0x00007fff8423468c in CAGuard::WaitFor () #3 0x00007fff84236c1b in CAGuard::WaitUntil () #4 0x00007fff84234d85 in HP_IOThread::WorkLoop () #5 0x00007fff84234827 in HP_IOThread::ThreadEntry () #6 0x00007fff84234755 in CAPThread::Entry () #7 0x00007fff8251bfd6 in _pthread_start () #8 0x00007fff8251be89 in thread_start () Thread 8 (process 34926): #0 0x000000010000cae1 in tb_find_fast (env=0x102099820) at /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:325 #1 0x000000010000cfd6 in cpu_x86_exec (env=0x102099820) at /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpu-exec.c:485 #2 0x00000001000397fb in tcg_cpu_exec (env=0x102099820) at /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1354 #3 0x00000001000398e8 in tcg_exec_all () at /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1387 #4 0x0000000100038e5c in qemu_tcg_cpu_thread_fn (arg=0x102091600) at /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1032 #5 0x00007fff8251bfd6 in _pthread_start () #6 0x00007fff8251be89 in thread_start () Thread 7 (process 34926): #0 0x00007fff8251da6a in __semwait_signal () #1 0x00007fff82521881 in _pthread_cond_wait () #2 0x000000010036bfb7 in qemu_sem_timedwait (sem=0x101e34cc0, ms=10000) at util/qemu-thread-posix.c:229 #3 0x00000001002c5e3a in worker_thread (opaque=0x101e34c40) at thread-pool.c:92 #4 0x00007fff8251bfd6 in _pthread_start () #5 0x00007fff8251be89 in thread_start () Thread 6 (process 34926): #0 0x00007fff8254499e in __sigwait () #1 0x00007fff82544977 in sigwait () #2 0x0000000100370038 in sigwait_compat (opaque=0x101993ad0) at util/compatfd.c:36 #3 0x00007fff8251bfd6 in _pthread_start () #4 0x00007fff8251be89 in thread_start () Thread 3 (process 34926): #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 34926): #0 0x00007fff8251da6a in __semwait_signal () #1 0x00007fff82521881 in _pthread_cond_wait () #2 0x000000010036c134 in futex_wait (ev=0x100aa14c0, val=4294967295) at util/qemu-thread-posix.c:319 #3 0x000000010036c2ae in qemu_event_wait (ev=0x100aa14c0) at util/qemu-thread-posix.c:399 #4 0x0000000100380b22 in call_rcu_thread (opaque=0x0) at util/rcu.c:233 #5 0x00007fff8251bfd6 in _pthread_start () #6 0x00007fff8251be89 in thread_start () Thread 1 (process 34926): #0 0x00007fff824e2dc2 in semaphore_wait_signal_trap () #1 0x00007fff824e840d in pthread_mutex_lock () #2 0x000000010036bb92 in qemu_mutex_lock (mutex=0x100681f80) at util/qemu-thread-posix.c:73 #3 0x00000001000390aa in qemu_mutex_lock_iothread () at /Users/user/Documents/Development/Projects/Qemu/qemu-git/cpus.c:1128 #4 0x00000001002d33ea in os_host_main_loop_wait (timeout=9942000) at main-loop.c:242 #5 0x00000001002d34af in main_loop_wait (nonblocking=0) at main-loop.c:494 #6 0x0000000100114081 in main_loop () at vl.c:1799 #7 0x000000010011bb7e in qemu_main (argc=5, argv=0x7fff5fbff440, envp=0x7fff5fbff470) at vl.c:4385 #8 0x00000001002a46d9 in -[QemuCocoaAppController startEmulationWithArgc:argv:] (self=0x101e007b0, _cmd=0x1003f2e1e, argc=5, argv=0x7fff5fbff440) at cocoa.m:897 #9 0x00000001002a4532 in -[QemuCocoaAppController applicationDidFinishLaunching:] (self=0x101e007b0, _cmd=0x7fff8064d906, note=0x101e32bf0) at cocoa.m:875 #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 0x00000001002a548a in main (argc=5, argv=0x7fff5fbff440) at cocoa.m:1034 |
[Prev in Thread] | Current Thread | [Next in Thread] |