Thread hangs in VisibleBufferedInputStream.readMore

From: Oliver Hitz <oliver(at)net-track(dot)ch>
To: pgsql-jdbc(at)postgresql(dot)org
Subject: Thread hangs in VisibleBufferedInputStream.readMore
Date: 2009-04-28 06:16:49
Message-ID: 20090428061649.GA5531@net-track.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

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

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2009-04-28 06:21:26 Re: Thread hangs in VisibleBufferedInputStream.readMore
Previous Message Kris Jurka 2009-04-27 17:35:01 Re: Here's a fix to AbstractJdbc3Statement.getGeneratedKeys