BUG #3999: Panic with "invalid string enlargement request size" after a strange request from JDBC

Lists: pgsql-bugs
From: "Thomas Poindessous" <t(dot)poindessous(at)seiitra(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3999: Panic with "invalid string enlargement request size" after a strange request from JDBC
Date: 2008-02-29 11:00:50
Message-ID: 200802291100.m1TB0oKA054569@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 3999
Logged by: Thomas Poindessous
Email address: t(dot)poindessous(at)seiitra(dot)com
PostgreSQL version: 7.4.9
Operating system: RHEL 3ES.x86_64
Description: Panic with "invalid string enlargement request size"
after a strange request from JDBC
Details:

Hi

we have some PANIC after a weird error :

ERROR: invalid string enlargement request size 1358954492
WARNING: AbortTransaction and not in in-progress state
ERROR: could not send data to client: Broken pipe
PANIC: error during error recovery, giving up

Postgresql server restarts well.

We traced the connection and it comes from a jdbc application. We use
pg74.216.jdbc3.jar

Here is a excerpt from the tcpdump log (only incoming cnx) :

000000BA 51 00 00 00 24 73 65 74 20 63 6c 69 65 6e 74 5f Q...$set
client_
000000CA 65 6e 63 6f 64 69 6e 67 20 3d 20 27 55 4e 49 43 encoding =
'UNIC
000000DA 4f 44 45 27 00 ODE'.
000000DF 58 51 00 00 00 04 XQ....

We noticed than the 58 51 couple of bytes is unusual.

We know that we have a very old version of 7.4, we will migrating to 8.3
RSN, but we would like to know if it's a known bug of the jdbc connector for
example, or if we have a problem with our application's code.

Thanks in advance.

Thomas Poindessous


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Thomas Poindessous" <t(dot)poindessous(at)seiitra(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3999: Panic with "invalid string enlargement request size" after a strange request from JDBC
Date: 2008-02-29 15:42:17
Message-ID: 2154.1204299737@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-bugs

"Thomas Poindessous" <t(dot)poindessous(at)seiitra(dot)com> writes:
> we have some PANIC after a weird error :

> ERROR: invalid string enlargement request size 1358954492
> WARNING: AbortTransaction and not in in-progress state
> ERROR: could not send data to client: Broken pipe
> PANIC: error during error recovery, giving up

This is not tremendously surprising given that the client presumably
disconnected right after sending the malformed message. I believe the
problem with the write failure becoming a PANIC is fixed as of 8.0.

> We know that we have a very old version of 7.4, we will migrating to 8.3
> RSN, but we would like to know if it's a known bug of the jdbc connector for
> example, or if we have a problem with our application's code.

It sure looks like a JDBC bug to me, but you'd have to ask on pgsql-jdbc
for an authoritative answer. Not sure if any of those guys read -bugs.

regards, tom lane