Re: Our "fallback" atomics implementation doesn't actually work

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Our "fallback" atomics implementation doesn't actually work
Date: 2016-10-05 18:34:02
Message-ID: 20161005183402.6veikn2ajr52vosy@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message reiner peterke 2016-10-05 18:41:54 Kernel Tainted
Previous Message Tom Lane 2016-10-05 18:22:37 Re: Our "fallback" atomics implementation doesn't actually work