[pulseaudio-discuss] Bug in pa_poll?
Tanu Kaskinen
tanuk at iki.fi
Tue Mar 20 21:35:28 PDT 2012
On Sat, 2012-03-17 at 10:13 +0100, Marcel Müller wrote:
> If select() in the implementation of pa_poll returns an error because of
> an invalid socket, pa_poll tries to find out which descriptor is bad.
> And then retries the select. But this is still in not synchronized
> context. So a second descriptor may become bad on the second call to
> select. This is not captured. And consequently pa_poll fails and the
> mainloop terminates, resulting in deadlocks if further activity is on
> the way.
> It seems that I managed to trigger this problem on OS/2 from time to
> time when closing a pa_stream and a pa_context and opening another
> context at almost the same time.
>
> I would recommend to jump to the previous select() call instead of
> executing another one without error checking. To avoid infinite loops
> this should only be done if the check removed at least one descriptor.
Do you have a patch yet?
--
Tanu
More information about the pulseaudio-discuss
mailing list