[pulseaudio-discuss] And now, something is wrong with the flist implementation...
david.henningsson at canonical.com
Sat Mar 3 21:05:46 PST 2012
On 03/02/2012 04:45 PM, Tanu Kaskinen wrote:
> On Fri, 2012-03-02 at 13:49 +0100, David Henningsson wrote:
>> Instead of trying to verify the algorithm, I went to Google to look for
>> a reference implementation to compare against, and quickly found .
>> And indeed our flist looks like the one under the section "Naive
>> lock-free stack which suffers from ABA problem." on that page. :-/
>> What's worse, there does not seem to be an easy fix.
Have you ever woken up in the middle of the night with an idea of how to
solve the problem almost clear in your mind? The wikipedia page said
"tag bits" was a common workaround, using the low bits of the pointer. I
initially rejected the idea as I didn't think it would be portable
enough, but now I realise that the pointers are just indices to a table.
So I've written a patch which I post separately, please review. I've
been running my own test case for a while and seems to have succeeded so
@Eric Casteleijn, as you seem to be the only one that can reproduce this
problem somewhat reliably, would you mind trying my patch for a few days
and see if it resolves the problem? If so, I'll prepare a PPA for you to
use for testing.
David Henningsson, Canonical Ltd.
More information about the pulseaudio-discuss