Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection

From: Lars Kanis <lars(at)greiz-reinsdorf(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection
Date: 2023-11-22 20:21:47
Message-ID: 4aee158b-66e2-488d-9945-cfc83b0d12c1@greiz-reinsdorf.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Am 22.11.23 um 16:11 schrieb Tom Lane:

> A repro script would be really really helpful here.

After fiddling a bit longer I was able to write a reproducer in C. It
needs a Kerberos enabled environment and it reliably fails as described
when running over Internet (by VPN connection). Then the output is:

  PQputCopyData text2 command failed: GSSAPI caller failed to
retransmit all data needing to be retried

The program is here:
https://gist.github.com/larskanis/5546a20365b0ca64e294a32b138f441e

I wasn't able to reproduce the error on a LAN connection with the above
program. Even adding a trigger on the copy-table to slow the server down
or adding PQflush/PQconsumeInput calls didn't work to trigger the GSSAPI
error. In contrast the original program sometimes fails even on a LAN
connection.

Regards,
Lars Kanis

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-11-22 22:29:34 Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection
Previous Message Tom Lane 2023-11-22 19:19:06 Re: BUG #18210: libpq: PQputCopyData sometimes fails in non-blocking mode over GSSAPI encrypted connection