Crash of driver on windows server

Started by Ingmar Koecherover 5 years ago2 messagesbugs
Jump to latest
#1Ingmar Koecher
ingmar.koecher@gmail.com

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

#2Bruce Momjian
bruce@momjian.us
In reply to: Ingmar Koecher (#1)
Re: Crash of driver on windows server

On Thu, Dec 3, 2020 at 03:35:13PM -0600, Ingmar Koecher wrote:

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.

I suggest you ask here:

https://odbc.postgresql.org/faq.html#1.6

pgsql-odbc@postgresql.org

--
Bruce Momjian <bruce@momjian.us> https://momjian.us
EnterpriseDB https://enterprisedb.com

The usefulness of a cup is in its emptiness, Bruce Lee