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 1uT533-00H9va-Ko for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Jun 2025 20:42:50 +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 1uT531-009Atz-Nm for pgsql-bugs@arkaria.postgresql.org; Sat, 21 Jun 2025 20:42:48 +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 1uT531-009Atr-A1 for pgsql-bugs@lists.postgresql.org; Sat, 21 Jun 2025 20:42:48 +0000 Received: from mail.postgrespro.ru ([93.174.132.70]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uT52z-003Mns-0H for pgsql-bugs@lists.postgresql.org; Sat, 21 Jun 2025 20:42:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mx2023; t=1750538563; bh=k0ci/640/TNe9lL8X7X5dtfGjoRfLiHA18o63N2Zhu8=; h=Message-ID:Date:User-Agent:Subject:To:Cc:References:From: In-Reply-To:From; b=cbU55yCUCBdbDwGM9QSw7Io1QZ3rH1e7GXAvTmTsSgFMYIohwiTZJEPqE1s15w/n/ rD0WAARXxQ7f+UqS6zXPv9qLMDQIQnGa9oMrrSrcB/9boKjcfeAwGmWshMM3IaXylj ZL242/w6/xX6dvK6ALfSZb87Ma75MMxM1JAXU49rF15U9wQWvJQQCsrcFjYxxwlF9P HUCKG2sftFnnyT7r2UE+zDWMt7Yj/FFmtv22mjsy0rOLVoqMLwvbyywsJayQZy/rHn mKvKAiKRYRmmAMiswvKJ5UI2103NRyHMNTnhx5pNWFw6CkQIM/60yMVHaJsWK1AM/K J9JGbbP7nwgDQ== Received: from [192.168.1.9] (unknown [91.192.62.113]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: d.kovalenko@postgrespro.ru) by mail.postgrespro.ru (Postfix/465) with ESMTPSA id 8257260AA7; Sat, 21 Jun 2025 23:42:43 +0300 (MSK) Message-ID: <5ff4b743-b9ab-4406-92db-d6e00be2b301@postgrespro.ru> Date: Sat, 21 Jun 2025 23:42:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: BUG #18960: Mistake in test test_simple_pipeline (libpq_pipeline.c) To: Tom Lane Cc: =?UTF-8?Q?=C3=81lvaro_Herrera?= , pgsql-bugs@lists.postgresql.org References: <18960-09cd4a5100152e58@postgresql.org> <1181606.1750280943@sss.pgh.pa.us> <2790652.1750536063@sss.pgh.pa.us> Content-Language: ru, en-US From: Dmitry Kovalenko In-Reply-To: <2790652.1750536063@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-KSMG-AntiPhishing: NotDetected, bases: 2025/06/21 18:46:00 X-KSMG-AntiSpam-Interceptor-Info: not scanned X-KSMG-AntiSpam-Status: not scanned, disabled by settings X-KSMG-AntiVirus: Kaspersky Secure Mail Gateway, version 2.1.0.7854, bases: 2025/06/21 16:39:00 #27580734 X-KSMG-AntiVirus-Status: NotDetected, skipped X-KSMG-LinksScanning: not scanned, disabled by settings X-KSMG-Message-Action: skipped X-KSMG-Rule-ID: 1 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello Tom, Thank you for your interest in this problem. +    res = PQgetResult(conn); +    if (res == NULL) +        pg_fatal_impl(line, "PQgetResult returned null unexpectedly: %s", +                      PQerrorMessage(conn)); +    if (PQresultStatus(res) != status) +        pg_fatal_impl(line, "PQgetResult returned status %s, expected %s: %s", +                      PQresStatus(PQresultStatus(res)), +                      PQresStatus(status), +                      PQerrorMessage(conn)); +    return res; As I understand, you have leaks of 'res' when (PQresultStatus(res) != status) I spent the some time to fix a leaks in tests and PG itself here: https://github.com/dmitry-lipetsk/postgres/commits/D20250617_001-pg_master/ libpq_pipeline.c has not been finished yet but "make check" (under ASAN) can already executed without any problems. I hope, you will find something useful in this branch. For example, these problems are obvious and can be trivially fixed: https://github.com/dmitry-lipetsk/postgres/commit/484ec68fcfea77beadc19387721d04ca77abe55f https://github.com/dmitry-lipetsk/postgres/commit/3213f95cfd3e094d6ece4a9114f30f0204c0d056 https://github.com/dmitry-lipetsk/postgres/commit/0d4497a744bd00e741434aa6e307ed23f348fbc4 https://github.com/dmitry-lipetsk/postgres/commit/6f966657d7e9409dcbd8109d41bdc89f22024324 I am planning to return and finish this work near time - I want to get a clean execution of "make check-world" under ASAN. Thanks&Regards, Dmitry Kovalenko