From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HYqMC-0006oQ-2z for qemu-devel@nongnu.org; Tue, 03 Apr 2007 17:16:00 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HYqM9-0006oE-Id for qemu-devel@nongnu.org; Tue, 03 Apr 2007 17:15:58 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HYqM9-0006oB-DX for qemu-devel@nongnu.org; Tue, 03 Apr 2007 17:15:57 -0400 Received: from ug-out-1314.google.com ([66.249.92.174]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HYqIw-0008Tl-Pk for qemu-devel@nongnu.org; Tue, 03 Apr 2007 17:12:39 -0400 Received: by ug-out-1314.google.com with SMTP id j40so460634ugd for ; Tue, 03 Apr 2007 14:12:33 -0700 (PDT) Message-ID: Date: Tue, 3 Apr 2007 23:12:32 +0200 From: "andrzej zaborowski" Sender: balrogg@gmail.com MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: [Qemu-devel] SDL audio and AIO hogging each other's signals Reply-To: balrogg@gmail.com, qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, malc@pulsesoft.com 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? Regards, Andrew