Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qscof-008i6V-Kp for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Oct 2023 05:40:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qscod-006eJu-If for pgsql-hackers@arkaria.postgresql.org; Tue, 17 Oct 2023 05:40:28 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qscod-006eJm-94 for pgsql-hackers@lists.postgresql.org; Tue, 17 Oct 2023 05:40:27 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qscoX-000roY-40 for pgsql-hackers@lists.postgresql.org; Tue, 17 Oct 2023 05:40:26 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 39H5eIRd2659916; Tue, 17 Oct 2023 01:40:18 -0400 From: Tom Lane To: Noah Misch cc: Thomas Munro , Michael Paquier , Vik Fearing , cary huang , pgsql-hackers@lists.postgresql.org Subject: Re: Add support for AT LOCAL In-reply-to: <20231016060510.72@rfd.leadboat.com> References: <2188264.1697425365@sss.pgh.pa.us> <2191749.1697427017@sss.pgh.pa.us> <20231016045804.c0@rfd.leadboat.com> <20231016055051.3a@rfd.leadboat.com> <2208907.1697435663@sss.pgh.pa.us> <20231016060510.72@rfd.leadboat.com> Comments: In-reply-to Noah Misch message dated "Sun, 15 Oct 2023 23:05:10 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2659914.1697521218.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 17 Oct 2023 01:40:18 -0400 Message-ID: <2659915.1697521218@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Noah Misch writes: > On Mon, Oct 16, 2023 at 01:54:23AM -0400, Tom Lane wrote: >> Ugh. So if the failure is robust enough to persist across >> several major xlc versions, why couldn't Thomas reproduce it? > Beats me. hornet wipes its starting environment down to OBJECT_MODE=3D3= 2_64 > PERL5LIB=3D/home/nm/sw/cpan64/lib/perl5 SPECIES=3Dxlc64 PATH=3D/usr/bin,= then > applies all the environment settings seen in buildfarm logs. I was able to reproduce the failure on cfarm111 after adopting these settings from hornet's configuration: export OBJECT_MODE=3D64 export CC=3D'xlc_r -D_LARGE_FILES=3D1 ' export CFLAGS=3D'-O2 -qmaxmem=3D33554432 -qsuppress=3D1500-010:1506-995 -q= suppress=3D1506-010:1506-416:1506-450:1506-480:1506-481:1506-492:1506-944:= 1506-1264 -qinfo=3Dall:nocnd:noeff:noext:nogot:noini:noord:nopar:noppc:nor= ea:nouni:nouse -qsuppress=3D1506-374:1506-419:1506-434:1506-438:1506-451:1= 506-452:1506-453:1506-495:1506-786' and doing ./configure --enable-cassert --enable-debug --without-icu --prefix=3D/home= /tgl/testversion etc etc. It is absolutely, gold-platedly, a compiler bug, because inserting a debug printf into the loop while (result->time >=3D USECS_PER_DAY) result->time -=3D USECS_PER_DAY; makes the failure go away. Unfortunately, I've not yet found another way to make it go away :-(. My upthread idea of using a local variable instead of result->time is no help, and some other random code alterations didn't change the results either. Not sure where we go from here. While I don't have much hesitation about blowing off xlc_r 12.1, it would be sad if their latest toolchain doesn't work either. (I didn't try permuting the code while using the newer compiler, though.) regards, tom lane