Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYubp-000465-PI for qemu-devel@nongnu.org; Tue, 03 Apr 2007 21:48:25 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYubo-00043i-6O for qemu-devel@nongnu.org; Tue, 03 Apr 2007 21:48:25 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYubn-00043K-Va for qemu-devel@nongnu.org; Tue, 03 Apr 2007 21:48:24 -0400 Received: from eastrmmtao103.cox.net ([68.230.240.9]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HYuYa-0006NZ-OA for qemu-devel@nongnu.org; Tue, 03 Apr 2007 21:45:04 -0400 Message-ID: <18986840.1175651099941.JavaMail.root@eastrmwml04.mgt.cox.net> Date: Tue, 3 Apr 2007 21:44:59 -0400 From: Ben Taylor Subject: Re: [Qemu-devel] SDL audio and AIO hogging each other's signals MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Reply-To: sol10x86@cox.net, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: balrogg@gmail.com, qemu-devel@nongnu.org Cc: andrzej zaborowski ---- andrzej zaborowski wrote: > Hi, > with QEMU_AUDIO_DRV set to "sdl" and booting from CD-ROM with AIO on > a Linux host and with SDL 1.2.11, qemu locks up in sigwait() (the main > thread) and SDL_SemWait() (the audio thread) as soon as music is > playing and CD-ROM is being read at the same time. It appears that > audio/sdlaudio.c:sdl_callback is called by SDL when it shouldn't be > called, and block-raw.c is trying to flush the AIO operations, so it > would seem that the SIGUSR2 which is intended to wake up the sigwait > is instead captured by SDL and SDL tries to be smart and calls > sdl_callback. sdl_callback has a sanity check but this check is > *after* SDL_SemWait() so it is not triggered. The strange thing is > that using a different signal (tried SIGUSR1 and SIGPOLL) for AIO > doesn't help. Does SDL catch all signals? > I could be totally wrong because I don't know SDLAudio at all. > > Any ideas about the exact reason why this is happening and how to fix it? On Solaris 10/11 x86, I was seeing a bunch of semphore errors emitted from SDL when using SDL audio. I'll track this down and report back. Ben