Re: Pgsql jdbc driver 8.3 Build 603: Commit deadlock

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Shawn Chasse <shawnchasse(at)gmail(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Pgsql jdbc driver 8.3 Build 603: Commit deadlock
Date: 2008-11-10 22:54:11
Message-ID: 4918BB93.3090403@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Shawn Chasse wrote:
> Hi,
> I'm running the 8.3 build 603 jdbc4 driver on a windows server machine
> running postgres 8.3.3, hibernate 3.2, and java 1.6.
>
> Recently I have run into a problem where a commit call in my java code
> will propogate down to the driver and eventually deadlock waiting for a
> response. The specific call stack is as follows:
>
> "Analyzer" daemon prio=6 tid=0x67de4400 nid=0x1414 runnable
> [0x6890f000..0x6890fc18]
> java.lang.Thread.State: RUNNABLE
> 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:1166)
> at
> org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:351)
> - locked <0x0a1db010> (a
> org.postgresql.core.v3.QueryExecutorImpl)
> at
> org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2674)

While your top-level code may be calling commit() on a Hibernate API,
the actual JDBC work that is going on doesn't involve a commit - it
looks like a batch insert to me.

The driver is waiting for results from the server, which presumably
never comes back. So you need to look at what the server is doing. (I
have no idea how to do that on a Windows box)

-O

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Tiago Alves 2008-11-11 00:06:34 Using SELECT IN with prepared statement
Previous Message Shawn Chasse 2008-11-10 18:54:00 Pgsql jdbc driver 8.3 Build 603: Commit deadlock