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 1oxegQ-0001UC-Sq for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Nov 2022 01:36:14 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oxegP-00046S-OK for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Nov 2022 01:36:13 +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 1oxegP-00046I-FJ for pgsql-hackers@lists.postgresql.org; Wed, 23 Nov 2022 01:36:13 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxegN-0007GL-4A for pgsql-hackers@postgresql.org; Wed, 23 Nov 2022 01:36:12 +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 2AN1a6Sj3617325; Tue, 22 Nov 2022 20:36:06 -0500 From: Tom Lane To: Andres Freund cc: Andrew Dunstan , pgsql-hackers@postgresql.org Subject: Re: ssl tests aren't concurrency safe due to get_free_port() In-reply-to: <20221123012607.pwfyln6ovjhzxlos@awork3.anarazel.de> References: <20221105183643.v2nxsac3xlb3eazi@awork3.anarazel.de> <0867ca05-ed3f-09ca-cd41-d7087e542362@dunslane.net> <20221116015105.g6qxu2ugpj6agt26@awork3.anarazel.de> <58de442f-a4fb-3980-85c8-a024ff26c54b@dunslane.net> <20221119201615.uy4rvspdq62oqikn@awork3.anarazel.de> <41ba523e-c867-2c04-3c34-d283a6ba9f7b@dunslane.net> <20221120190545.nlkqzksoo4s2vhvj@awork3.anarazel.de> <085ff9ad-de7d-511a-7f1d-995f34c8bc45@dunslane.net> <20221123012607.pwfyln6ovjhzxlos@awork3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Tue, 22 Nov 2022 17:26:07 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3617323.1669167366.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 22 Nov 2022 20:36:06 -0500 Message-ID: <3617324.1669167366@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Andres Freund writes: > While looking into a weird buildfarm failure ([1]), I noticed this: > # Checking port 62707 > Use of uninitialized value $pid in scalar chomp at /mnt/resource/bf/buil= d/grassquit/REL_11_STABLE/pgsql.build/../pgsql/src/test/perl/PostgresNode.= pm line 1247. > Use of uninitialized value $pid in addition (+) at /mnt/resource/bf/buil= d/grassquit/REL_11_STABLE/pgsql.build/../pgsql/src/test/perl/PostgresNode.= pm line 1248. Yeah, my animals are showing that too. > Not quite sure how $pid ends up uninitialized, given the code: > # see if someone else has or had a reservation of this port > my $pid =3D <$portfile>; > chomp $pid; > if ($pid +0 > 0) I guess the <$portfile> might return undef if the file is empty? regards, tom lane