openlink / iODBC

An open-source ODBC driver manager and SDK that facilitates the development of database-independent applications on linux, freebsd, unix and MacOS X platforms.
http://www.iodbc.org/
Other
162 stars 52 forks source link

Deadlock during SQLDriverConnect() #96

Open aleksei-i opened 9 months ago

aleksei-i commented 9 months ago

We call SQLDriverConnect() which get lock using ENTER_HDBC(). Then the SQLSetConnectOptionW() is called which also get lock using ENTER_HDBC(). The second ENTER_HDBC() cause the deadlock.

The test: CheckBeforeConnect(SQL_ATTR_LOGIN_TIMEOUT, value, value); This function set the connect attribute before connection using SQLSetConnectAttr() and then calls SQLDriverConnect().

Stack trace:

Screenshot 2023-12-14 at 12 18 54 PM
pkleef commented 9 months ago

Development are looking into this ...