| From: | Peter Kelly <Peter(dot)Kelly(at)aepona(dot)com> | 
|---|---|
| To: | pgsql-odbc(at)postgresql(dot)org | 
| Subject: | Re: psqlODBC hangs | 
| Date: | 2004-09-29 14:03:12 | 
| Message-ID: | 415AC0A0.9060308@aepona.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-odbc | 
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Merlin Moncure | 2004-09-29 15:05:50 | Re: basic questions with odbc and visual basic. | 
| Previous Message | Peter van Heck | 2004-09-29 01:52:51 | ERROR: invalid input syntax for type boolean: "-"(#7) |