Re: Problem in SQLFreeHandle (Statement)

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Jade Koskela <jkoskela0(at)gmail(dot)com>, pgsql-odbc(at)postgresql(dot)org
Subject: Re: Problem in SQLFreeHandle (Statement)
Date: 2014-06-12 13:30:13
Message-ID: 5399AB65.5040608@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 06/12/2014 05:30 AM, Jade Koskela wrote:
> Hello,
> I am using psql-odbc 9.3 on OSX.

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.

Can easily you test on another platform, or with different version of
unixODBC?

> 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.

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?

- Heikki

Attachment Content-Type Size
cancel-race.c text/x-csrc 1.7 KB
common.c text/x-csrc 5.5 KB
common.h text/x-chdr 977 bytes

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Heikki Linnakangas 2014-06-12 14:13:00 Re: Regression tests for deprecated functions
Previous Message Craig Ringer 2014-06-12 09:12:46 Re: XA registry entries are missing from 64-bit install