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

Re: Deadlock detection

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Kris Jurka <books(at)ejurka(dot)com>
Cc: Simon Riggs <simon(at)2ndQuadrant(dot)com>, Daniel Migowski <dmigowski(at)ikoffice(dot)de>, PostgreSQL - JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Deadlock detection
Date: 2009-01-22 02:03:08
Message-ID: 4977D3DC.1080806@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
Kris Jurka wrote:
> 
> 
> On Thu, 22 Jan 2009, Oliver Jowett wrote:
> 
>> Oliver Jowett wrote:
>>
>> This passes the regression testsuite with antiDeadlock=true, but I don't
>> have a deadlock testcase on hand to try unfortunately.
>>
> 
> This has a test case which deadlocks consistently:
> 
> http://archives.postgresql.org/pgsql-jdbc/2008-10/msg00045.php

Perfect, thanks

My changes seem to pass BatchDeadLock with antiDeadlock=true (and still
hang with antiDeadlock=false):

> 14:59:45.233 (1)  FE=> Execute(portal=null,limit=1)
> 14:59:45.233 (1)  FE=> Sync
> Warning: possible socket deadlock detected (timeout=30000, remaining buffer=1299975
> java.lang.Throwable: Deadlock call stack
> 	at org.postgresql.core.AntiDeadlockStream.flush(AntiDeadlockStream.java:83)
> 	at org.postgresql.core.PGStream.flush(PGStream.java:517)
> 	at org.postgresql.core.v3.QueryExecutorImpl.sendSync(QueryExecutorImpl.java:692)
> 	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:342)
> 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2693)
> 	at BatchDeadLock.main(BatchDeadLock.java:40)
> 15:00:15.234 (1)  <=BE ParseComplete [S_1]
> 15:00:15.234 (1)  <=BE ParameterDescription
> 15:00:15.235 (1)  <=BE NoData
> 15:00:15.235 (1)  <=BE BindComplete [null]
> 15:00:15.235 (1)  <=BE CommandStatus(INSERT 0 1)
> 15:00:15.235 (1)  <=BE ParseComplete [S_2]
> 15:00:15.235 (1)  <=BE ParameterDescription
> 15:00:15.235 (1)  <=BE NoData
> [.. etc ..]

-O

In response to

Responses

pgsql-jdbc by date

Next:From: Oliver JowettDate: 2009-01-22 02:13:53
Subject: Re: Deadlock detection
Previous:From: Kris JurkaDate: 2009-01-22 01:54:43
Subject: Re: Deadlock detection

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