Re: ssl tests aren't concurrency safe due to get_free_port()

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ssl tests aren't concurrency safe due to get_free_port()
Date: 2022-11-24 01:15:42
Message-ID: 749edc1e-2b7d-efad-5852-fcc454c1ba64@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2022-11-22 Tu 20:36, Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-11-24 01:19:16 Re: cleanup in open_auth_file
Previous Message Ted Yu 2022-11-24 01:09:22 Re: cleanup in open_auth_file