From: Inoue, Hiroshi <inoue@tpf.co.jp>
To: Craig Ringer <craig@2ndquadrant.com>
To: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: NPE in psqlodbc30a.dll!PgDtc_set_property caused by pgendlista.dll!IAsyncPG::RequestExec
Date: Sat, 14 Jun 2014 00:52:49 +0900
Message-ID: <539B1E51.10008@tpf.co.jp> (raw)
In-Reply-To: <539A8EDA.8050503@2ndquadrant.com>
References: <539A8EDA.8050503@2ndquadrant.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
Hi Craig,
(2014/06/13 14:40), Craig Ringer wrote:
> Hi folks
>
> I've been chasing an NPE in psqlODBC while attempting to run a debug
> build to help identify an MSDTC / XA issue for a customer.
>
> In pgenlista.dll, IAsyncPG::RequestExec calls SetDone(...), which clears
> the IAsyncPG::dtcconn member. It then calls PgDtc_set_property on the
> just-cleared dtcconn member, causing an NPE.
Oops you are right.
Anyway it would take some time to fix it.
I would have to remember the code first.
Thanks.
Hiroshi Inoue
> in msdtc_enlist.cpp:
>
> if (S_OK != res)
> {
> SetDone(res);
> bReleaseEnlist = true;
> }
> PgDtc_set_property(dtcconn, prepareRequested, (void *) 0);
>
>
> At the entry point to IAsyncPG::RequestExec, res == S_OK . It gets set
> to S_FAIL at:
>
> if (!PgDtc_two_phase_operation(econn, PREPARE_TRANSACTION, pgxid))
> res = E_FAIL;
>
> on line 637. I'll look into why that's failing in my environment, but
> meanwhile, any attempt to access 'dtcconn' after clearing it is clearly
> a bug.
>
> Presumably the PgDtc_set_property should be done before SetDone, or in
> an else {} .
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: inoue@tpf.co.jp, craig@2ndquadrant.com
Subject: Re: NPE in psqlodbc30a.dll!PgDtc_set_property caused by pgendlista.dll!IAsyncPG::RequestExec
In-Reply-To: <539B1E51.10008@tpf.co.jp>
References: <539A8EDA.8050503@2ndquadrant.com> <539B1E51.10008@tpf.co.jp>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox