[Openal] OpenAL Soft 1.10 will be sooner than expected

Chris Robinson chris.kcat at gmail.com
Fri Oct 30 08:13:31 PDT 2009


On Friday 30 October 2009 6:32:07 am Ludwig Nussel wrote:
> Ludwig Nussel wrote:
> > Also 1.9 aborts with an invalid free when exiting ioquake3. Looks
> > like
> > pulse_close is called with the same pointer twice, once for playback
> > and then for capture.

A capture device shouldn't be able to have the same handle as a playback 
device, and there shouldn't be a way for an invalid/recently closed device 
handle to be closed again. The close function would error.

It would be more likely that there's something in the pulse backend that isn't 
properly set up, so closing it may try to free something it shouldn't. I'll 
try to check it out to see if it happens here in the latest GIT.

FWIW, one of the issues with 1.9 was that exiting an app would print out the 
error:
Inconsistency detected by ld.so: dl-close.c: 731: _dl_close: Assertion
`map->l_init_called' failed!

I never found what caused it (probably dlclose getting called with a bad 
handle), but it doesn't seem to happen anymore with the latest GIT.

> Wrt locking, guess this change to openal-soft was made to avoid the
>  deadlock:
>  http://repo.or.cz/w/openal-soft.git?a=commitdiff;h=617b6728d3bf4f3922f8770
> 2260d848b9ae88340

Yup.

> And this change in pulseaudio causes the deadlock:
> http://git.0pointer.de/?p=pulseaudio.git;a=commitdiff;h=4f5e2b745ea357e2b5c
> 815ff33a556505a7d1f18
> If I apply the reverse change of that to pulseaudio
>  0.9.19 openal-soft 1.8.466 doesn't lock up anymore. I wonder if the
>  openal-soft code actually was buggy or this change to pulseaudio is.
> CC'd Lennart

That looks like it. The issue was that pa_context_connect/pa_stream_connect 
would synchronously call the state change callback to set it to 'connecting', 
where pa_threaded_mainloop_signal would be called to wait for acceptance of 
the state change. But since that same thread is what's used to accept the 
signal, it could never be accepted.

> Still investigating which change caused openal-soft to not play sound
> anymore...

According to another person that uses PulseAudio, SecondLife stopped playing 
sound for him in 1.9 and a GIT bisect named this as the first bad commit:
http://repo.or.cz/w/openal-
soft.git?a=commitdiff;h=bdbdbcea26d4a12d4d3f76ad3724f2ad12a55358

Reverting that doesn't fix it for me, however as I said, I seem to have other 
issues with PulseAudio playing sound, so it may or may not work for others. 
It's odd though, since the main changes were setting fragsize to -1, which it 
should be anyway since the docs say it's unused for playback, and setting 
minreq to the update size which should be completely valid.


More information about the Openal mailing list