Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1epP7Q-0007SI-Ap for pgsql-committers@arkaria.postgresql.org; Sat, 24 Feb 2018 01:59:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1epP7N-0000BE-IS for pgsql-committers@arkaria.postgresql.org; Sat, 24 Feb 2018 01:59:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1epP7N-0000B1-Dt for pgsql-committers@lists.postgresql.org; Sat, 24 Feb 2018 01:59:17 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1epP7F-0001L1-9X for pgsql-committers@postgresql.org; Sat, 24 Feb 2018 01:59:16 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w1O1x0un028822; Fri, 23 Feb 2018 20:59:00 -0500 From: Tom Lane To: Alvaro Herrera cc: Andres Freund , Jeff Janes , pgsql-committers@postgresql.org, pgbuildfarm@jdrake.com Subject: Re: pgsql: Fix deadlock hazard in CREATE INDEX CONCURRENTLY In-reply-to: <23413.1515008794@sss.pgh.pa.us> References: <20180103193728.ysqpcp2xjnqpiep7@alvherre.pgsql> <23413.1515008794@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Wed, 03 Jan 2018 14:46:34 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <28820.1519437540.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Fri, 23 Feb 2018 20:59:00 -0500 Message-ID: <28821.1519437540@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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/is= olation/expected/multiple-cic.out Thu Feb 22 02:35:05 2018 --- /home/data/buildfarm/root.x86_64/REL9_4_STABLE/pgsql.build/src/test/is= olation/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