Re: Problem in SQLFreeHandle (Statement) - Mailing list pgsql-odbc
From | Jade Koskela |
---|---|
Subject | Re: Problem in SQLFreeHandle (Statement) |
Date | |
Msg-id | CAN5ZvqxmLiUzZjbEdNjmhYWZ9sHkf7Y8RJi=DxRR8-3Jj56_Qg@mail.gmail.com Whole thread Raw |
In response to | Re: Problem in SQLFreeHandle (Statement) (Heikki Linnakangas <hlinnakangas@vmware.com>) |
Responses |
Re: Problem in SQLFreeHandle (Statement)
Re: Problem in SQLFreeHandle (Statement) |
List | pgsql-odbc |
[140735257568016][[SQLFreeHandle]]
[140735257568016]*** ENTER_CONN_CS [140210608634616] ***
[140735257568016]*** ENTER_CONN_CS [140210608634616] ***
[140735257568016]*** LEAVE_CONN_CS [140210608634616] ***
[140735257568016]*** LEAVE_CONN_CS [140210608634616] ***
[140735257568016]*** LEAVE_CONN_CS [140210608634616] ***
[140735257568016][SQLGetConnectAttrW]
[140735257568016]*** ENTER_CONN_CS [140210608634616] ***
[140735257568016]*** LEAVE_CONN_CS [140210608634616] ***
[140735257568016][SQLGetConnectAttrW]
[140735257568016]*** ENTER_CONN_CS [140210608634616] ***
[140735257568016]*** LEAVE_CONN_CS [140210608634616] ***
[140735257568016][SQLGetConnectAttrW]
[140735257568016]*** ENTER_CONN_CS [140210608634616] ***
[140735257568016]*** LEAVE_CONN_CS [140210608634616] ***
[4466282496][[SQLAllocHandle]]
[4466282496]*** ENTER_CONN_CS [140210608634616] *** <- new thread grabbed mutex, count=1
[4466282496]**** PGAPI_AllocStmt: hdbc = 0x7f8553857000, stmt = 0x7f8552d17100
[4466282496]*** LEAVE_CONN_CS [140210608634616] *** <- count=0
[4466282496]**** PGAPI_Prepare: STMT_ALLOCATED, copy
[4466282496]*** ENTER_CONN_CS [140210608634616] *** <- count=1
[4466282496]*** ENTER_CONN_CS [140210608634616] *** <- count=2
[140735257568016]*** LEAVE_CONN_CS [140210608634616] *** <- this thread doesn't own, count=2
[4466282496]*** LEAVE_CONN_CS [140210608634616] *** <- count=1
[4466282496]*** LEAVE_CONN_CS [140210608634616] *** <- count=0
[4466282496]*** LEAVE_CONN_CS [140210608634616] *** <- count=0
[140735257568016][[SQLFreeHandle]]
[140735257568016]*** ENTER_CONN_CS [140210608634616] *** <-thread blocks on mutex here, should be unlocked?
On 06/12/2014 05:30 AM, Jade Koskela wrote:Which version, exactly? There were some changes to locking in SQLFreeHandle in 09.03.0200. Not sure if those changes might've fixed this, or caused it.Hello,
I am using psql-odbc 9.3 on OSX.
Can easily you test on another platform, or with different version of unixODBC?I tried to reproduce this with the attached little test program. It works fine. Can you post the test program you're using, or modify the attached so that it exhibits the behavior you're seeing, please?I have one thread running a query, and
another thread cancels the query using SQLCancel. The thread running the
query successfully cancels and exits the driver code. When we try to free
the statement handle, it blocks on a mutex doing ENTER_CONN_CS, or
something similar in SQLFreeHandle.
Does anyone have any input on this problem? I don't see who is holding the
mutex, the thread running the query is done.
- Heikki
Attachment
pgsql-odbc by date: