pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michal Politowski <mpol+pg@meep.pl>
To: pgsql-general@postgresql.org
Subject: Re: Mixed up protocol packets in server response?
Date: Fri, 3 Jun 2011 15:03:57 +0200
Message-ID: <20110603130357.GA7961@meep.pl> (raw)
In-Reply-To: <4DE6DE56.8030008@postnewspapers.com.au>
References: <20110601130649.GA21333@meep.pl>
	<4DE6DE56.8030008@postnewspapers.com.au>

On Thu,  2 Jun 2011 08:50:30 +0800, Craig Ringer wrote:
> On 1/06/2011 9:06 PM, Michal Politowski wrote:
> 
> >What may be the cause of this weird problem? Is it some known or unknown bug in
> >8.3.4 or is the application/Java side more suspected?
> 
> It'd be really helpful if you could collect and examine a trace of
> the client/server communication using WireShark. That way you can
> confirm whether it is (as Tom suspects) the client side mangling its
> buffers, or whether the server really did send the nonsensical
> sequence.

Actually my own money is with Tom's. It's very hard to believe Postgres
would do something like this, unless it were some obvious and long fixed bug in 8.3.4.

Still, trying to trace the communication makes sense, if I can convince the
owners of the system to let me do it. Unfortunately this is an
"one in a million of successful queries" (actually two in much more than a million)
problem. And the next run of the application seems not to have hit it, yet.

Thinking aloud: If this is, as it is to be suspected, an application-side problem,
there is at first sight not much space in the application where it could hide. The data is
mixed up in a driver buffer, two method calls from the standard library
socket code. There is the VisibleBufferedInputStream there. Could it do
something like this? Maybe if the connection was erroneously used from two threads
concurrently? The connections are pooled via commons-dbcp BasicDataSource
and queries are executed via Spring JdbcTemplate within Spring-configured
transaction. No passing connections by hand anywhere, everything should be
nicely thread-bound. Still, if not here, where could it go wrong?

-- 
MichaƂ Politowski
Talking has been known to lead to communication if practiced carelessly.



view thread (10+ messages)  latest in thread

Message-ID: <20110603130357.GA7961@meep.pl>
Permalink:  ../20110603130357.GA7961@meep.pl/
Also on:    postgresql.org/message-id/20110603130357.GA7961@meep.pl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: mpol+pg@meep.pl, pgsql-general@postgresql.org
  Subject: Re: Mixed up protocol packets in server response?
  In-Reply-To: <20110603130357.GA7961@meep.pl>
  References: <20110601130649.GA21333@meep.pl> <4DE6DE56.8030008@postnewspapers.com.au> <20110603130357.GA7961@meep.pl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox