pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Jelte Fennema-Nio <postgres@jeltef.nl>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: ssl tests fail due to TCP port conflict
Date: Mon, 8 Jul 2024 15:00:00 +0300
Message-ID: <954baf13-e850-c9a8-8deb-747dd096233e@gmail.com> (raw)
In-Reply-To: <1244734.1717770345@sss.pgh.pa.us>
References: <d6ee8761-39d1-0033-1afb-d5a57ee056f2@gmail.com>
	<6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net>
	<be612e1b-ed89-0391-d3f3-657f27336a55@gmail.com>
	<adbe09a3-7782-4ba8-987b-a8498f469a17@dunslane.net>
	<914151.1717623435@sss.pgh.pa.us>
	<CAGECzQSEOPju_27T8GRnBkZp4RG9KH84boUuMdBq-caaZGDamg@mail.gmail.com>
	<da8b76a3-c59c-49c0-8c30-63a85e8ea646@dunslane.net>
	<1244734.1717770345@sss.pgh.pa.us>

Hello,

07.06.2024 17:25, Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
>> I still think my patch to force TCP mode for the SSL test makes sense as
>> well.
> +1 to both things.  If that doesn't get the failure rate down to an
> acceptable level, we can look at the retry idea.

I'd like to add that the kerberos/001_auth test also suffers from the port
conflict, but slightly differently. Look for example at [1]:
krb5kdc.log contains:
Jul 02 09:29:41 andres-postgres-buildfarm-v5 krb5kdc[471964](info): setting up network...
Jul 02 09:29:41 andres-postgres-buildfarm-v5 krb5kdc[471964](Error): Address already in use - Cannot bind server socket 
on 127.0.0.1.55853
Jul 02 09:29:41 andres-postgres-buildfarm-v5 krb5kdc[471964](Error): Failed setting up a UDP socket (for 127.0.0.1.55853)
Jul 02 09:29:41 andres-postgres-buildfarm-v5 krb5kdc[471964](Error): Address already in use - Error setting up network

As far as I can see, the port for kdc is chosen by
PostgreSQL::Test::Kerberos, via
PostgreSQL::Test::Cluster::get_free_port(), which checks only for TCP
port availability (with can_bind()), but not for UDP, so this increases
the probability of the conflict for this test (a similar failure: [2]).
Although we can also find a failure with TCP: [3]

(It's not clear to me, what processes can use UDP ports while testing,
but maybe those buildfarm animals are running on the same logical
machine simultaneously?)

[1] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=rorqual&dt=2024-07-02%2009%3A27%3A15
[2] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=mylodon&dt=2024-05-15%2001%3A25%3A07
[3] https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=grassquit&dt=2024-07-04%2008%3A28%3A19

Best regards,
Alexander





view thread (14+ messages)  latest in thread

Message-ID: <954baf13-e850-c9a8-8deb-747dd096233e@gmail.com>
Permalink:  ../954baf13-e850-c9a8-8deb-747dd096233e@gmail.com/
Also on:    postgresql.org/message-id/954baf13-e850-c9a8-8deb-747dd096233e@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: exclusion@gmail.com, tgl@sss.pgh.pa.us, andrew@dunslane.net, postgres@jeltef.nl
  Subject: Re: ssl tests fail due to TCP port conflict
  In-Reply-To: <954baf13-e850-c9a8-8deb-747dd096233e@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox