[Pkg-alsa-devel] Bug#593422: openarena: Segfaults unless pulseaudio is installed and running.

Simon McVittie smcv at debian.org
Thu Aug 19 23:41:13 UTC 2010


I think I somewhat understand why this is failing now, but I don't know whose
bug it is.

> This one looks like the interesting one: it's the PA thread:
> 
> > Thread 6 (Thread 0x7fffe359e710 (LWP 1508)):
> > #0  0x00007fffe77369b0 in ?? ()
> > No symbol table info available.
> > #1  0x00007ffff574c9c7 in pa_command_request (pd=<value optimized out>, 
> >     command=<value optimized out>, tag=<value optimized out>, t=0x270edf0, 
> >     userdata=0x270a740) at pulse/stream.c:745
> 
> Here's the code:
> 
> 744    if (s->requested_bytes > 0 && s->write_callback)
> 745        s->write_callback(s, (size_t) s->requested_bytes, s->write_userdata);

The crash I'm getting is that the callbacks used by the PulseAudio plugins in
openal-soft and alsa-lib are each in the corresponding plugin. It's possible
to induce something (Pulse? ALSA? who knows) to dlclose() the plugin, causing
it to drop out of OpenArena's address space, while the Pulse thread is still
happily streaming data. The next time the Pulse thread invokes the callback,
SIGSEGV ensues.

So far I've only been able to reproduce this by setting the engine to
use "ALSA Software" for output and the default "PulseAudio Capture" for
input:

  openarena +set s_alDevice \"ALSA Software\" +set s_alCapture 1

(the quoting is strange for the Quake 3 engine's benefit, do run it exactly
as given!)

On my system, which does have PulseAudio (and ALSA configured to use it),
the resulting audio paths are:

  output: openarena -> OpenAL -> libasound -> alsa-plugins' pulse plugin
  capture: openarena <- OpenAL <- OpenAL's pulse plugin

I've been able to fix the crash by hacking alsa-lib to turn snd_dlclose()
into a no-op, or by setting s_alCapture to 0 (which disables use of a capture
device in OpenAL).

If we need a hackish workaround for squeeze, I'll set s_alDevice to the empty
string on the openarena command line, which will result in auto-detection
being repeated on every run - but that's clearly not the right solution,
and I'd rather try to fix it properly.

    Simon



More information about the Pkg-alsa-devel mailing list