qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] SDL audio and AIO hogging each other's signals
@ 2007-04-03 21:12 andrzej zaborowski
  2007-04-03 21:56 ` [Qemu-devel] " malc
  0 siblings, 1 reply; 6+ messages in thread
From: andrzej zaborowski @ 2007-04-03 21:12 UTC (permalink / raw)
  To: qemu-devel, malc

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

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [Qemu-devel] SDL audio and AIO hogging each other's signals
@ 2007-04-04  1:44 Ben Taylor
  0 siblings, 0 replies; 6+ messages in thread
From: Ben Taylor @ 2007-04-04  1:44 UTC (permalink / raw)
  To: balrogg, qemu-devel; +Cc: andrzej zaborowski


---- andrzej zaborowski <balrog@zabor.org> 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2007-04-04 12:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-03 21:12 [Qemu-devel] SDL audio and AIO hogging each other's signals andrzej zaborowski
2007-04-03 21:56 ` [Qemu-devel] " malc
2007-04-04  8:26   ` andrzej zaborowski
2007-04-04 11:49     ` malc
2007-04-04 12:23       ` andrzej zaborowski
  -- strict thread matches above, loose matches on Subject: below --
2007-04-04  1:44 [Qemu-devel] " Ben Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).