Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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 Method)
        at org.postgresql.core.VisibleBufferedInputStream.readMore(
        at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(
        at org.postgresql.core.PGStream.ReceiveChar(
        at org.postgresql.core.v3.QueryExecutorImpl.processResults(
        at org.postgresql.core.v3.QueryExecutorImpl.execute(
        - locked <0x00007f4047a7ab08> (a org.postgresql.core.v3.QueryExecutorImpl)
        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(
        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(

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

Thanks in advance!



pgsql-jdbc by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group