Re: ssl tests fail due to TCP port conflict

From: Alexander Lakhin <exclusion(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ssl tests fail due to TCP port conflict
Date: 2024-06-05 20:00:01
Message-ID: be612e1b-ed89-0391-d3f3-657f27336a55@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2024-06-05 20:02:02 Re: Test 031_recovery_conflict fails when a conflict counted twice
Previous Message Nathan Bossart 2024-06-05 19:18:47 Re: Better error message when --single is not the first arg to postgres executable