pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Jowett <oliver@opencloud.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: Thread hangs in VisibleBufferedInputStream.readMore
Date: Tue, 28 Apr 2009 18:21:26 +1200
Message-ID: <49F6A066.8010105@opencloud.com> (raw)
In-Reply-To: <20090428061649.GA5531@net-track.ch>
References: <20090428061649.GA5531@net-track.ch>

Oliver Hitz wrote:

> 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.

It won't be the batch insert deadlock, that manifests as blocking on 
write, not on read.

> 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)

This is "normal" in that the driver is just waiting for more data from 
the server.

> Any hints on how I could go about debugging this issue?

I'd take a look at the server backend processes to see what they're 
doing when your application hangs.

-O



view thread (9+ messages)  latest in thread

Message-ID: <49F6A066.8010105@opencloud.com>
Permalink:  ../49F6A066.8010105@opencloud.com/
Also on:    postgresql.org/message-id/49F6A066.8010105@opencloud.com

 · 

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: oliver@opencloud.com
  Subject: Re: Thread hangs in VisibleBufferedInputStream.readMore
  In-Reply-To: <49F6A066.8010105@opencloud.com>
  References: <20090428061649.GA5531@net-track.ch> <49F6A066.8010105@opencloud.com>

* 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