Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jDCZg-0005YO-Nj for psycopg@arkaria.postgresql.org; Sat, 14 Mar 2020 19:35:56 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jDCZf-0002yE-Fy for psycopg@arkaria.postgresql.org; Sat, 14 Mar 2020 19:35:55 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jDCZf-0002y6-2k for psycopg@lists.postgresql.org; Sat, 14 Mar 2020 19:35:55 +0000 Received: from mail-lj1-x242.google.com ([2a00:1450:4864:20::242]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jDCZb-0006OO-8d for psycopg@postgresql.org; Sat, 14 Mar 2020 19:35:53 +0000 Received: by mail-lj1-x242.google.com with SMTP id d23so14227482ljg.13 for ; Sat, 14 Mar 2020 12:35:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=Io9Aouj2sQ2KhKXPnxZGwd5GMH8am2tRLqTg1MGRxXk=; b=ut2fMe5GC9gqyKTsZ3bP/NG11lkcHbgrdEev/bQPnYYZlm+tsUqLHMZDBhJLEx/68O Sle3kbSxY3qug3LqKMEUOuv1qfutGUN2SCaNnkVddYss+S5LO/sbRIdik4t0ixjyOdOG 08Hl6isrrBSBrFdsGkm27ohuk45CrAP5SoUSGfNxJWGdcwRCR5HSb6Ue2/UMw0ugHcoD /jWJiLG/KUA1Hjfc2NcxoxzCGF1GbNFDYvgUxE3CyUJ5RvwJzdrAWdKZU6XjkRQPpOlJ H71U0IcEbxJI0SLqtaYZ3lr3z/5ocHkwP/tnHT6/p8UVd2OrzBL2mruGHUnUQjvYl5KV JEpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=Io9Aouj2sQ2KhKXPnxZGwd5GMH8am2tRLqTg1MGRxXk=; b=cEyXzTgWqUCyA01+626bpIc38APLMO8SU+s1kwMbqS3aHT5lSvJrzcwf+yza+tcjDi uxtXsXfnD/Z0YQA5L/Khf38OTRJKQDAto2KkeIzIVxtTtjlGfOZ7hz+yBtfKZEhVJ3Te M6wU8NBNtFFgUTZ1cVcKC32pzfl1qZ1jyyHAu255fQYrQrkpGVe04hLAVhFvWkxPnkr5 o5QQog9f+kU/nEW1C0/owkxcTwsocFIZ8wKSgv+R/JvYvsxcZ1mImoD7vqW1mNY3zPlM esw/x5xLrPr8o3leVVCVLEgVbqsdp+oQ2ehj6Vb9CuBgAFzEPlUKGKKZxDv3OmJBV969 ORXQ== X-Gm-Message-State: ANhLgQ0e0Fpyeki/FTIbqPXv8Kc00e+xsUwUduo8fwoCVlRRccP2CS9s MLG1f6Ox9cUdUTC9CQfSjf3LPrM1amXzr3NWUyJRWQ== X-Google-Smtp-Source: ADFU+vsztOPqgtgoGp4qTd6QiRhqIxSXDQaok07qa3MDsQptacy2dPvv0PNw6vJQPuTJkWBEaESyx92Y/WDITx/QDdk= X-Received: by 2002:a2e:3309:: with SMTP id d9mr1373789ljc.73.1584214548510; Sat, 14 Mar 2020 12:35:48 -0700 (PDT) MIME-Version: 1.0 References: <20200314153421.GC1104@hermes.hilbert.loc> In-Reply-To: <20200314153421.GC1104@hermes.hilbert.loc> From: Daniele Varrazzo Date: Sun, 15 Mar 2020 08:35:36 +1300 Message-ID: Subject: Re: wire protocol errors on Debian (py3/psyco 2.8) To: psycopg@postgresql.org Content-Type: multipart/alternative; boundary="000000000000697cc105a0d5b113" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000697cc105a0d5b113 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Sun, 15 Mar 2020, 04:34 Karsten Hilbert, 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 =C2=ABT=C2= =BB > > or > > psycopg2.DatabaseError: el contenido del mensaje no concuerda con el > largo, en el mensaje tipo =C2=ABC=C2=BB > > 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 --000000000000697cc105a0d5b113 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Sun, 15 Mar 2020, 04:34 Karsten Hilbert, <Karsten.Hilbert@gmx.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):

=C2=A0psycopg2.OperationalError: datos insuficientes en el mensaje =C2=ABT= =C2=BB

or

=C2=A0psycopg2.DatabaseError: el contenido del mensaje no concuerda con el = largo, en el mensaje tipo =C2=ABC=C2=BB

The error happens at different times when running the same
code. The=C2=A0 versions involved:

=C2=A0psycopg2 module version: 2.8.4 (dt dec pq3 ext lo64)
=
...
=C2=A0=C2=A0libpq version (loaded n= ow) : 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 fai= ling to parse messages from the server (at a glance CommandComplete and Row= Description - see=C2=A0https://www.postgresql.org/docs/current/proto= col-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 wou= ld have seen this error more often. If you want to investigate in that dire= ction you may ask core devs if there have been changes in that area for tho= se versions.

My wild gue= ss is either faulty network or faulty memory on the machine, most likely th= e latter.

-- Daniele=C2= =A0
--000000000000697cc105a0d5b113--