Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 98FF2633BB1 for ; Tue, 28 Apr 2009 03:17:03 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 80125-06 for ; Tue, 28 Apr 2009 03:17:02 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cuzco.net-track.ch (cuzco.net-track.ch [194.153.188.156]) by mail.postgresql.org (Postfix) with SMTP id C63696337AA for ; Tue, 28 Apr 2009 03:17:01 -0300 (ADT) Received: (qmail 7532 invoked by uid 1000); 28 Apr 2009 06:16:49 -0000 Date: Tue, 28 Apr 2009 08:16:49 +0200 From: Oliver Hitz To: pgsql-jdbc@postgresql.org Subject: Thread hangs in VisibleBufferedInputStream.readMore Message-ID: <20090428061649.GA5531@net-track.ch> Mail-Followup-To: pgsql-jdbc@postgresql.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="6TrnltStXW4iwmi0" Content-Disposition: inline User-Agent: Mutt/1.5.9i X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/93 X-Sequence-Number: 19540 --6TrnltStXW4iwmi0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =66rom 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=3D1 tid=3D0x00007f40187ac350 nid=3D0x41e7 runnable = [0x0000000045157000..0x0000000045157e20] at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleB= ufferedInputStream.java:135) at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(Visib= leBufferedInputStream.java:104) at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBuffe= redInputStream.java:73) at org.postgresql.core.PGStream.ReceiveChar(PGStream.java:259) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExe= cutorImpl.java:1205) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorIm= pl.java:194) - locked <0x00007f4047a7ab08> (a org.postgresql.core.v3.QueryExecut= orImpl) at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc= 2Statement.java:479) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(Abs= tractJdbc2Statement.java:367) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(Abstrac= tJdbc2Statement.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 --6TrnltStXW4iwmi0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkn2n1oACgkQ4hxFYtsxPogfSgCfcpO2lX4FLHsDljJvzCTGh8Yt glMAoJZOL7nfyqikwfOmpoeuY02EbYaX =B3yh -----END PGP SIGNATURE----- --6TrnltStXW4iwmi0--