Re: wire protocol errors on Debian (py3/psyco 2.8)

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: psycopg(at)postgresql(dot)org
Subject: Re: wire protocol errors on Debian (py3/psyco 2.8)
Date: 2020-03-14 19:35:36
Message-ID: CA+mi_8Z0f=_bdBci2KtwMUbuKCoDiHQnR72pvYzF5tx1=PSB1g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Sun, 15 Mar 2020, 04:34 Karsten Hilbert, <Karsten(dot)Hilbert(at)gmx(dot)net> wrote:

> Hi all,
>
> we have two reports for psycopg2 2.8 under Python 3 on Debian
> showing a problem with the wire protocol (full logs appended):
>
> psycopg2.OperationalError: datos insuficientes en el mensaje «T»
>
> or
>
> psycopg2.DatabaseError: el contenido del mensaje no concuerda con el
> largo, en el mensaje tipo «C»
>
> The error happens at different times when running the same
> code. The versions involved:
>
> psycopg2 module version: 2.8.4 (dt dec pq3 ext lo64)
>
...

> libpq version (loaded now) : 120002
>
...

> We don't yet know the exact version of PostgreSQL this is
> running against but it is likely 12.2-1+b1 from
> Debian/Unstable.
>
> Any ideas or hints what to look at next ?
>

The error comes from the libpq failing to parse messages from the server
(at a glance CommandComplete and RowDescription - see
https://www.postgresql.org/docs/current/protocol-message-formats.html)
which are probably just the most common ones.

I doubt it's a bug with libpq 12.2 or whatever server is on the other side
of the wire: we would have seen this error more often. If you want to
investigate in that direction you may ask core devs if there have been
changes in that area for those versions.

My wild guess is either faulty network or faulty memory on the machine,
most likely the latter.

-- Daniele

In response to

Responses

Browse psycopg by date

  From Date Subject
Next Message Adrian Klaver 2020-03-14 20:12:04 Re: wire protocol errors on Debian (py3/psyco 2.8)
Previous Message Adrian Klaver 2020-03-14 18:16:50 Re: wire protocol errors on Debian (py3/psyco 2.8)