Re: pgsql: Fix deadlock hazard in CREATE INDEX CONCURRENTLY

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Jeff Janes <jeff(dot)janes(at)gmail(dot)com>, pgsql-committers(at)postgresql(dot)org, pgbuildfarm(at)jdrake(dot)com
Subject: Re: pgsql: Fix deadlock hazard in CREATE INDEX CONCURRENTLY
Date: 2018-02-24 01:59:00
Message-ID: 28821.1519437540@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

So we're still not out of the woods with that CREATE INDEX CONCURRENTLY
deadlock test. Buildfarm member okapi has failed most (not all) of its
runs since that patch went in, but only in the 9.4 branch. The failures
look like

*** /home/data/buildfarm/root.x86_64/REL9_4_STABLE/pgsql.build/src/test/isolation/expected/multiple-cic.out Thu Feb 22 02:35:05 2018
--- /home/data/buildfarm/root.x86_64/REL9_4_STABLE/pgsql.build/src/test/isolation/results/multiple-cic.out Thu Feb 22 02:44:48 2018
***************
*** 14,19 ****
--- 14,20 ----
WHERE unlck();

step s1i: <... completed>
+ error in steps s2i s1i: ERROR: deadlock detected
s1

as though the bug hadn't been fixed at all.

I have no idea what to make of this. I'd easily believe a 9.4-only bug,
but why is okapi the only critter showing it? It doesn't seem to be a
particularly unusual platform or build configuration.

I thought maybe it's a timing issue, but fooling about with altering
the timing by injecting sleeps hasn't allowed me to reproduce it here.

I do notice that okapi is running a not-very-new icc version with -O3,
opening the possibility that there's a compiler bug or at least an
undesirable optimization going on. It might be interesting to find out
if the failure is still reproducible at lower -O levels.

regards, tom lane

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-02-24 03:14:05 pgsql: Fix filtering of unsupported relations in logical replication
Previous Message Tom Lane 2018-02-23 22:20:32 pgsql: First-draft release notes for 10.3.