(You didn't cc me or the bug, so I didn't see this until I tried replying
with bts show --mbox to attach a proposed patch; please cc bugs and submitters
if you expect a response :-)

On Fri, 20 Aug 2010 at 23:56:02 +0200, Elimar Riesebieter wrote:
> There are already bugs in thet ALSA-BTS. So what do you expect?
> Another forward? I've tested openarena on my ppc-box and can't
> reproduce.....

I suggested removing the call to snd_dlobj_cache_cleanup(); I've now tested
this and confirmed that it works, see attached (trivial) patch.

There seem to be quite a few preconditions for the crash, since it's a bad
interaction between several layers of libraries and plugins. I can reproduce it
in sid with libpulse0 and libportaudio2 installed, pulseaudio running, ALSA
configured to use the pulse backend by default, the default OpenAL
configuration, and the following OpenArena command line:

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

Note the strange quoting (because the command line is parsed once by the shell
then again by the Quake 3 engine), and that PortAudio is necessary to tickle
this bug; most other users of ALSA don't seem to call
snd_config_update_free_global(), possibly because this bug makes it unusable
for them.

This configuration may seem rather contrived, but it's surprisingly easy to get
by just upgrading things, because the Quake 3 engine auto-detects audio
devices, saves the chosen audio device in user configuration, and repeats
auto-detection if the saved or configured device no longer works.
The crash I originally reported was arrived at by upgrading, and Jordan
Metzmeier has seen a similar crash by running OA without PulseAudio
installed, with leftover configuration from when he previously did have it.

I can confirm that after reverting the other possible workarounds I've tried,
the OpenArena crash still occurs, but the attached patch prevents the crash
for me, with the "cost" that calling snd_config_update_free_global() no longer
unloads the plugins (but from its name and documentation, I wouldn't expect
it to do that anyway).

See the mail with which I reassigned to you for some other possible
ways to resolve this crash, if you don't think this is an ALSA bug.

    Simon
From e383edd06fbfc245549bc0845417a79fa700d448 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Sat, 21 Aug 2010 18:27:10 +0100
Subject: [PATCH] snd_config_update_free_global: don't call snd_dlobj_cache_cleanup

This has caused crashes in at least OpenArena (when probing the
PortAudio backend for OpenAL) and Ekiga (which uses PortAudio).

Origin: vendor, Debian
Bug: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=2124
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589896
Forwarded: no
---
 src/conf.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/src/conf.c b/src/conf.c
index 570c90f..8b7a157 100644
--- a/src/conf.c
+++ b/src/conf.c
@@ -3751,8 +3751,6 @@ int snd_config_update_free_global(void)
 #ifdef HAVE_LIBPTHREAD
 	pthread_mutex_unlock(&snd_config_update_mutex);
 #endif
-	/* FIXME: better to place this in another place... */
-	snd_dlobj_cache_cleanup();
 
 	return 0;
 }
-- 
1.7.1

Attachment: signature.asc
Description: Digital signature

Reply via email to