Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKWQM-0001BS-7n for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2020 00:12:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jKWQK-00072g-QY for pgsql-hackers@arkaria.postgresql.org; Sat, 04 Apr 2020 00:12:32 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKWQK-00072Y-JM for pgsql-hackers@lists.postgresql.org; Sat, 04 Apr 2020 00:12:32 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jKWQI-0008Gb-2a for pgsql-hackers@postgresql.org; Sat, 04 Apr 2020 00:12:31 +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 0340CFQ3031058; Fri, 3 Apr 2020 20:12:15 -0400 From: Tom Lane To: Robert Haas cc: Thomas Munro , Fabien COELHO , Alvaro Herrera , David Steele , Andres Freund , Noah Misch , Stephen Frost , Amit Kapila , Suraj Kharage , tushar , Rajkumar Raghuwanshi , Rushabh Lathia , Tels , Andrew Dunstan , PostgreSQL Hackers , Jeevan Chalke , vignesh C Subject: Re: backup manifests and contemporaneous buildfarm failures In-reply-to: References: <20200403205412.GA8279@alvherre.pgsql> <22394.1585951968@sss.pgh.pa.us> <26044.1585954081@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Fri, 03 Apr 2020 19:50:13 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <31056.1585959135.1@sss.pgh.pa.us> Date: Fri, 03 Apr 2020 20:12:15 -0400 Message-ID: <31057.1585959135@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Fri, Apr 3, 2020 at 6:48 PM Tom Lane wrote: >> I'm guessing that we're looking at a platform-specific difference in >> whether "rm -rf" fails outright on an unreadable subdirectory, or >> just tries to carry on by unlinking it anyway. > My intention was that it would be cleaned by the TAP framework itself, > since the temporary directories it creates are marked for cleanup. But > it may be that there's a platform dependency in the behavior of Perl's > File::Path::rmtree, too. Yeah, so it would seem. The buildfarm script uses rmtree to clean out the old build tree. The man page for File::Path suggests (but can't quite bring itself to say in so many words) that by default, rmtree will adjust the permissions on target directories to allow the deletion to succeed. But that's very clearly not happening on some platforms. (Maybe that represents a local patch on the part of some packagers who thought it was too unsafe?) Anyway, the end state presumably is that the pgsql.build directory is still there at the end of the buildfarm run, and the next run's attempt to also rmtree it fares no better. Then look what it does to set up the new build: system("cp -R -p $target $build_path 2>&1"); Of course, if $build_path already exists, then cp copies to a subdirectory of the target not the target itself. So that explains the symptom "./configure does not exist" --- it exists all right, but in a subdirectory below the one where the buildfarm expects it to be. It looks to me like the same problem would occur with VPATH or no. The lack of failures among the VPATH-using critters probably has more to do with whether their rmtree is willing to deal with this case than with VPATH. Anyway, it's evident that the buildfarm critters that are busted will need manual cleanup, because the script is not going to be able to get out of this by itself. I remain of the opinion that the hazard of that happening again in the future (eg, if a buildfarm animal loses power during the test) is sufficient reason to remove this test case. regards, tom lane