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 1oy0qK-00026x-BW for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Nov 2022 01:15:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oy0qI-0005HF-6V for pgsql-hackers@arkaria.postgresql.org; Thu, 24 Nov 2022 01:15:54 +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 1oy0qH-0005H5-TO for pgsql-hackers@lists.postgresql.org; Thu, 24 Nov 2022 01:15:53 +0000 Received: from relay1-d.mail.gandi.net ([2001:4b98:dc4:8::221]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oy0qE-0002xf-1D for pgsql-hackers@postgresql.org; Thu, 24 Nov 2022 01:15:52 +0000 Received: (Authenticated sender: adsend@dunslane.net) by mail.gandi.net (Postfix) with ESMTPSA id A8C35240004; Thu, 24 Nov 2022 01:15:44 +0000 (UTC) Message-ID: <749edc1e-2b7d-efad-5852-fcc454c1ba64@dunslane.net> Date: Wed, 23 Nov 2022 20:15:42 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: ssl tests aren't concurrency safe due to get_free_port() Content-Language: en-US To: Tom Lane , Andres Freund Cc: pgsql-hackers@postgresql.org 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> <3617324.1669167366@sss.pgh.pa.us> From: Andrew Dunstan In-Reply-To: <3617324.1669167366@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 2022-11-22 Tu 20:36, Tom Lane wrote: > 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/build/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/build/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 = <$portfile>; >> chomp $pid; >> if ($pid +0 > 0) > I guess the <$portfile> might return undef if the file is empty? > > Yeah, should be fixed now. cheers andrew -- Andrew Dunstan EDB: https://www.enterprisedb.com