Skip to contentSkip to conversation

SDL audio and AIO hogging each other's signals

Qemu-devel Ben Taylor 1 participant 1 message Apr 4, 2007

lore
Share & tools
lore

Ben Taylor

author
#0 lore raw
Quoted 15 lines · ---- andrzej zaborowski

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.

Quoted 1 line

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