Re: Our "fallback" atomics implementation doesn't actually work - Mailing list pgsql-hackers

From Andres Freund
Subject Re: Our "fallback" atomics implementation doesn't actually work
Date
Msg-id 20161005183402.6veikn2ajr52vosy@alap3.anarazel.de
Whole thread Raw
In response to Our "fallback" atomics implementation doesn't actually work  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Our "fallback" atomics implementation doesn't actually work  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I was able to reproduce it in a read-write workload, instead of the
read-only workload you'd proposed.

On 2016-10-05 14:01:05 -0400, Tom Lane wrote:
> Curiously, I did not see such a hang with regular SysV semaphores.
> That may be just a timing thing, or it may have something to do with
> POSIX semaphores being actually futexes on this platform (so that there
> is state inside the process not outside it).

Without yet having analyzed this deeply, could it actually be that the
reason is that sem_post/wait aren't proper memory barriers?  On a glance
the symptoms look like values have been modified without proper locks...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Our "fallback" atomics implementation doesn't actually work
Next
From: reiner peterke
Date:
Subject: Kernel Tainted