Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEwnq-005Bsx-Q5 for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Jun 2024 20:00:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1sEwno-00B9g9-Kk for pgsql-hackers@arkaria.postgresql.org; Wed, 05 Jun 2024 20:00:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1sEwno-00B9g1-7v for pgsql-hackers@lists.postgresql.org; Wed, 05 Jun 2024 20:00:08 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sEwnl-000AYr-2V for pgsql-hackers@postgresql.org; Wed, 05 Jun 2024 20:00:07 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-52b962c4bb6so322781e87.3 for ; Wed, 05 Jun 2024 13:00:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717617603; x=1718222403; darn=postgresql.org; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=RGMxsGERd95qcfN1FBnMmD9yn+D6PdIjbUMYYYAN61I=; b=MnndRJ5k49DZkm9eSjXDeqg/ullVT1aBs2ft73en7UNH3JIf8SypFn6fWEcgkb5daU wNb/A4+ysxlK3JCg6A/G6QyFHtLMw2E8NL6VrHaBOu0xAb5KonASlp1JaCJ+26g1EgX5 EWwc0kvRphdCCUFcpDIC8mR341Z/3cqs5fi+tYoRI83GA9cY+a8pkpS01hDp8f0B9qsp OAMs0cNHwRvFEfKBQc5HqyLAB6nKgHxejqqY4MORNOEDyxmijWnbpt/SKI6Y4iFUVd3o 2nX8r1RqcvlLVWbgb19iOHMn7IhEP3HNtftu4FbknQfpDYIe6Tsqbq9+YjwW6914ayDC styA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717617603; x=1718222403; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=RGMxsGERd95qcfN1FBnMmD9yn+D6PdIjbUMYYYAN61I=; b=MTQ/1qAIvbFAvRL4IjsaQUnEnytb1J2fFoDjYEvidv1S3bRF3EYBz2P3mdutPPZ7Q6 j6TQ8Cyf09SFv2pZ9AE+OD0ujc1tWSegU0e8mymxHRVUicJqY2qVSGJt34NSsYvw9CR+ WZ/7Y40yz+xpat+5Uh1e1W9MG03ziSJ27qZ9dDwHH5pj+AzpODFbousb8+OyfL3XscQn Y15UDYcWuOno8GrRxFOjLagWIE7Y1HJ6F2W7UDH+LnNFWXBiPQU9kdRdk3us5aUj9dIc wGdxXdA3SjKgDOE2hlBrEeaMngCIY2DaBABisoCW/44CjrCjcBHGwZ2QoCgO2UJGcUeu 35Yw== X-Forwarded-Encrypted: i=1; AJvYcCWKIq6wcIkD03dRCFf3j9WEHc2iKEH5moYtGpq7JzTCQ0yC6Ixe2XHihV2dLqWLUyGy3SC3PkOpSyOrdHJfJcKrlKkNzYZsgOZR69r6 X-Gm-Message-State: AOJu0YxfEsJrk0DXPuexLEyHEhhCP0+AzWMnEJpZF6a9x2yUIH+Oe9SY s0k9fOcHNKv2q5UBKbJkC+iBWjiGkrE1HLwsNZCWLN//yIt4mVUt3k/BHg== X-Google-Smtp-Source: AGHT+IHKRVZrnIypwOy0iQJ6gHRyeo8WdvmhZlWWmz4a/TA6H2dPRjf+Qcka7NSBsXGWf2xxYBv11g== X-Received: by 2002:a05:6512:280a:b0:52b:7b8a:2d2f with SMTP id 2adb3069b0e04-52bab4c9ba1mr3476802e87.2.1717617602730; Wed, 05 Jun 2024 13:00:02 -0700 (PDT) Received: from [1.0.0.7] ([178.155.25.76]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52b982d3de7sm1099540e87.2.2024.06.05.13.00.01 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 05 Jun 2024 13:00:02 -0700 (PDT) Message-ID: Date: Wed, 5 Jun 2024 23:00:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: ssl tests fail due to TCP port conflict Content-Language: en-US To: Andrew Dunstan , pgsql-hackers References: <6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net> From: Alexander Lakhin In-Reply-To: <6756fb60-aa5f-442c-90fb-5f29cd1658f0@dunslane.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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