[pulseaudio-discuss] Thread message queue crash

David Henningsson david.henningsson at canonical.com
Thu Sep 22 22:18:33 PDT 2011


On 09/22/2011 03:35 PM, Colin Guthrie wrote:
> 'Twas brillig, and David Henningsson at 22/09/11 12:41 did gyre and gimble:
>> I'm trying to trace down a crash:
>>
>> https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/853560
>> https://launchpadlibrarian.net/80418699/ThreadStacktrace.txt
>>
>> I'm seeing that both threads call "pa_asyncq_write_after_poll"
>> simultaneously on the same object, which is module-null-sink's
>> thread_mq->outq. The outq writes in the thread and reads from the main
>> thread. Therefore it seems like the main thread should not call
>> write_after_poll. From what I can see, there almost seems to be a typo
>> in asyncmsgq_read_cb (see suggested patch below).
>>
>> But since this is deep down, has been there for three years without
>> causing trouble in the past (for what we know), I'd like a second
>> opinion before actually applying this patch. I've just run a a quick
>> test here and it didn't seem to break anything.
>
> As well as not breaking things, does it also fix the problem case?
>
> Just from the patch posted, it does indeed look like a typo to me!

I assume this is some kind of once-in-a-million race, so it's hard to 
test it, but yes - it definitely blocks the path that leads to the bug 
(pa_asyncq_write_after_poll called by both threads).

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list