Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xwy3J-0006gk-Lc for pgsql-odbc@arkaria.postgresql.org; Fri, 05 Dec 2014 18:56:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xwy3J-0002Hk-2f for pgsql-odbc@arkaria.postgresql.org; Fri, 05 Dec 2014 18:56:29 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xwy3I-0002He-CJ for pgsql-odbc@postgresql.org; Fri, 05 Dec 2014 18:56:28 +0000 Received: from mail-bl2on0616.outbound.protection.outlook.com ([2a01:111:f400:fc09::616] helo=na01-bl2-obe.outbound.protection.outlook.com) by magus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xwy3B-0002MH-BB for pgsql-odbc@postgresql.org; Fri, 05 Dec 2014 18:56:26 +0000 Received: from BL2PR05CA0036.namprd05.prod.outlook.com (10.255.226.36) by DM2PR05MB509.namprd05.prod.outlook.com (10.141.99.12) with Microsoft SMTP Server (TLS) id 15.1.26.15; Fri, 5 Dec 2014 18:56:10 +0000 Received: from BN1BFFO11FD050.protection.gbl (2a01:111:f400:7c10::1:187) by BL2PR05CA0036.outlook.office365.com (2a01:111:e400:c04::36) with Microsoft SMTP Server (TLS) id 15.1.31.17 via Frontend Transport; Fri, 5 Dec 2014 18:56:09 +0000 Received: from mercav05r.na.sas.com (149.173.6.149) by BN1BFFO11FD050.mail.protection.outlook.com (10.58.145.5) with Microsoft SMTP Server (TLS) id 15.1.6.13 via Frontend Transport; Fri, 5 Dec 2014 18:56:09 +0000 X-TM-IMSS-Message-ID: <387ae3d4000415a4@mercav05r.na.sas.com> Received: from MERCMBX39R.na.SAS.com ([10.16.20.50]) by mercav05r.na.sas.com ([10.16.10.186]) with ESMTP (TREND IMSS SMTP Service 7.1; TLSv1/SSLv3 AES128-SHA (128/128)) id 387ae3d4000415a4 ; Fri, 5 Dec 2014 13:56:08 -0500 Received: from MERCMBX41R.na.SAS.com (10.16.20.110) by MERCMBX39R.na.SAS.com (10.16.20.50) with Microsoft SMTP Server (TLS) id 15.0.995.29; Fri, 5 Dec 2014 13:56:08 -0500 Received: from MERCMBX41R.na.SAS.com ([10.16.20.110]) by MERCMBX41R.na.SAS.com ([10.16.20.110]) with mapi id 15.00.0995.028; Fri, 5 Dec 2014 13:56:07 -0500 From: Eric Hill To: PostgreSQL mailing lists Subject: SQLFreeHandle() takes eons when running debug Thread-Topic: SQLFreeHandle() takes eons when running debug Thread-Index: AdAQsSACAZONOqo3QOyYxRQM76xwzA== Date: Fri, 5 Dec 2014 18:56:06 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.44.16.137] Content-Type: multipart/alternative; boundary="_000_e1a53e420a8d44d7b32b1bc476cf499aMERCMBX41RnaSAScom_" MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-Forefront-Antispam-Report: CIP:149.173.6.149; CTRY:US; IPV:NLI; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(438002)(189002)(199003)(164054003)(54356999)(6806004)(16236675004)(21056001)(92566001)(77156002)(4396001)(87936001)(77096005)(19580395003)(2656002)(92726002)(110136001)(86362001)(31966008)(108616004)(62966003)(107886001)(107046002)(106466001)(19300405004)(450100001)(84326002)(50986999)(512954002)(71186001)(20776003)(229853001)(64706001)(33186001)(99396003)(33646002)(19625215002)(102836002)(120916001)(15975445007)(46102003)(24736002)(72026002)(460985004); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR05MB509; H:mercav05r.na.sas.com; FPR:; SPF:Pass; MLV:sfv; PTR:mercav05r.na.sas.com; MX:1; A:1; LANG:en; X-Microsoft-Antispam: UriScan:; X-Microsoft-Antispam: BCL:0;PCL:0;RULEID:;SRVR:DM2PR05MB509; X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601002); SRVR:DM2PR05MB509; X-Forefront-PRVS: 04163EF38A Received-SPF: Pass (protection.outlook.com: domain of jmp.com designates 149.173.6.149 as permitted sender) receiver=protection.outlook.com; client-ip=149.173.6.149; helo=mercav05r.na.sas.com; Authentication-Results: spf=pass (sender IP is 149.173.6.149) smtp.mailfrom=Eric.Hill@jmp.com; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:;SRVR:DM2PR05MB509; X-OriginatorOrg: jmp.com X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org --_000_e1a53e420a8d44d7b32b1bc476cf499aMERCMBX41RnaSAScom_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hey, Not sure how this could be the PostgreSQL ODBC driver's fault, but when I r= un a debug build of my application, calls to SQLFreeHandle() to free a stat= ement can have for quite a long time (we're talking a minute or two) before= proceeding. This is Windows, 64-bit Unicode, version 9.03.03 of the PG OD= BC driver. The call stack looks like this when paused: ntdll.dll!RtlCompareMemoryUlong() + 0x10 bytes ntdll.dll!RtlpFreeHeap() + 0x113f bytes ntdll.dll!RtlFreeHeap() + 0x1df bytes ntdll.dll!RtlDebugFreeHeap() + 0x23f bytes ntdll.dll!RtlpFreeHeap() + 0x7d5b7 bytes ntdll.dll!RtlFreeHeap() + 0x1df bytes msvcr100.dll!free() + 0x1c bytes psqlodbc35w.dll!00007ff97bc7c827() [Frames below may be incorrect and/or missing, no symbols l= oaded for psqlodbc35w.dll] psqlodbc35w.dll!00007ff97bc7656b() psqlodbc35w.dll!00007ff97bc76044() psqlodbc35w.dll!00007ff97bc761c7() psqlodbc35w.dll!00007ff97bc88781() psqlodbc35w.dll!00007ff97bc66bda() odbc32.dll!FreeStmt() + 0x2c5 bytes odbc32.dll!SQLFreeHandle() + 0x2a0 bytes > Jmp.exe!DBContext::freeStmt(void * & hstmt=3D0x000000001f0320= 30) Line 1644 + 0x14 bytes C++ Running a release build, no such delay. We don't see anything like this fo= r SQL Server, Oracle, DB2, Teradata, or MySQL ODBC drivers. Anyone run int= o this before that can suggest a fix or workaround? Thanks, Eric --_000_e1a53e420a8d44d7b32b1bc476cf499aMERCMBX41RnaSAScom_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hey,

 

Not sure how this could be the PostgreSQL ODBC drive= r’s fault, but when I run a debug build of my application, calls to S= QLFreeHandle() to free a statement can have for quite a long time (we’= ;re talking a minute or two) before proceeding.  This is Windows, 64-bit Unicode, version 9.03.03 of the PG ODBC driv= er.   The call stack looks like this when paused:

 

        &nbs= p;       ntdll.dll!RtlCompareMemoryUlong()&nb= sp; + 0x10 bytes         &= nbsp;

        &nbs= p;      ntdll.dll!RtlpFreeHeap()  + 0x113= f bytes

        &nbs= p;      ntdll.dll!RtlFreeHeap()  + 0x1df = bytes    

        &nbs= p;      ntdll.dll!RtlDebugFreeHeap()  + 0= x23f bytes       

        &nbs= p;      ntdll.dll!RtlpFreeHeap()  + 0x7d5= b7 bytes           &= nbsp;

        &nbs= p;      ntdll.dll!RtlFreeHeap()  + 0x1df = bytes    

        &nbs= p;      msvcr100.dll!free()  + 0x1c bytes=             &nb= sp;

        &nbs= p;      psqlodbc35w.dll!00007ff97bc7c827()  &= nbsp;   

        &nbs= p;       [Frames below may be incorrect and/o= r missing, no symbols loaded for psqlodbc35w.dll]    &n= bsp;       

        &nbs= p;      psqlodbc35w.dll!00007ff97bc7656b()  &= nbsp;  

        &nbs= p;       psqlodbc35w.dll!00007ff97bc76044() &= nbsp;   

        &nbs= p;       psqlodbc35w.dll!00007ff97bc761c7() &= nbsp;    

        &nbs= p;       psqlodbc35w.dll!00007ff97bc88781() &= nbsp;   

        &nbs= p;       psqlodbc35w.dll!00007ff97bc66bda() &= nbsp;   

        &nbs= p;       odbc32.dll!FreeStmt()  + 0x= 2c5 bytes     

        &nbs= p;      odbc32.dll!SQLFreeHandle()  + 0x2= a0 bytes        

>        =      Jmp.exe!DBContext::freeStmt(void * & hstmt=3D0= x000000001f032030)  Line 1644 + 0x14 bytes    =   C++

 

Running a release build, no such delay.  We don= ’t see anything like this for SQL Server, Oracle, DB2, Teradata, or M= ySQL ODBC drivers.  Anyone run into this before that can suggest a fix= or workaround?

 

Thanks,

 

Eric

 

--_000_e1a53e420a8d44d7b32b1bc476cf499aMERCMBX41RnaSAScom_--