Crash on Windows Server 2019 - Mailing list pgsql-odbc

From Ingmar Koecher
Subject Crash on Windows Server 2019
Date
Msg-id CA+TYH-EH2AtRnmfNZUu=cBS0o8KALYPuPMBr2jFnNtNA0S1z4w@mail.gmail.com
Whole thread Raw
Responses Re: Crash on Windows Server 2019  (Craig Ringer <craig.ringer@enterprisedb.com>)
List pgsql-odbc
Hi,

We have a multi-threaded Windows server process (C++) that writes data to a PostgreSQL database server using the 11.1 PostgreSQL ODBC driver.

This works smoothly pretty much everywhere except for one system, where the server process seems to crash on a regular basis inside the PostgreSQL ODBC driver, about every 10 minutes.

We have a crash dump that I've been looking at, but since I don't have access to the symbols (I tried this approach, without success), I can't determine why/how the driver is crashing. I do however see in the stack trace that crash is happening in the ConfigDriver() function:

psqlodbc35w!ConfigDriver

The full stack trace of the crashing thread below:

kernel32!WerpReportFaultInternal+0x51b
kernel32!WerpReportFault+0xac
KERNELBASE!UnhandledExceptionFilter+0x35e
ntdll!RtlUserThreadStart$filt$0+0xaa
ntdll!_C_specific_handler+0x96
ntdll!RtlpExecuteHandlerForException+0xf
ntdll!RtlDispatchException+0x40f
ntdll!KiUserExceptionDispatch+0x2e (TrapFrame @ 000000d9`479fd468)
psqlodbc35w!ConfigDriver+0x9253
psqlodbc35w!PgDtc_isolate+0x8314
psqlodbc35w!PgDtc_isolate+0x6ee3
psqlodbc35w!ConfigDriver+0x67cd
psqlodbc35w!ConfigDriver+0x49d5
psqlodbc35w!dconn_FDriverConnectProc+0x2ac1
psqlodbc35w!dconn_FDriverConnectProc+0x3e5e
psqlodbc35w!dconn_FDriverConnectProc+0x24ab
psqlodbc35w!SQLExecDirectW+0xe3
odbc32!SQLExecDirectCover+0x2e0
odbc32!SQLExecDirectW+0xe1

We've also let the application run under the application verifier, and the crash happens again, in the ConfigDriver function. I'm not sure what this function does, and why it's having having to configure the driver after issuing an INSERT statement (which I believe the code does). A few more things to help triage this:

* An earlier version of our application works just fine, even though there have been no changes to the database code
* We tried different versions of the ODBC driver (including older ones, 9.6), it crashes with those too
* It works everywhere else, it only fails on this one system

I realize that this is not enough information to immediately come up with a solution, but I'm hoping that somebody can provide me with some ideas on how to get to the bottom of this.


Thank you,

Ingmar.

Twitter @IngmarKoecher

pgsql-odbc by date:

Previous
From: Hiroshi Saito
Date:
Subject: Re: typos in 13 Relase note
Next
From: Tukaram Gaikwad
Date:
Subject: pgsql-odbc SQLGetDiagRec() API issue