Received: from eggs.gnu.org ([2001:4830:134:3::10]:34445) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrwQd-0006YR-U1 for qemu-devel@nongnu.org; Mon, 11 May 2015 18:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YrwQb-0004bd-8C for qemu-devel@nongnu.org; Mon, 11 May 2015 18:44:03 -0400 Received: from mail-qg0-x231.google.com ([2607:f8b0:400d:c04::231]:33950) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YrwQa-0004bN-Se for qemu-devel@nongnu.org; Mon, 11 May 2015 18:44:00 -0400 Received: by qgfi89 with SMTP id i89so75990008qgf.1 for ; Mon, 11 May 2015 15:44:00 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Programmingkid In-Reply-To: <554F7124.8020900@redhat.com> Date: Mon, 11 May 2015 18:43:57 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <1D282622-B470-4916-BC6A-689EC83B1B42@gmail.com> References: <18C7C30B-DC02-4CF1-8190-EFB063692272@gmail.com> <554F7124.8020900@redhat.com> Subject: Re: [Qemu-devel] Help with deadlock when using sound List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: qemu-devel qemu-devel On May 10, 2015, at 10:54 AM, Paolo Bonzini wrote: >=20 >=20 > On 06/05/2015 18:40, Programmingkid wrote: >> When I try to use the pcspk sound hardware, QEMU freezes and uses >> 100% of the cpu time. This is the command I use: >>=20 >> qemu-system-i386 -cdrom -soundhw pcspk >>=20 >> This looks like a deadlock situation because some unknown code called >> qemu_mutex_lock(). Here is the stack trace at the freeze: >>=20 >> (gdb) bt #0 0x00007fff824e2db6 in semaphore_wait_trap () #1 >> 0x00007fff824e8417 in pthread_mutex_lock () #2 0x0000000100267199 in >> qemu_mutex_lock (mutex=3D> optimizations>) 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 > Reproduced with a FreeDOS image from QEMU Advent Calendar. It locks = up > as soon as you type "beep". >=20 > It works with the PulseAudio and ALSA backends, but it doesn't with = the > SDL backend, even on Linux. >=20 > Also, it deadlocks even with KVM enabled. >=20 > Paolo OK, I see a pattern. SDL and CoreAudio both don't support audio input. = Both of them have this code: .voice_size_in =3D 0 Alsa and PulseAudio do support audio input and work. Coincidence?=