pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alexander Lakhin <exclusion@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: ssl tests fail due to TCP port conflict
Date: Wed, 5 Jun 2024 23:00:01 +0300
Message-ID: <be612e1b-ed89-0391-d3f3-657f27336a55@gmail.com> (raw)
In-Reply-To: <6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net>
References: <d6ee8761-39d1-0033-1afb-d5a57ee056f2@gmail.com>
	<6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net>

Hello Andrew,

05.06.2024 21:10, Andrew Dunstan wrote:
>
> I think I see what's going on here. It looks like it's because we start the server in unix socket mode, and then 
> switch to using TCP as well.
>
> Can you try your test with this patch applied and see if the problem persists? If we start in TCP mode the framework 
> should test for a port clash.
>

It seems that the failure rate decreased (I guess the patch rules out the
case with two servers choosing the same port), but I still got:

16/53 postgresql:ssl / ssl/001_ssltests_36         OK 15.25s   205 subtests passed
17/53 postgresql:ssl / ssl/001_ssltests_30         ERROR 3.17s   (exit status 255 or signal 127 SIGinvalid)

2024-06-05 19:40:37.395 UTC [414110] LOG:  starting PostgreSQL 17beta1 on x86_64-linux, compiled by gcc-13.2.1, 64-bit
2024-06-05 19:40:37.395 UTC [414110] LOG:  could not bind IPv4 address "127.0.0.1": Address already in use
2024-06-05 19:40:37.395 UTC [414110] HINT:  Is another postmaster already running on port 50072? If not, wait a few 
seconds and retry.

`grep '\b50072\b' -r testrun/` yields:
testrun/ssl/001_ssltests_34/log/001_ssltests_34_primary.log:2024-06-05 19:40:37.392 UTC [414111] [unknown] LOG:  
connection received: host=localhost port=50072
(a psql case)

That is, psql from the test instance 001_ssltests_34 opened a connection to
the test server with the client port 50072 and it made using the port by
the server from the test instance 001_ssltests_30 impossible.

Best regards.
Alexander





view thread (14+ messages)  latest in thread

Message-ID: <be612e1b-ed89-0391-d3f3-657f27336a55@gmail.com>
Permalink:  ../be612e1b-ed89-0391-d3f3-657f27336a55@gmail.com/
Also on:    postgresql.org/message-id/be612e1b-ed89-0391-d3f3-657f27336a55@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, andrew@dunslane.net
  Subject: Re: ssl tests fail due to TCP port conflict
  In-Reply-To: <be612e1b-ed89-0391-d3f3-657f27336a55@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