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 1r5ou1-00FE6Q-IA for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Nov 2023 15:12:33 +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 1r5otz-009cgn-MQ for pgsql-bugs@arkaria.postgresql.org; Wed, 22 Nov 2023 15:12:31 +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 1r5otz-009cgf-Dd for pgsql-bugs@lists.postgresql.org; Wed, 22 Nov 2023 15:12:31 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r5otw-007naI-JD for pgsql-bugs@lists.postgresql.org; Wed, 22 Nov 2023 15:12:30 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 3AMFBQQk1675679; Wed, 22 Nov 2023 10:11:26 -0500 From: Tom Lane To: lars@greiz-reinsdorf.de cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection In-reply-to: <18210-4c6d0b14627f2eb8@postgresql.org> References: <18210-4c6d0b14627f2eb8@postgresql.org> Comments: In-reply-to PG Bug reporting form message dated "Wed, 22 Nov 2023 12:21:25 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1675677.1700665886.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 22 Nov 2023 10:11:26 -0500 Message-ID: <1675678.1700665886@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk PG Bug reporting form writes: > The error "GSSAPI caller failed to retransmit all data needing to be > retried" is raised here: > https://github.com/postgres/postgres/blob/eeb0ebad79d9350305d9e111fbac76= e20fa4b2fe/src/interfaces/libpq/fe-secure-gssapi.c#L110 > It happens only in non-blocking mode over GSSAPI encrypted connections. = It > isn't reliable and depends on the network timing. When sending a 7MB fil= e in > alternating pieces of 27KB and 180 Byte per PQputCopyData() there is a 5= 0% > chance to get the failure over the local network. It doesn't happen if T= LS > is used instead. Hmm. > The issue is fixed if I change libpq at either pqPutMsgEnd() or at > pg_GSS_write(). Both of those seem like pretty obviously wrong "fixes". However, I'm not quite sure I see the problem clearly enough to propose a fix I'd believe in. > Unfortunately so far I'm unable to provide a repro script. Maybe the abo= ve > information is enough to understand the problem. A repro script would be really really helpful here. regards, tom lane