From: Oliver Hitz <oliver@net-track.ch>
To: pgsql-jdbc@postgresql.org
Subject: Thread hangs in VisibleBufferedInputStream.readMore
Date: Tue, 28 Apr 2009 08:16:49 +0200
Message-ID: <20090428061649.GA5531@net-track.ch> (raw)
Hi all,
I have recently upgraded from postgresql 7.4.7 to 8.3.7. Since then, I
have experienced in our application a thread that hangs forever. The
problem is quite difficult to trace, since the program hangs very
irregularly. Sometimes it hangs after 10 minutes already, sometimes only
after two days.
After searching the archives, I thought this was maybe connected to batch
inserts and batch updates. Since the thread in question is doing a lot of
batch updates and inserts, I changed it to do normal updates/inserts. But
without success.
I have also upgraded to the latest version of the JDBC driver, compiled
from CVS, because I saw there was some improvement regarding
DescribeStatement messages. No success, either.
The call stack of the hanging thread is as follows:
"MonitoringThread" prio=1 tid=0x00007f40187ac350 nid=0x41e7 runnable [0x0000000045157000..0x0000000045157e20]
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:129)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:135)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:104)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:73)
at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:259)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1205)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:194)
- locked <0x00007f4047a7ab08> (a org.postgresql.core.v3.QueryExecutorImpl)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:271)
Any hints on how I could go about debugging this issue?
BTW, I am using Java 1.5.0_18-b02 from Sun on Debian Lenny on an AMD64
platform.
Thanks in advance!
Oliver
Attachments:
signature.asc (application/pgp-signature, 196B) download
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: oliver@net-track.ch
Subject: Re: Thread hangs in VisibleBufferedInputStream.readMore
In-Reply-To: <20090428061649.GA5531@net-track.ch>
References: <20090428061649.GA5531@net-track.ch>
* 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