pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Kelly <Peter.Kelly@aepona.com>
To: pgsql-odbc@postgresql.org
Subject: Re: psqlODBC hangs
Date: Wed, 29 Sep 2004 15:03:12 +0100
Message-ID: <415AC0A0.9060308@aepona.com> (raw)
In-Reply-To: <14330.1096380855@sss.pgh.pa.us>
References: <4159252C.10606@aepona.com>
	<14330.1096380855@sss.pgh.pa.us>


The ODBC code was deadlocking on a mutex.
The mutex was being locked in SQLConnect and then the code attempted to 
lock it agin in CC_send_query, since it isn't a recursive mutex, the 
client hangs.

I rebuilt the ODBC code without the '--enable-pthreads' option and it works.

Stack trace below:

#0  0x800003ffff090cc4 in __ksleep+0x2c () from /usr/lib/pa20_64/libc.2
#1  0x800003ffff1c4078 in pthread_mutex_lock+0x180 () from 
/usr/lib/pa20_64/libpthread.1
#2  0x800003ffff7a4828 in CC_send_query (self=0x8000000100057b90, 
query=0x800003ffff76fc50 " ", qi=0x0, flag=1) at connection.c:1257
#3  0x800003ffff7a3874 in CC_connect (self=0x8000000100057b90, 
password_req=0 '\000', salt_para=0x0) at connection.c:918
#4  0x800003ffff7a11a0 in PGAPI_Connect (hdbc=0x8000000100057b90 "\200", 
szDSN=0x8000000100039268 "gateway", cbDSN=7, szUID=0x8000000100039270 
"gwuser", cbUID=6, szAuthStr=0x8000000100039278 "", cbAuthStr=0) at 
connection.c:131
#5  0x800003ffff7de7f8 in SQLConnect 
(ConnectionHandle=0x8000000100057b90 "\200", 
ServerName=0x8000000100039268 "gateway", NameLength1=7, 
UserName=0x8000000100039270 "gwuser", NameLength2=6, 
Authentication=0x8000000100039278 "", NameLength3=0) at odbcapi.c:184
#6  0x4000000000034e78 in CmnDbConnection::getConnectionHandle 
(this=0x8000000100011268, DBConnHandle=0x800003ffff7f0d00) at 
/product/cs_gw/workspaces/pk0043_ws_itanium/Dev/cmn/db/src/CmnDbConnection.cxx:201
#7  0x400000000002c450 in CmnDbConnectionPool::getConnectionHandle 
(this=0x8000000100051220, pConnectionHandle=0x800003ffff7f0b68) at 
/product/cs_gw/workspaces/pk0043_ws_itanium/Dev/cmn/db/src/CmnDbConnectionPool.cxx:583
#8  0x400000000001c094 in test_connection_pool () at 
/product/cs_gw/workspaces/pk0043_ws_itanium/Dev/cmn/db/test/CmnDbTestMain.cxx:35
#9  0x400000000001e568 in main (argc=1, argv=0x800003ffff7f0758) at 
/product/cs_gw/workspaces/pk0043_ws_itanium/Dev/cmn/db/test/CmnDbTestMain.cxx:126





view thread (4+ messages)

Message-ID: <415AC0A0.9060308@aepona.com>
Permalink:  ../415AC0A0.9060308@aepona.com/
Also on:    postgresql.org/message-id/415AC0A0.9060308@aepona.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-odbc@postgresql.org
  Cc: Peter.Kelly@aepona.com
  Subject: Re: psqlODBC hangs
  In-Reply-To: <415AC0A0.9060308@aepona.com>
  References: <4159252C.10606@aepona.com> <14330.1096380855@sss.pgh.pa.us> <415AC0A0.9060308@aepona.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