From: Tom Lane <tgl@sss.pgh.pa.us>
To: andres@anarazel.de
Cc: Justin Pryzby <pryzby@telsasoft.com>
Cc: pgsql-general@postgresql.org
Subject: Re: backends stuck in "startup"
Date: Tue, 21 Nov 2017 19:02:01 -0500
Message-ID: <7806.1511308921@sss.pgh.pa.us> (raw)
In-Reply-To: <20171121235239.5ssxkvmfwvhxavsm@alap3.anarazel.de>
References: <20171121230926.GA17194@telsasoft.com>
<6177.1511306476@sss.pgh.pa.us>
<20171121234558.p7rtwkasqfjvpft4@alap3.anarazel.de>
<7332.1511308205@sss.pgh.pa.us>
<20171121235239.5ssxkvmfwvhxavsm@alap3.anarazel.de>
andres@anarazel.de (Andres Freund) writes:
> On 2017-11-21 18:50:05 -0500, Tom Lane wrote:
>> (If Justin saw that while still on 9.6, then it'd be worth looking
>> closer.)
> Right. I took this to be referring to something before the current
> migration, but I might have overinterpreted things. There've been
> various forks/ports of pg around that had hand-coded replacements with
> futex usage, and there were definitely buggy versions going around a few
> years back.
Poking around in the archives reminded me of this thread:
https://www.postgresql.org/message-id/flat/14947.1475690465@sss.pgh.pa.us
which describes symptoms uncomfortably close to what Justin is showing.
I remember speculating that the SysV-sema implementation, because it'd
always enter the kernel, would provide some memory barrier behavior
that POSIX-sema code based on futexes might miss when taking the no-wait
path. I'd figured that any real problems of that sort would show up
pretty quickly, but that could've been over optimistic. Maybe we need
to take a closer look at where LWLocks devolve to blocking on the process
semaphore and see if there's any implicit assumptions about barriers there.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, pryzby@telsasoft.com
Subject: Re: backends stuck in "startup"
In-Reply-To: <7806.1511308921@sss.pgh.pa.us>
References: <20171121230926.GA17194@telsasoft.com> <6177.1511306476@sss.pgh.pa.us> <20171121234558.p7rtwkasqfjvpft4@alap3.anarazel.de> <7332.1511308205@sss.pgh.pa.us> <20171121235239.5ssxkvmfwvhxavsm@alap3.anarazel.de> <7806.1511308921@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox