X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AF59832A27D for ; Wed, 29 Sep 2004 15:03:55 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 50091-06 for ; Wed, 29 Sep 2004 14:03:40 +0000 (GMT) Received: from mailhost2.aepona.com (mailhost2.aepona.com [194.46.24.7]) by svr1.postgresql.org (Postfix) with ESMTP id 57D8332A15D for ; Wed, 29 Sep 2004 15:03:30 +0100 (BST) Received: from thistle ([10.10.12.206] helo=aepona.com) by mailhost2.aepona.com with esmtp (Exim 4.24) id 1CCf32-0005zI-SX for pgsql-odbc@postgresql.org; Wed, 29 Sep 2004 15:03:12 +0100 Message-ID: <415AC0A0.9060308@aepona.com> Date: Wed, 29 Sep 2004 15:03:12 +0100 From: Peter Kelly Organization: AePONA Ltd. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 X-Accept-Language: en-gb, en-us, en MIME-Version: 1.0 To: pgsql-odbc@postgresql.org Subject: Re: psqlODBC hangs References: <4159252C.10606@aepona.com> <14330.1096380855@sss.pgh.pa.us> In-Reply-To: <14330.1096380855@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200409/97 X-Sequence-Number: 4472 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